On Wed, Sep 7, 2011 at 4:28 PM, Suphajak Ngamlak
<supha...@phatrasecurities.com> wrote:
> Dear all,
>
> I am trying to do weighted regression using lm function in R. However, I have 
> a question why the results from
>
>
> 1)      lm(formula = Y~aX, weight = w)
>
> 2)      lm(formula = wY~waX)
>
> are different. Aren't they supposed to have the exactly same result?

No. lm(formula = wY~waX) is the same as lm(formula = Y~aX, weight = w^2)

-- 
Thomas Lumley
Professor of Biostatistics
University of Auckland

______________________________________________
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.

Reply via email to