Hi Derek, R^2 doesn't mean the same thing when you omit the intercept, as has been discussed on this list before. See http://r.789695.n4.nabble.com/lm-without-intercept-td3312429.html
Best, Ista On Wed, Mar 16, 2011 at 3:49 PM, derek <jan.kac...@gmail.com> wrote: > k=lm(y~x) > summary(k) > returns R^2=0.9994 > > lm(y~x) is supposed to find coef. a anb b in y=a*x+b > > l=lm(y~x+0) > summary(l) > returns R^2=0.9998 > lm(y~x+0) is supposed to find coef. a in y=a*x+b while setting b=0 > > The question is why do I get better R^2, when it should be otherwise? > > Im sorry to use the word "MS exel" here, but I verified it in exel and it > gives: > R^2=0.9994 when y=a*x+b is used > R^2=0.99938 when y=a*x+0 is used > > -- > View this message in context: > http://r.789695.n4.nabble.com/Strange-R-squared-possible-error-tp3382818p3382818.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@r-project.org mailing list > 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. > -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org ______________________________________________ R-help@r-project.org mailing list 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.