Description Usage Arguments Value Author(s) Examples
Maximum Likelihood estimation of variance components using the eigenvalues and eigenvectors, which are derived from the eigendecomposition of a relationship matrix.
1 | varcomp(y, Evector, Evalue)
|
y |
A vector including the phenotypes of n individuals. |
Evector |
A matrix (n x n) of eigenvectors. |
Evalue |
A vector of n eigenvalues. |
A list contains variance components
An estimate of residual variance.
An estimate of additive genetic variance.
Haipeng Yu and Gota Morota
Maintainer: Haipeng Yu haipengyu@vt.edu
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # Load cattle data
data(GCcattle)
# Phenotype, fixed covariates and marker information
str(cattle.pheno)
str(cattle.W)
# Compute genomic relationship matrix
G <- computeG(cattle.W, maf = 0.05, impute = 'rbinom', method = 'G1')
# Eigendecomposition of genomic relationship matrix
EVD <- eigen(G)
# Estimate variance component
var <- varcomp(y = cattle.pheno$Phenotype, Evector = EVD$vectors, Evalue = EVD$values)
# Retrieve additive genetic variance and residual variance
var$Vu
var$Ve
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.