Hi everyone, (my first post, after reading the archives a lot)
I hope I'm not asking an old question (I have searched hours on the internet and R help files, with no success)
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:
[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
[1] 1.409863
I am confused as to which (if any) of the dispersion parameter is valid for th glmm model. Any one have an idea?
Thanks in advance for reading and hopefully for some much needed answers.
Mick
PS Iin 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. I could argue it is overfitted... so I may remove body size (it is secondary).
# R code for fitting the glmm
form <- cbind(RewardOdour, UnrewardOdour) ~ (Time + NbExposure + Ordr + BodySize)^2 # interaction terms limited to second order
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