Skip to content
Prev 59846 / 398502 Next

Error using glm with poisson family and identity link

Dear Federico: 

      Why do you use the "identity" link?  That can produce situations 
with an average of (-2) Poisson defects per unit, for example.  That's 
physical nonsense.  Also, it seems essentially to be generating your 
error message. 

      Also, have you considered the following: 

fit <- glm(FP ~ offset(log(rand)), data = tab, family = poisson, subset 
= rand >= 1)

      I haven't tried this, but it looks like this model is virtually
equivalent to the one you wrote:
"FP ~ rand-1" with link = "identity" says "estimate 'b' in 
PoissonMean = b*rand". 

      "FP ~ offset(log(rand))" with link = "log" (the default) says 
"estimate 'a' in log(PoissonMean)-log(rand) = a". 

      If I haven't made an error, then log(b) = a. 

      In more general situations, if you really need the "identity" 
link, have you considered searching for good starting values, as Prof. 
Ripley suggested?  You could build up to your final model by estimating 
simpler models and obtaining trial fits using the default "log" link?  
With those results and a little thought, you should be able to obtain 
reasonable starting values. 

      hope this helps. 
      spencer graves
Prof Brian Ripley wrote: