[R] a problem about WLS

jacquesliu jacquesliu at gmail.com
Thu Jul 5 01:40:44 CEST 2012


I was asked to do a WLS estimation, so I thought of lm() with weights like
wls=lm(Y~X-1,weight=INC)

however, it gives different result as below code, which use the formula of
WLS
y<-Y*INC^-0.5
x<-X*INC^-0.5
wls=lm(y~x-1)

Can anybody explain to me why the first code can not give the right answer?
Many thanks

--
View this message in context: http://r.789695.n4.nabble.com/a-problem-about-WLS-tp4635446.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list