Within subjects ANOVA on balanced designs is straightforward in R. Repeated measures regression for unbalanced data, or for non-Gaussian, e.g., binary data and beyond is a tad more tricky (not just in R).
- lmer in the lme4 package seems to be the most popular function for fitting generalized linear mixed-effects models. For MCMC generated p-values, the languageR package has the useful pvals.fnc function.
- clmm in the ordinal package does mixed-effects models for ordinal outcomes.
- For binary and poisson distributed outcomes, and with a random intercept, glmmML (in the glmmML package) was recommended as a possible alternative to lmer.
- By far the clearest explanation of fixed and random effects I have found so far is in Gelman and Hill’s (2007) Data Analysis Using Regression and Multilevel/Hierarchical Models. This also has nice hints on standardising variables and the various methods for dealing with categoricals predictors. The associated arm package is useful.
- For explaining how contrasts work in R, I found this web page was helpful. As is Chapter 12 of Michael Crawley’s Statistics: An Introduction using R.
- There’s the wiki, GLMMs for ecologists and evolutionary biologists
Recent Comments