Message-ID: <alpine.LRH.2.01.0911131249390.7092@hymn14.u.washington.edu>
Date: 2009-11-13T20:49:39Z
From: Thomas Lumley
Subject: naive "collinear" weighted linear regression
In-Reply-To: <04665428-9919-428D-822E-548E08102954@comcast.net>
On Wed, 11 Nov 2009, David Winsemius wrote:
>
> On Nov 11, 2009, at 7:45 PM, Mauricio Calvao wrote:
>
>> When I try:
>>
>>> fit_mod <- lm(y~x,weights=1/error^2)
>>
>> I get
>>
>> Warning message:
>> In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
>> extra arguments weigths are just disregarded.
>
> (Actually the weights are for adjusting for sampling, and I do not see any
> sampling in your "design".)
>
No, the weights are not for adjusting for sampling. You will get the wrong standard errors if you put sampling weights into the `weights` argument.
The warning is saying that he had misspelt 'weights' as 'weigths' (and so the code he posted wasn' t the same as the code he ran).
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
tlumley at u.washington.edu University of Washington, Seattle