S3 class that represents a parsed within-between formula. This provides a structured intermediate representation between the user-specified formula and the final lme4 formula.
Constructor for the WBFormula S3 class.
WBFormula(
raw_formula,
dv,
varying = character(0),
constants = character(0),
v_info = NULL,
wint_labs = NULL,
cint_labs = NULL,
bint_labs = NULL,
ranefs = NULL,
data = NULL,
allvars = NULL,
conds = NULL,
matrix_terms = NULL
)A WBFormula S3 object
The original Formula object
The dependent variable name
Character vector of time-varying predictor terms
Character vector of time-invariant predictor terms
Tibble with columns: term, root, lag, meanvar
Character vector of within x within interaction labels
Character vector of cross-level interaction labels
Character vector of between x between interaction labels
Character vector of random effects specifications
The data frame (with any expanded factors)
Character vector of all variables needed (passed from parser)
Integer number of formula conditions/parts
Optional list of metadata for matrix-returning terms
detected in the varying part of the formula (e.g., splines::ns(),
splines::bs(), stats::poly()). These terms are expanded into
within- and between- component columns during data preparation.