[R] GLM function with poisson distribution
Florian Menzel
angiopteris at yahoo.com
Tue Jan 25 15:22:26 CET 2005
Hello all,
I found a weird result of the GLM function that seems
to be a bug.
The code:
a=c(rep(1,8),rep(2,8))
b=c(rep(0,8),rep(3,8))
cbind(a,b)
model=glm(b~a, family=poisson)
summary(model)
generates a dataset with two groups. One group
consists entirely of zeros, the other of 3's (as
happened in a dataset Im analyzing right now). Since
they are count data, one should apply a poisson
distribution. A GLM with poisson distribution delivers
a p value > 0.99, thus, completely fails to detect the
difference between the two groups. Why not and what
should I do to avoid this error? A quasipoisson
distribution detects the difference but Im not sure
whether its appropriate to use it.
Thanks a lot to everybody who answers!
Florian
Version information:
version 1.9.0 (2004-4-12)
os mingw32
arch i386
More information about the R-help
mailing list