lme4 (version 1.0-5)

subbars: "Sub[stitute] Bars"

Description

Substitute the '+' function for the '|' function in a mixed-model formula. This provides a formula suitable for the current model.frame function.

Usage

subbars(term)

Arguments

term
a mixed-model formula

Value

  • the formula with all | operators replaced by +

Note

This function is called recursively on individual terms in the model, which is why the argument is called term and not a name like form, indicating a formula.

See Also

formula, model.frame, model.matrix.

Other utilities: findbars, mkRespMod, mkReTrms, nlformula, nobars

Examples

Run this code
subbars(Reaction ~ Days + (Days|Subject)) ## => Reaction ~ Days + (Days + Subject)

Run the code above in your browser using DataCamp Workspace