[R-sig-ME] generalized linear mixed model for qualitative in R
Fan, Ruzong (NIH/NICHD) [E]
ruzong.fan at nih.gov
Sun Feb 12 00:58:52 CET 2012
Dear folks,
I wonder if glmer can we do spline or model correlation for longitudinal data?
In lme, it is possible to do both spline and model correlation. For instance, I wrote a short codes as below:
#################################################################
fit1E <- lme( sbp ~ -1 + X.mean,
random = list(group = pdIdent(~-1+Z.mean),
id = ~1),
correlation = corExp(form = ~ x | group/id),
na.action = na.exclude,
method = "ML",
subset = notmissing )
#################################################################
Basically, 'X.mean' models the fixed effect, and `Z.mean' models the spline random effect. The above codes will lead to 3 random variance estimations: one from Z.mean, one from id, and the other from the residual.
In addition, 'correlation = corExp(form = ~ x | group/id)' models the correlation.
I don't see there is something like `random = list( ... )' in glmer. So I am not sure how to do spline using glmer.
Plus, I don't find similar things like `correlation = corExp(form = ~ x | group/id)' in glmer to model correlation?
Thanks. R.F
More information about the R-sig-mixed-models
mailing list