Coerce into a Covariance Structure DefinitionSource:
an object from which to derive a covariance structure. See object specific sections for details.
additional arguments unused.
whether to emit a warning when parts of the formula are disregarded.
A covariance structure can be parsed from a model definition formula or call. Generally, covariance structures defined using non-standard evaluation take the following form:
For example, formulas may include terms such as
us(time | subject) cp(time | group / subject) sp_exp(coord1, coord2 | group / subject)
Note that only
sp_exp (spatial) covariance structures may provide multiple
coordinates, which identify the Euclidean distance between the time points.
as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be covariance structure definitions and must follow the form:
Any component on the right hand side of a formula is considered when searching for a covariance definition.
# provide a covariance structure as a right-sided formula as.cov_struct(~ csh(visit | group / subject)) #> <covariance structure> #> heterogeneous compound symmetry: #> #> visit | group / subject #> # when part of a full formula, suppress warnings using `warn_partial = FALSE` as.cov_struct(y ~ x + csh(visit | group / subject), warn_partial = FALSE) #> <covariance structure> #> heterogeneous compound symmetry: #> #> visit | group / subject #>