Thoughts/brain dump on interface design for mixed model fitting software, mostly thinking about R, but trying to draw on ideas and inspirations from other software (Stata, GENSTAT/AS-REML, SAS PROC MIXED ...) The basic problem is that there is a very large, complex set of models that are potentially feasible within a single class of computational machinery, but it's rather hard to design an interface that makes it possible to specify all possible models in a reasonably straightforward but extendable way.

Some of this overlaps with questions about the design of the flexLambda branch of lme4, and with Steve's lme4ord package.

library("nlme")
library("ramps")
library("ape")
ff <- function(x) {
    s <- apropos(paste0("^",x,"[A-Z]"),ignore.case=FALSE)
    f <- gsub("package:","",sapply(s,find))
    split(s,f)
}
ff("pd")
ff("var")
ff("cor")

Desiderata

Examples

?? would be nice to have some reasonably juicy examples here and show how they're implemented in different models (e.g. something like an extended version of the table on the glmm.wikidot faq or of the table in my Fox et al. GLMM chapter (which compares model statements for four (G)LMMs in lme4, MCMCglmm, and glmmADMB)

Current flexLambda examples:

logDens~sample+dilut+cs(~(0+sample|Block),het=FALSE)
f1 <- Reaction ~ Days + d(~(Days | Subject))

where cs() stands for compound symmetry. The other currently implemented choices are d() (diagonal) and ar1d (AR order 1, 1-dimensional/temporal model). I'm not sure where the het parameter is interpreted, but presumably it's to specify heterogeneous variances or not. compound symmetry heterogeneous residual variance across random-effect group levels * heterogeneous residual variance across fixed factor levels

Some lme4ord examples illustrate the basic idea of lme4ord, but these aren't full runable examples. Here is a simple one that is runable:

## require(lme4ord)
## FIXME


lme4/lme4 documentation built on April 24, 2024, 5:51 p.m.