Multiple Linear Mixed-Effects Models

Description

Fits multiple linear mixed-effects models.

Usage

1
    mlmer(formula, data, vars, lrt=TRUE, save.residuals=FALSE, save.ranks=TRUE)

Arguments

formula

an object of class formula (or one that can be coerced to that class): a symbolic description of the models to be fitted.

data

an optional data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model.

vars

a character vector of variables of interest.

lrt

whether p-values should be computed using likelihood-ratio tests.

save.residuals

whether model residuals should be stored and returned.

save.ranks

whether random effect ranks should be stored and returned.

Value

A list with elements:

coefficients

if 'vars' is missing or non-empty, an array (or data frame, if vars contains a single element) of regression coefficient estimates (coef), standard errors (coef.se), and corresponding p-values (pval).

residuals

if save.residuals is TRUE, a matrix of model residuals.

ranef.ranks

if save.ranks is TRUE (default), a list of rank matrices (one per random effect) that can be visualized using ranks.heatmap.

See Also

lmer and mlm