Formula¶
-
class
brmp.formula.
Formula
(response, terms, groups)¶ Represents an lme4 formula.
~
A valid formula contains exactly one occurrence of ~
. The LHS gives the name of the scalar response variable. The RHS describes the structure of the model.+
A combination of terms. :
An interaction between two terms. Can also appear on the RHS of |
or||
to specify grouping by multiple factors.|
Introduces a group-level term. (i.e. random effect.) ||
Introduces a group-level term, omitting modelling of group-level correlations. 1
Intercept term. Note that intercept terms are not added automatically. The following examples are all parsed as valid formulae:
y ~ x y ~ 1 + x y ~ 1 + x1:x2 y ~ 1 + x1 + (1 + x2 | a) y ~ 1 + x1 + (1 + x2 || a:b)