lme4 (version 1.1-10)

expandDoubleVerts: Expand terms with '||' notation into separate '|' terms

Description

From the right hand side of a formula for a mixed-effects model, expand terms with the double vertical bar operator into separate, independent random effect terms.

Usage

expandDoubleVerts(term)

Arguments

term
a mixed-model formula

Value

  • the modified term

See Also

formula, model.frame, model.matrix.

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

Examples

Run this code
f <- y ~ x + (x || g)
  # the right-hand side of f is,
  f[[3]]
  # the expanded right-hand side,
  expandDoubleVerts(f[[3]])

Run the code above in your browser using DataCamp Workspace