[R-sig-ME] Poisson mixed models

Douglas Bates bates at stat.wisc.edu
Tue Oct 21 14:37:11 CEST 2008


On Tue, Oct 21, 2008 at 5:24 AM, Renwick, A. R. <a.renwick at abdn.ac.uk> wrote:
> I did run a GLMM with poisson - that is the model type I want to use.  I only used a GLMM with quasipoisson to check the scale parameter as I am unaware as to how to check if you have over/under dispersion in the poisson model, and hence violating the assumption of the model, and other way.
>
> # glmm with poisson family
> mix<-lmer(trianlarvae~Sex+width+sess+Nhat+Sex:width+Sex:sess+Sex:Nhat+width:sess+width:Nhat+sess:Nhat+(1|LocTran), family=poisson, data=larv, REML=FALSE)
> summary(mix)
>
> Generalized linear mixed model fit by the Laplace approximation
> Formula: trianlarvae ~ Sex + width + sess + Nhat + Sex:width + Sex:sess +      Sex:Nhat + width:sess + width:Nhat + sess:Nhat + (1 | LocTran)
>   Data: larv
>  AIC   BIC logLik deviance
>  464 572.7   -212      424
> Random effects:
>  Groups  Name        Variance Std.Dev.
>  LocTran (Intercept) 1.3462   1.1603
> Number of obs: 1697, groups: LocTran, 14
>
> Fixed effects:
>                      Estimate Std. Error z value Pr(>|z|)
> (Intercept)         -4.218e+00  1.708e+00 -2.4694   0.0135 *
> Sexmale              6.999e-01  1.189e+00  0.5887   0.5561
> width               -1.426e-01  2.360e-01 -0.6044   0.5456
> sessAugust           1.486e+00  2.060e+00  0.7212   0.4708
> sessJune            -1.545e+01  1.212e+03 -0.0127   0.9898
> sessOctober          3.119e+00  1.838e+00  1.6973   0.0896 .
> Nhat                -4.909e-02  5.814e-02 -0.8442   0.3985
> Sexmale:width        1.159e-01  7.612e-02  1.5222   0.1280
> Sexmale:sessAugust  -7.540e-01  1.632e+00 -0.4621   0.6440
> Sexmale:sessJune     1.310e+01  1.212e+03  0.0108   0.9914
> Sexmale:sessOctober -1.118e+00  1.223e+00 -0.9139   0.3608
> Sexmale:Nhat         9.881e-03  1.012e-02  0.9765   0.3288
> width:sessAugust     8.245e-01  5.882e-01  1.4017   0.1610
> width:sessJune      -4.034e-02  2.791e-01 -0.1445   0.8851
> width:sessOctober   -1.045e-02  2.057e-01 -0.0508   0.9595
> width:Nhat           4.239e-03  3.654e-03  1.1600   0.2460
> sessAugust:Nhat     -1.484e-01  1.299e-01 -1.1422   0.2534
> sessJune:Nhat        2.646e-02  6.249e-02  0.4235   0.6719
> sessOctober:Nhat     1.462e-03  5.776e-02  0.0253   0.9798
>
>
>
>
> -----Original Message-----
> From: Martin Henry H. Stevens [mailto:HStevens at muohio.edu]
> Sent: 21 October 2008 11:19
> To: Renwick, A. R.
> Cc: r-sig-mixed-models at r-project.org
> Subject: Re: [R-sig-ME] Poisson mixed models
>
> Hi Anna,
> So you tried a GLMM with quasipoisson and a GLM with Poisson? How about a GLMM with Poisson? Sounds like you may have a random effect that is necessary for your hypothesis test, but which does not explain any variation (but I really have no way of knowing).
> Hank
> On Oct 21, 2008, at 5:33 AM, Renwick, A. R. wrote:
>
>>  Dear All
>> There has been a lot of talk recently on this forum regarding (over)
>> dispersion and quasi models.  I am running a GLMM with a poisson
>> family for some tick burden data I have and I wanted to check if I had
>> overdispersion in my model (and thus a poisson family would be
>> inappropriate).  The only method I have found to do this is to run the
>> model with a quasipoisson family and then ask for the scale parameter
>> using:
>>
>> lme4:::sigma(model)
>>
>> However, when I do this my model appears severely UNDER dispersed:
>>  sigmaML
>> 3.779694e-06
>>
>> Without the random effect in the model (i.e a GLM) the scale parameter
>> is 1.07 - almost perfect for a poisson family.  Is the method I  am
>> trying not appropriate to determine the dispersion in the mixed model?
>> Does anyone know a better method?
>>
>> Many thanks,
>> Anna

That seems to be an unusually low value for the dispersion.

I would have to check the code to see exactly what the sigma function
returns in the case of the quasipoisson family.  It is quite possible
that it is an inappropriate value.

I think it is more straightforward to look at the penalized, weighted
residual sum of squares, model at deviance["pwrss"], divided by the
number of observations, model at dims["n"].  You can do that for a model
fit with the Poisson family.

It also looks as if you will want to reduce the number of
fixed-effects terms in the model.




More information about the R-sig-mixed-models mailing list