Calculate standard heritability from model object
H2_Standard.RdCompute standard heritability using the classic ratio method of genotypic and phenotypic variance. See Falconer & Mackay (1996)
Details
The equation used to calculate standard heritability is: $$H^2_{Standard} = \frac{\sigma^2_g}{\sigma^2_g + \frac{1}{n_g}\sum_{n_g}^{i=1} \sigma^2_p / n_{gi}}$$ where:
\(n_g\) is the number of genotypes
\(n_{gi}\) is the number of replicate for a given genotype i
\(\sigma_g\) is the variance attributed to genotype differences
\(\sigma_p\) is the variance attributed to phenotypic differences
References
Falconer, D. S., & Mackay, T. F. C. (1996). Introduction to quantitative genetics (4th ed.). Longman.
Examples
# lme4 model
lettuce_subset <- lettuce_phenotypes |> subset(loc == "L2")
lettuce_lme4 <- lme4::lmer(y ~ rep + (1 | gen), data = lettuce_subset)
H2_Standard(lettuce_lme4, target = "gen")
#> [1] 0.8294971
# asreml model (Requires license)
if (FALSE) { # \dontrun{
lettuce_asreml <- asreml::asreml(fixed = y ~ rep,
random = ~ gen,
data = lettuce_subset,
trace = FALSE
)
H2_Standard(lettuce_asreml, target = "gen")
} # }