expandDoubleVerts {lme4} | R Documentation |
'||'
notation into separate '|'
termsFrom 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.
expandDoubleVerts(term)
term |
a mixed-model formula |
the modified term
Note that ||
works at the level of formula parsing. This fact
can lead to results that may be confusing when factors occur to the
left of the ||
sign
(more info at https://github.com/lme4/lme4/issues/229).
formula
, model.frame
,
model.matrix
.
Other utilities: mkRespMod
,
mkReTrms
, nlformula
,
nobars
, subbars
f <- y ~ x + (x || g) # the right-hand side of f is, f[[3]] # the expanded right-hand side, expandDoubleVerts(f[[3]])