Skip to content
Prev 97414 / 398498 Next

why does lm() not allow for negative weights?

On 8/4/2006 1:26 PM, Jens Hainmueller wrote:
Residual sums of squares (or deviances) could be negative with negative 
case weights.  This doesn't seem like a good thing:  would you really 
want the fit to be far from those points?

 > I suspect that there is a good reason for this.
That formula does not necessarily give least squares estimates in the 
case where weights might be negative.  For example, with a single 
observation y, a single parameter mu, design matrix X = 1, and weight 
-1, that formula becomes

b <- y,

but that is the worst possible estimator in a least squares sense.  The 
residual sum of squares can be made arbitrarily large and negative by 
setting b to a large value.

Duncan Murdoch