I have fit a few mixed effects models (particularly longitudinal models) using lme4 in R but would like to really master the models and the code that goes with them.
However, before diving in with both feet (and buying some books) I want to be sure that I am learning the right library. I have used lme4 up to now because I just found it easier than nlme, but if nlme is better for my purposes then I feel I should use that.
I'm sure neither is "better" in a simplistic way, but I would value some opinions or thoughts. My main criteria are:
- Easy to use (I'm a psychologist by training, and not particularly versed in statistics or coding, but I'm learning)
- Good features for fitting longitudinal data (if there is a difference here- but this is what I mainly use them for)
- Good (easy to interpret) graphical summaries, again not sure if there is a difference here but I often produce graphs for people even less technical than I, so nice clear plots are always good (I'm very fond of the
xyplotfunction inlattice()for this reason).
lme4you can either specify a diagonal covariance structure (i.e., independent random effects) or unstructured covariance matrices (i.e. all correlations have to be estimated) or partially diagonal, partially unstructured covariance matrices for the random effects. I'd also add a third difference in capabilities that may be more relevant for many longitudinal data situations:nlmelet's you specify variance-covariance structures for the residuals (i.e. spatial or temporal autocorrelation or heteroskedasticity),lme4doesn't. – fabians Dec 10 '10 at 11:55lme4allows to choose different VC structures. It would be better that you add it in your own response, together with other ideas you may have. I will upvote. BTW, I also realized thatlmList()is available inlme4too. I seem to remember some discussion about that on R-sig-ME. – chl Dec 10 '10 at 12:09