Parses formulas to creates model matrices for clme.
Usage
model_terms_clme(formula, data)
Arguments
formula
a formula defining a linear fixed or mixed effects model. The constrained effect(s) must come before any unconstrained covariates on the right-hand side of the expression. The first ncon terms will be assumed to be constrained.
data
data frame containing the variables in the model.
Value
A list with the elements:
Y
response variable
X1
design matrix for constrained effect
X2
design matrix for covariates
P1
number of constrained coefficients
U
matrix of random effects
formula
the final formula call (automatically removes intercept)
dframe
the dataframe containing the variables in the model
REidx
an element to define random effect variance components
REnames
an element to define random effect variance components