glm - R: GLMM glmer vs glmmPQL -
what syntax in glmmpql
multiple random effects?
with glmer
code looks like:
fit<- glmer(a~b+c+ (1 | d)+ (1 | e), family = gaussian, data=data)
how rewrite same exact thing using glmmpql
?
i trying:
fit<- glmmpql(a~b+c, random=c (~1 | d, ~1 | e), family = gaussian, data=data)
but gives error.
and major difference between glmer
, glmmpql
?
based on example provided, model glmmpql
specified as:
fit <- glmmpql(a ~ b + c, random = list(d = ~1, e = ~1), family = gaussian, data = data)
afaik, major difference between glmer
(which provided package lme4
) , glmmpql
(which relies on function lme
, nlme
pacakge) parameter estimation algorithm used in nlme
not optimized dealing crossed random effects, associated sparse design matrix, while lme4
takes advantage of structure; see, e.g., pinheiro & bates, "mixed-effects models in s , s-plus", springer, 2000, pp. 163. further references on differences between lmer/glmer
, lme
usual:
https://stats.stackexchange.com/questions/64226/lme-and-lmer-comparison https://stat.ethz.ch/pipermail/r-help/2006-october/115572.html
Comments
Post a Comment