[R-sig-ME] Correct dispersion parameter for glmmML?
Ken Beath
ken at kjbeath.com.au
Thu Mar 26 11:10:55 CET 2009
In your model fitting you have the intercept estimate large and with
large standard error and similarly for Ordr and maybe Exposure. This
is usually an indication of a problem with the fitting of binomial
data, probably separation due to overfitting. I would start with a
simple model and try and work out which terms are causing problems.
I prefer not to think about overdispersed GLMM, they seem a bit odd
statistically, maybe a GEE based approach is better.
Ken
On 25/03/2009, at 7:07 AM, Gi-Mick Wu wrote:
> Dear mixed model users, (my first post, after reading the archives a
> lot)
>
> This post is about mixed models, but not lmer or lme4; please let me
> know if it is inappropriate. (I have searched the archives for hours
> without finding an answer to my question. I have also searched and
> posted in "R-sig-eco" without results).
> Thank you in advance for reading!
>
> I’m fitting a generalized linear mixed model to binary data using
> glmmML (version 0.81-4), but am unsure of how to obtain the correct
> dispersion parameter. (I have also just updated R to version 2.8.1)
>
> For a glm model, I read that it should be the SS Pearson's
> residuals / df, rather than the default residuals (deviance). In my
> case:
>
> # GLM
> # using Pearson's residuals:
>> sum(residuals(modl.glm,type="pearson")^2)/modl.glm$df.residual
> [1] 1.062947
> # using deviance
>> modl.glm$deviance/modl.glm$df.residual
> [1] 1.409863
>
> For glmmML however, I cannot obtain the pearson residuals, but only
> the deviance and null deviance (same as deviance for glm):
>
> # GLMM
> # using Pearson's residuals
>> residuals(modl.glmmML)
> NULL
> # using deviance
>> modl.glmmML$deviance/modl.glmmML$df.residual
> [1] 1.413364
> # using null deviance
>> modl.glmmML$cluster.null.deviance/modl.glmmML$cluster.null.df
> [1] 1.409863
>
> I am confused as to which (if any) of the dispersion parameter is
> valid for the glmm model. Any one have an idea?
>
> Thanks in advance for reading and hopefully for some much needed
> answers or pointers.
> Mick
> PS In case it is relevant or for curiosity's sake, here's the
> experimental design:
>
> The experiment consists in testing the effect of experience on odour
> preferences of parasitoid wasps. Parasitoids lay eggs in host
> insects, which will be devoured from the inside until they die; like
> the movie Alien :-)
>
> Wasps were exposed to two different odours, with or without the
> presence of hosts (call them rewarded / unrewarded odour). Their
> odour preference was then tested in a Y-tube olfactometer 5 times
> after exposure (2h, 6h, 26h, 50h, 98h). 36 individuals were exposed
> to each odour either 1,2,3, or 4 times (9 individuals/treatment
> level). Odours were presented in alternation with half the wasps
> starting with the rewarded odour.
> (Total number of binary choices = 180). I set Time and NbExposure as
> fixed effects because I'm really interested in their effect and wasp
> ID as random. I also added body size, which seem to play a role on
> the effect of experience in honeybees, but it is secondary, so it
> could be removed (to avoid overfitting).
>
> # R code for fitting the glmm
> form <- cbind(RewardOdour, UnrewardOdour) ~ (Time + NbExposure +
> Ordr + BodySize)^2
> # interaction terms limited to second order for parsimony
> modl.glmmML <- glmmML(form, family=binomial,
> data=clean.dat,cluster=clean.dat[,"ID"],
> prior="gaussian", method="ghq", n.points=8) # same
> results with n.points = 20
>
>> modl.glmmML
>
> Call: glmmML(formula = form, family = binomial, data = clean.dat,
> cluster = clean.dat[, "ID"], prior = "gaussian", method = "ghq",
> n.points = 8)
>
> coef se(coef)
> z Pr(>|z|)
> (Intercept) -7.539e+00 7.5906651 -0.99324 0.3210
> Time -6.303e-03 0.0648177 -0.09724 0.9230
> Exposure 2.843e+00 2.3465958 1.21139 0.2260
> Ordr 4.366e+00 5.1119166 0.85401 0.3930
> BodySize 1.324e-02 0.0126869 1.04333 0.2970
> Time:Exposure 1.295e-03 0.0042982 0.30123 0.7630
> Time:Ordr 2.042e-02 0.0093118 2.19259 0.0283
> Time:BodySize -2.554e-06 0.0001093 -0.02337 0.9810
> Exposure:Ordr -2.333e-01 0.3489015 -0.66859 0.5040
> Exposure:BodySize -4.833e-03 0.0037688 -1.28235 0.2000
> Ordr:BodySize -7.487e-03 0.0086466 -0.86585 0.3870
>
> Scale parameter in mixing distribution: 0.484 gaussian
> Std. Error: 0.3204
>
> Residual deviance: 237.4 on 168 degrees of freedom AIC: 261.4
>
> _______________________________________________
> 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