Add Individual Covariance Variables As Terms to Formula
h_add_covariance_terms(f, covariance)
A new formula with included covariance terms.
(formula
)
a formula to which covariance structure terms should
be added.
(cov_struct
)
a covariance structure object from which
additional variables should be sourced.
stats::update()
is used to append the covariance structure and the environment
attribute will not be changed. This ensures the returned formula and the input formula
have the same environment.