Extract Variance Components

Extract Variance Components

Description

Extracts variance component estimates from a fitted masreml object into a tidy data.frame, showing heritability and proportion of total variance explained by each component.

Usage

varcomp(x)

Arguments

x object of class “masreml” from masreml() or gwablup().

Value

data.frame with columns:

  • Component: name of variance component (e.g. snp_add, mh_add, residual)

  • Sigma2: estimated variance component

  • H2: heritability (sigma2 / sigma2_total); NA for residual component

  • Proportion: proportion of total phenotypic variance

See Also

masreml, summary.masreml

Examples

Code
library("masreml")

d   <- load_data("small")
y   <- d$pheno$y_cont_qtl_snp; names(y) <- d$pheno$id
fit <- masreml(y, markers = list(snp_add = d$snp))
varcomp(fit)