thanks a lot, it works
On Thu, Jul 5, 2012 at 11:40 AM, Thomas Lumley-2 [via R] <
ml-node+s789695n4635453...@n4.nabble.com> wrote:
> On Thu, Jul 5, 2012 at 11:40 AM, jacquesliu <[hidden
> email]<http://user/SendEmail.jtp?type=node&node=4635453&i=0>>
> w
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?
2 matches
Mail list logo