[R-sig-ME] Restrictions on the class of GLMMs
John Maindonald
john.maindonald at anu.edu.au
Mon Dec 7 10:10:27 CET 2009
Reasonably recently, it used to be possible, with glmer, to
associate one random term with each observation. With the
current version of glmer(), I find that this is not allowed. In the
case I was using it for, this allowed me to fit a random between
observations variance that was additive on the scale of the
linear predictor, rather than as with the dispersion estimate
fudge which estimates a constant multiplier for the theoretical
variance. I am wondering what the reason may be for disallowing
this; does it unduly complicate code somewhere or other?
I am using lme4_0.999375-32; Matrix_0.999375-32
Here is what I had been doing:
library(DAAG)
moths$transect <- 1:41 # Each row is from a different transect
moths$habitat <- relevel(moths$habitat, ref="Lowerside")
(A.glmer <- glmer(A~habitat+log(meters)+(1|transect),
family=poisson, data=moths))
Generalized linear mixed model fit by the Laplace approximation
Formula: A ~ habitat + log(meters) + (1 | transect)
Data: moths
AIC BIC logLik deviance
95 112 -37.5 75
Random effects:
Groups Name Variance Std.Dev.
transect (Intercept) 0.234 0.483
Number of obs: 41, groups: transect, 41
...
Thanks
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
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
More information about the R-sig-mixed-models
mailing list