lme4 (version 0.8-1)

lme: Fit linear mixed-effects models

Description

This generic function fits a linear mixed-effects model in the formulation described in Laird and Ware (1982) but allowing for nested random effects. The within-group errors are allowed to be correlated and/or have unequal variances.

Usage

lme(formula, data, random, ...)

Arguments

formula
a two-sided linear formula object describing the fixed-effects part of the model, with the response on the left of a ~ operator and the terms, separated by + operators, on the right.
data
an optional data frame containing the variables named in formula, random, correlation, weights, and subset. By default the variables are taken from the environment from which
random
optionally, any of the following: (i) a one-sided formula of the form ~x1+...+xn | g1/.../gm, with x1+...+xn specifying the model for the random effects and g1/.../gm the grouping structure (m m
...
Optional arguments for methods. Currently none are used.

Value

synopsis

lme(formula, data, random, method = c("REML", "ML"), control = list(), subset, weights, na.action, offset, model = TRUE, x = FALSE, y = FALSE, ...)

Details

A new version of the function called lmer is in the development versions of this package. The lmer function has a slightly modified calling sequence from lme and produces an object with an lmer representation of the model. The object produced by lme uses the ssclme representation. Additional standard arguments to model-fitting functions can be passed to lme. [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

See Also

lme-class, lm

Examples

Run this code
data(bdf)
fm <- lme(langPOST ~ IQ.ver.cen + avg.IQ.ver.cen, data = bdf,
          random = ~ IQ.ver.cen | schoolNR)
summary(fm)

Run the code above in your browser using DataCamp Workspace