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

library("masreml")

fit <- masreml(y, markers = list(snp_add = W))
varcomp(fit)
#   Component   Sigma2     H2 Proportion
#     snp_add 0.412300 0.4123     0.4123
#    residual 0.587700     NA     0.5877