Learn R Programming

sommer (version 4.5.27)

csm: Compound-symmetry covariance structure

Description

Compound-symmetry covariance structure. The returned dimensionless covariance shape is intended for use inside vsm, which supplies the single overall variance scale.

Usage

csm(x, rho = 0.10, fixed = FALSE,
    variance = c("homogeneous", "heterogeneous"), values = NULL)

Value

A list containing the incidence/design matrix in Z and a compiled CovarianceFactor v2 descriptor in covFactor, for use inside vsm.

Arguments

x

Variable defining q covariance levels.

rho

Starting common off-diagonal correlation.

fixed

For homogeneous variance, a logical indicating whether rho is fixed. For heterogeneous variance, a logical vector of length q: rho followed by q-1 variance-ratio parameters.

variance

Whether the correlation has homogeneous or heterogeneous marginal variances.

values

Optional q positive starting variances when variance = "heterogeneous".

Details

With variance = "homogeneous", csm uses unit diagonal and a common off-diagonal correlation, $$K_{ii}=1, \quad K_{ij}=\rho\ (i\ne j).$$ With variance = "heterogeneous", it uses $$K=D C(\rho)D,$$ where the first variance is the reference and the remaining q-1 variances are estimated as positive ratios. Positive definiteness requires \(-1/(q-1)<\rho<1\). The product-level variance remains owned by vsm.

See Also

corgm, dsm, vsm.

Examples

Run this code
if (FALSE) {
vsm(csm(environment), ism(genotype))
}

Run the code above in your browser using DataLab