From p.dalgaard@biostat.ku.dk  Wed Dec 20 12:37:55 2000
From: p.dalgaard@biostat.ku.dk (Peter Dalgaard BSA)
Date: 20 Dec 2000 13:37:55 +0100
Subject: [Rd] glm gives incorrect results for zero-weight cases (PR#780)
In-Reply-To: ripley@stats.ox.ac.uk's message of "Wed, 20 Dec 2000 11:59:36 +0100 (MET)"
References: <200012201059.LAA15024@pubhealth.ku.dk>
Message-ID: <x21yv346ak.fsf@blueberry.kubism.ku.dk>

ripley@stats.ox.ac.uk writes:

> The reason is obvious: glm.fit only ever updates eta[good], and 
> zero-weight values are not `good'.  So eta[weights == 0] is stuck at the
> initial values.
> 
> There are two possible fixes:
> 
> 1) Update eta after the final fit, and then mu.  Out of range values
> could then be NA (although it looks like predict.glm does not check).
> 
> 2) Update all eta and hence mu values during the iterations.  This will
> apply the constraints on eta/mu at zero-weight points too, and so might
> be different.
> 
> I am inclined to think that 2) is right, and that adding points with zero 
> weight to the fit is not the same as omitting them.
> 
> Opinions?

Just for clarification: This applies only to cases where the
parametrization is non-canonical, e.g. additive models with Poisson
response, right? And essentially the issue is that if you have a model
like lambda = a + b x and you put in a zero-weight observation with x
= 0, then that should effectively constrain a to be positive. That
does make quite good sense, yes.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] glm gives incorrect results for zero-weight cases (PR#780)
Peter Dalgaard BSA