[R] GLM function with poisson distribution

Peter Dalgaard p.dalgaard at biostat.ku.dk
Wed Jan 26 01:39:36 CET 2005


Thomas Lumley <tlumley at u.washington.edu> writes:

> On Tue, 25 Jan 2005, Florian Menzel wrote:
> 
> > Hello all,
> > I found a weird result of the GLM function that seems
> > to be a bug.
> 
> No, the problem is that you are using the Wald test when the mle is
> infinite, which is always going to be unreliable.  It's even worse
> because you are using data that couldn't really have come from a
> Poisson distribution (because for a=1 you have mean 3 and variance 0).

Actually, that's rather immaterial. Try it with

b=c(rep(0,8),rmultinom(1,24,rep(1/8,8))) 

or even

b=c(rep(0,8),rpois(8,3))

(in the former case, notice that the LRT is constant).

The zero variance does add to the confusion if you begin to consider
underdispersed models, though.


-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list