Hi All,
It seems that R is giving the wrong R^2 while regression line fitted through the origin. I have used the attached data.
It is giving R^2=0.98 of the line fitted through the origin but I have verified using excel and other software, it should be 0.72.
R code:
lmfit2 <- lm( y ~ x-1 , data = datafm)
summary(lmfit2)
Thanks
Chandan