Learn R Programming

mmrm (version 0.3.14)

h_add_covariance_terms: Add Individual Covariance Variables As Terms to Formula

Description

Add Individual Covariance Variables As Terms to Formula

Usage

h_add_covariance_terms(f, covariance)

Value

A new formula with included covariance terms.

Arguments

f

(formula)
a formula to which covariance structure terms should be added.

covariance

(cov_struct)
a covariance structure object from which additional variables should be sourced.

Details

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.