[R] R.squared in Weighted Least Square using the Lm Function

Charles boom2k1 at yahoo.com.au
Fri Aug 25 18:49:09 CEST 2006


Hello all,
I am using the function lm to do my weighted least
square regression.

model<-lm(Y~X1+X2, weight=w)

What I am confused is the r.squared.
It does not seem that the r.squared for the weighted
case is an ordinary 1-RSS/TSS.
What is that precisely?
Is the r.squared measure comparable to that obtained
by the ordinary least square?

<I also notice that
model$res is the unweighted residual while
summary(model)$res  is the weighted residual>


Thank you in advance for helping!

Charles



More information about the R-help mailing list