Skip to content
Prev 30986 / 398506 Next

glmmPQL and additive random effects?

Steve Buyske <buyske at stat.rutgers.edu> writes:
lme and, by extension, glmmPQL do not handle crossed random effects
easily.  

You must create a factor of the same length as y, A, B, C, and D with
a single level

const = factor(rep(1, length(y)))

then use the non-obvious formulation

glmmPQL(y ~ A + B, random = list(const = pdBlocked(pdIdent(~ C - 1), 
  pdIdent(~ D - 1))))