[R-sig-ME] LMER problem when all observations in one level are zero?
John Maindonald
john.maindonald at anu.edu.au
Mon Nov 29 10:44:43 CET 2010
You have to use the likelihood ratio statistic to make comparisons
between other levels and the level where observations are zero.
The Wald statistic approximation typically (or always?) breaks
down in this situation. This is related to the Hauck-Donner effect,
which is more commonly discussed in connection with binomilal
or quasi-binomial data. You might run the example code for the
moths dataset in the DAAG package.
Hope this helps
John Maindonald email: john.maindonald at anu.edu.au
phone : +61 2 (6125)3473 fax : +61 2(6125)5549
Centre for Mathematics & Its Applications, Room 1194,
John Dedman Mathematical Sciences Building (Building 27)
Australian National University, Canberra ACT 0200.
http://www.maths.anu.edu.au/~johnm
On 29/11/2010, at 6:04 PM, Sarah Reilly wrote:
> Hello,
>
> We are analyzing data on the number of insects of certain species on
> individual plants. There are 3 species of plants (fixed effect) nested
> within 8 different sites (random effect). We have structured the model as
> follows, after tentatively dropping the intercept of site:
>
>> lmer(insects ~ plantsp + (0+ plantsp|site) , family = poisson, REML = TRUE
> )
>
> We then went on to do contrasts between levels of the fixed effect:
>
>> glht(bestmod, linfct = mcp(plantsp = "Tukey"))
>
> This seems to work ok for some contrasts, but not others. In particular,
> sometimes we have the situation where an insect was not found at all on one
> particular plant species (hence all observations are 0 for that level of the
> fixed effect). This returns the unsatisfactory result that the level with
> the highest mean is different from the level with the intermediate mean, but
> not at all different from the level with the low (i.e. 0) mean. Furthermore,
> adding a single insect to a random plant within the all 0s group makes all
> the contrasts highly significant. The data are overdispersed and
> zero-inflated but that doesn‚t seem to be responsible for this particular
> problem. We may end up using MCMCglmm but we still would like to understand
> why this is happening in LMER.
>
> Thanks for your assistance,
>
> Sarah
>
> Here are the results from a test where this happens:
>
> Generalized linear mixed model fit by the Laplace approximation
>
> Formula: insects ~ plantsp + (0 + plantsp | site)
>
> AIC BIC logLik deviance
>
> 1002 1042 -491.9 983.9
>
> Random effects:
>
> Groups Name Variance Std.Dev. Corr
>
> site plantspTA 0.13088 0.36177
>
> plantspTG 1.81646 1.34776 0.000
>
> plantspTL 1.62193 1.27355 0.000 0.325
>
> Number of obs: 626, groups: site, 8
>
> Fixed effects:
>
> Estimate Std. Error z value Pr(>|z|)
>
> (Intercept) -18.71 907.10 -0.021 0.984
>
> plantspTG 16.97 907.10 0.019 0.985
>
> plantspTL 19.10 907.10 0.021 0.983
>
> Correlation of Fixed Effects:
>
> (Intr) plntTG
>
> plantspTG -1.000
>
> plantspTL -1.000 1.000
>
>
>
> Simultaneous Tests for General Linear Hypotheses
>
> Multiple Comparisons of Means: Tukey Contrasts
>
> Fit: glmer(formula = insects ~ plantsp + (0 + plantsp | site), family =
> poisson,
>
> REML = TRUE)
>
> Linear Hypotheses:
>
> Estimate Std. Error z value Pr(>|z|)
>
> TG - TA == 0 16.9673 907.1004 0.019 0.999777
>
> TL - TA == 0 19.1032 907.1003 0.021 0.999718
>
> TL - TG == 0 2.1358 0.6068 3.520 0.000864 ***
>
> ---
>
> Signif. codes: 0 Œ***‚ 0.001 Œ**‚ 0.01 Œ*‚ 0.05 Œ.‚ 0.1 Œ ‚ 1
>
> (Adjusted p values reported -- single-step method)
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
More information about the R-sig-mixed-models
mailing list