Defines random effect terms using the lme4 syntax
Arguments
- formula
A random effect as returned by findbars when a random effect is defined using the lme4 syntax in formula. Currently only simplified random effects (i.e LHS | RHS) are supported.
See also
Functions used to help convert formulas into model designs
as_string_formula(),
construct_re(),
construct_rw(),
enw_formula(),
enw_manual_formula(),
parse_formula(),
remove_rw_terms(),
rw(),
rw_terms(),
split_formula_to_terms()
Examples
form <- epinowcast:::parse_formula(~ 1 + (1 | age_group))
re(form$random[[1]])
#> $fixed
#> [1] "1"
#>
#> $random
#> [1] "age_group"
#>
#> attr(,"class")
#> [1] "enw_re_term"
form <- epinowcast:::parse_formula(~ 1 + (location | age_group))
re(form$random[[1]])
#> $fixed
#> [1] "location"
#>
#> $random
#> [1] "age_group"
#>
#> attr(,"class")
#> [1] "enw_re_term"
