varcomp: Estimates of variance componets.

Description Usage Arguments Value Author(s) Examples

Description

Maximum Likelihood estimation of variance components using the eigenvalues and eigenvectors, which are derived from the eigendecomposition of the relationship matrix.

Usage

1
varcomp(y, Evector, Evalue)

Arguments

y

A vector includes the phenotypes of n individuals.

Evector

A matrix (n x n) with columns according to eigenvectors from the eigendecomposition of the relationship matrix.

Evalue

A vector which contains the eigenvalues of n individuals from the eigendecomposition of the relationship matrix.

Value

A list contains variance components

$Ve

An estimate of residual variance.

$Vu

An estimate of additive genetic variance.

Author(s)

Haipeng Yu and Gota Morota

Maintainer: Haipeng Yu haipengyu@vt.edu

Examples

 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 = 'mean', 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

HaipengU/GCA_r documentation built on July 3, 2019, 11:30 a.m.