> > > > plot(r2,d) > > res = lm(r2~d) > > > Mixing up your x and y coordinate. Do: > > plot(d,r2)
... or use: plot(r2 ~ d) so that res <- lm(r2 ~ d) uses exactly the same pattern... Olivier. -- Olivier Crouzet, PhD Laboratoire de Linguistique -- EA3827 Université de Nantes Chemin de la Censive du Tertre - BP 81227 44312 Nantes cedex 3 France phone: (+33) 02 40 14 14 05 (lab.) (+33) 02 40 14 14 36 (office) fax: (+33) 02 40 14 13 27 e-mail: olivier.crou...@univ-nantes.fr http://www.lling.univ-nantes.fr/ ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.