View source: R/FUN_covariance_basic.R
| csm | R Documentation |
Compound-symmetry covariance structure. The returned dimensionless covariance shape is intended for use inside vsm, which supplies the single overall variance scale.
csm(x, rho = 0.10, fixed = FALSE,
variance = c("homogeneous", "heterogeneous"), values = NULL)
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 |
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.
A list containing the incidence/design matrix in Z and a compiled CovarianceFactor v2 descriptor in covFactor, for use inside vsm.
corgm, dsm, vsm.
## Not run:
vsm(csm(environment), ism(genotype))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.