lme4_to_glmmr: Map lme4 formula to glmmrBase formula
Description
Returns a formula that can be used for glmmrBase Models from an lme4 input.
Usage
lme4_to_glmmr(formula, cnames)
Value
A formula.
Arguments
formula
A lme4 style formula
cnames
The column names of the data to be used. These are used to check if the specified clustering variables are in
the data.
Details
The package lme4 uses a syntax to specify random effects as `(1|x)` where `x` is the grouping variable.
This function will modify such a formula, including those with nesting and crossing operators `/` and `:` into
the glmmrBase syntax using the `gr()` function. Not typically required by the user as it is used internally
in the `mcml_lmer` and `mcml_glmer` functions.