Skip to content
Prev 7006 / 20628 Next

GLMM with Poisson

Zofia Ecaterina Taranu <zofia.taranu at ...> writes:
I prefer glmer() to make it explicit that this is a GLMM
(but it doesn't really matter at present).
The residual deviance is given in the first summary line
(with AIC, BIC, logLik).

  You could get a null deviance by fitting whatever
you consider to be the null model (it might be ~1, or
it might ~1 + (1|fBeach): you decide).

  You can get the Pearson chi-squared goodness-of-fit
statistic as

  sum(residuals(Mglmm1)^2)

(lme4 gives Pearson residuals for GLMMs by default.)

  It's also a bit tricky to decide what the residual df
are (how do you count random effects?), but we could
say that this model has 4 parameters (intercept,
NAP, fExp11, among-fBeach variance) and hence 41 residual
df, so deviance/residual df is *approximately* 1.5 -- may
be worth trying an observation-level random effect to 
see what happens (or just inflating the standard errors of
the estimates by sqrt(1.5)).