This function removes random walk terms
denoted using rw() from a formula so that they can be
processed on their own.
Reference
This function was adapted from code written
by J Scott (under an MIT license) as part of
the epidemia package (https://github.com/ImperialCollegeLondon/epidemia/).
See also
Functions used to help convert formulas into model designs
ar(),
arima(),
arima_terms(),
arma(),
as_string_formula(),
construct_arima(),
construct_gp(),
construct_re(),
construct_rw(),
enw_formula(),
enw_manual_formula(),
gp(),
gp_terms(),
ma(),
parse_formula(),
re(),
remove_arima_terms(),
remove_gp_terms(),
rw(),
rw_terms(),
split_formula_to_terms()
Examples
epinowcast:::remove_rw_terms(~ 1 + age_group + location)
#> ~1 + age_group + location
#> <environment: 0x56336e0d6d78>
epinowcast:::remove_rw_terms(~ 1 + age_group + location + rw(week, location))
#> ~1 + age_group + location
#> <environment: 0x56336e074f60>
