buildlme: Uses 'buildmer' to perform stepwise elimination of...

View source: R/buildmer.r

buildlmeR Documentation

Uses buildmer to perform stepwise elimination of mixed-effects models fit via lme from nlme

Description

Uses buildmer to perform stepwise elimination of mixed-effects models fit via lme from nlme

Usage

buildlme(formula, data = NULL, buildmerControl = buildmerControl())

Arguments

formula

A formula specifying both fixed and random effects using lme4 syntax. (Unlike lme, buildlme does not use a separate random argument!).

data

See the general documentation under buildmer-package.

buildmerControl

Control arguments for buildmer — see the general documentation under buildmerControl.

Details

The fixed and random effects are to be passed as a single formula in lme4 format. This is internally split up into the appropriate fixed and random parts. Only a single grouping factor is allowed. The random-effect covariance matrix is always unstructured. If you want to use pdMat covariance structures, you must (a) not specify any lme4 random-effects term in the formula, and (b) specify your own custom random argument in the args list in buildmerControl. Note that buildlme will merely pass this through; no term reordering or stepwise elimination is done on a user-provided random argument.

See Also

buildmerControl

Examples

library(buildmer)
model <- buildlme(Reaction ~ Days + (Days|Subject),data=lme4::sleepstudy)

buildmer documentation built on June 27, 2026, 1:06 a.m.