| Title: | Heritability Estimation from Mixed Models |
|---|---|
| Description: | Reporting heritability estimates is an important to quantitative genetics studies and breeding experiments. Here we provide functions to calculate various broad-sense heritabilities from 'asreml' and 'lme4' model objects. All methods we have implemented in this package have extensively discussed in the article by Schmidt et al. (2019) <doi:10.1534/genetics.119.302134>. |
| Authors: | Fonti Kar [aut, ctb] (ORCID: <https://orcid.org/0000-0002-2760-3974>), Yidi Deng [aut, ctb] (ORCID: <https://orcid.org/0000-0003-0380-2124>), Emi Tanaka [cre, aut, cph] (ORCID: <https://orcid.org/0000-0002-1455-259X>) |
| Maintainer: | Emi Tanaka <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 0.1.0 |
| Built: | 2026-06-10 10:20:33 UTC |
| Source: | https://github.com/anu-aagi/heritable |
Simulate according to the current asreml fit
and then refit to obtain the targeted statistics.
bootstrap_asreml(model, FUN, nsim = 1, use.u = FALSE, seed = NULL, ...)bootstrap_asreml(model, FUN, nsim = 1, use.u = FALSE, seed = NULL, ...)
model |
An |
FUN |
A function with signature |
nsim |
Integer. Number of bootstrap replicates. |
use.u |
A logical indicating whether to resample random effects, or only resample residuals. |
seed |
Optional integer seed for reproducibility. |
... |
Additional arguments passed to |
Fits parametric bootstrap replicates for an asreml model by:
Extracting the fixed-effect fit yhat = X * beta.
Extracting V = Var(y) on the observation scale,
Simulating new responses y* = yhat + L %*% z where L is a Cholesky factor of V,
Refitting the same asreml call on each simulated dataset,
Returning a boot object.
A boot object.
## Not run: lettuce_subset <- lettuce_phenotypes |> subset(loc == "L2") lettuce_asreml <- asreml( fixed = y ~ rep * pseudo_var1, random = ~gen, sparse = ~pseudo_var2, data = lettuce_subset, trace = FALSE ) b <- bootstrap_asreml( lettuce_asreml, R = 200, statistic = function(fit) coef(fit)$fixed["(Intercept)", "effect"], seed = 1 ) boot::boot.ci(b, type = "perc") ## End(Not run)## Not run: lettuce_subset <- lettuce_phenotypes |> subset(loc == "L2") lettuce_asreml <- asreml( fixed = y ~ rep * pseudo_var1, random = ~gen, sparse = ~pseudo_var2, data = lettuce_subset, trace = FALSE ) b <- bootstrap_asreml( lettuce_asreml, R = 200, statistic = function(fit) coef(fit)$fixed["(Intercept)", "effect"], seed = 1 ) boot::boot.ci(b, type = "perc") ## End(Not run)
Computes a confidence interval for a heritability estimate using parametric bootstrap of the underlying mixed model.
## S3 method for class 'heritable' confint( object, parm = NULL, level = 0.95, B = 100, random_effect = c("resample", "conditional"), type = c("basic", "norm", "perc"), return_model = TRUE, seed = NULL, ... )## S3 method for class 'heritable' confint( object, parm = NULL, level = 0.95, B = 100, random_effect = c("resample", "conditional"), type = c("basic", "norm", "perc"), return_model = TRUE, seed = NULL, ... )
object |
A heritability object returned by |
parm |
a specification of which parameters are to be given confidence intervals, either a vector of numbers or a vector of names. If missing, all parameters are considered. |
level |
Confidence level. |
B |
Integer. Number of bootstrap replicates. |
random_effect |
Character. Strategy for handling random effects.
|
type |
Character. Bootstrap interval type; one of |
return_model |
Logical. Whether to return to the |
seed |
Optional random seed. |
... |
Additional arguments passed to the bootstrap routine. |
A matrix of confidence intervals.
## Not run: lettuce_subset <- lettuce_phenotypes |> subset(loc == "L2") lettuce_asreml <- asreml( fixed = y ~ rep * pseudo_var1, random = ~gen, sparse = ~pseudo_var2, data = lettuce_subset, trace = FALSE ) my_H2 <- H2(lettuce_asreml, "gen", c("Cullis", "Standard")) confint(my_H2) ## End(Not run)## Not run: lettuce_subset <- lettuce_phenotypes |> subset(loc == "L2") lettuce_asreml <- asreml( fixed = y ~ rep * pseudo_var1, random = ~gen, sparse = ~pseudo_var2, data = lettuce_subset, trace = FALSE ) my_H2 <- H2(lettuce_asreml, "gen", c("Cullis", "Standard")) confint(my_H2) ## End(Not run)
Returns the fitted values based on fixed effects only
(), excluding all random effects.
get_fixed_fit_asreml(model)get_fixed_fit_asreml(model)
model |
An object of class |
This function reconstructs the fixed-effect design matrix from the stored model frame and multiplies it by the estimated fixed coefficients. Sparse fixed terms (if any) are included.
Random effects (BLUPs) are not included.
A numeric vector of length , giving the fixed-effects-only
fitted value for each observation.
A case-specific wrapper for calculating heritability.
The upper case prefix H2_ refers to the wrapper or subfunctions e.g. H2_Delta() for calculating broad sense heritability
H2(model, target, method = c("Cullis", "Oakey", "Delta", "Piepho", "Standard"), options = NULL, ... )H2(model, target, method = c("Cullis", "Oakey", "Delta", "Piepho", "Standard"), options = NULL, ... )
model |
Model object of class |
target |
The name of the random effect for which heritability is to be calculated. |
method |
Character vector of name of method to calculate heritability. See details. |
options |
NULL by default, for internal checking of model object before calculations. |
... |
Additional arguments that specify heritability calculation when interactions with genotype effects are modelled. |
The following methods are currently implemented for broad-sense heritability H2(method = "XX"):
"Cullis":
"Oakey":
"Delta":
"Piepho":
"Standard":
For further details of a specific method - take a look at help file for each subfunctions ?H2_Cullis
A named numeric vector, length matching number of methods supplied
Cullis, B. R., Smith, A. B., & Coombes, N. E. (2006). On the design of early generation variety trials with correlated data. Journal of Agricultural, Biological, and Environmental Statistics, 11(4), 381–393. https://doi.org/10.1198/108571106X154443
Oakey, H., Verbyla, A., Pitchford, W., Cullis, B., & Kuchel, H. (2006). Joint modeling of additive and non-additive genetic line effects in single field trials. Theoretical and Applied Genetics, 113(5), 809–819. https://doi.org/10.1007/s00122-006-0333-z
Schmidt, P., Hartung, J., Rath, J., & Piepho, H.-P. (2019). Estimating Broad-Sense Heritability with Unbalanced Data from Agricultural Cultivar Trials. Crop Science, 59(2), 525–536. https://doi.org/10.2135/cropsci2018.06.0376
Piepho, H.-P., & Möhring, J. (2007). Computing Heritability and Selection Response From Unbalanced Plant Breeding Trials. Genetics, 177(3), 1881–1888. https://doi.org/10.1534/genetics.107.074229
Falconer, D. S., & Mackay, T. F. C. (1996). Introduction to quantitative genetics (4th ed.). Longman.
H2_Cullis(), H2_Oakey(), H2_Delta(), H2_Piepho(), H2_Standard()
# lme4 model lettuce_subset <- lettuce_phenotypes |> subset(loc == "L2") lettuce_lme4 <- lme4::lmer(y ~ rep + (1 | gen), data = lettuce_subset) H2(lettuce_lme4, target = "gen", method = c("Standard", "Delta")) # asreml model (Requires license) ## Not run: lettuce_asreml <- asreml::asreml(fixed = y ~ rep, random = ~ gen, data = lettuce_subset, trace = FALSE ) H2(lettuce_asreml, target = "gen", method = c("Standard", "Delta")) ## End(Not run)# lme4 model lettuce_subset <- lettuce_phenotypes |> subset(loc == "L2") lettuce_lme4 <- lme4::lmer(y ~ rep + (1 | gen), data = lettuce_subset) H2(lettuce_lme4, target = "gen", method = c("Standard", "Delta")) # asreml model (Requires license) ## Not run: lettuce_asreml <- asreml::asreml(fixed = y ~ rep, random = ~ gen, data = lettuce_subset, trace = FALSE ) H2(lettuce_asreml, target = "gen", method = c("Standard", "Delta")) ## End(Not run)
Compute "generalised heritability" for unbalanced experimental designs. See Cullis, Smith and Coombes (2006) for derivation.
H2_Cullis(model, target, options, ...)H2_Cullis(model, target, options, ...)
model |
Model object of class |
target |
The name of the random effect for which heritability is to be calculated. |
options |
NULL by default, for internal checking of model object before calculations. |
... |
Additional arguments that specify heritability calculation when interactions with genotype effects are modelled. |
The equation for Cullis heritability is as follow
where:
is the prediction error variance matrix of the pairwise differences among BLUPS
is the variance attributed to differences between genotype
Numeric value
Cullis, B. R., Smith, A. B., & Coombes, N. E. (2006). On the design of early generation variety trials with correlated data. Journal of Agricultural, Biological, and Environmental Statistics, 11(4), 381–393. https://doi.org/10.1198/108571106X154443
# lme4 model lettuce_subset <- lettuce_phenotypes |> subset(loc == "L2") lettuce_lme4 <- lme4::lmer(y ~ rep + (1 | gen), data = lettuce_subset) H2_Cullis(lettuce_lme4, target = "gen") # asreml model (Requires license) ## Not run: lettuce_asreml <- asreml::asreml(fixed = y ~ rep, random = ~ gen, data = lettuce_subset, trace = FALSE ) H2_Cullis(lettuce_asreml, target = "gen") ## End(Not run)# lme4 model lettuce_subset <- lettuce_phenotypes |> subset(loc == "L2") lettuce_lme4 <- lme4::lmer(y ~ rep + (1 | gen), data = lettuce_subset) H2_Cullis(lettuce_lme4, target = "gen") # asreml model (Requires license) ## Not run: lettuce_asreml <- asreml::asreml(fixed = y ~ rep, random = ~ gen, data = lettuce_subset, trace = FALSE ) H2_Cullis(lettuce_asreml, target = "gen") ## End(Not run)
Compute the Cullis heritability for genotype means using the average variance of pairwise differences of best linear unbiased predictors (BLUPs).
H2_Cullis_parameters(vd_BLUP_avg, vc_g)H2_Cullis_parameters(vd_BLUP_avg, vc_g)
vd_BLUP_avg |
Numeric. Average variance of pairwise differences among BLUPs |
vc_g |
Numeric. Genotype variance component |
The equation for Cullis heritability is as follow
where:
is the prediction error variance matrix of the pairwise differences among BLUPS
is the variance attributed to differences between genotype
Numeric value
Cullis, B. R., Smith, A. B., & Coombes, N. E. (2006). On the design of early generation variety trials with correlated data. Journal of Agricultural, Biological, and Environmental Statistics, 11(4), 381–393. https://doi.org/10.1198/108571106X154443
H2_Cullis_parameters(vd_BLUP_avg = 0.25, vc_g = 0.8)H2_Cullis_parameters(vd_BLUP_avg = 0.25, vc_g = 0.8)
Instead of computing heritability on a "entry-mean" basis, this method
calculates heritability using "entry-differences". Entry here is
referring to the genotype, line or variety of interest. See
reference for origin and interpretation of H2_Delta and it's variants
H2_Delta(model, target, type = c("BLUP", "BLUE"), aggregate = c("arithmetic", "harmonic"), options, ... )H2_Delta(model, target, type = c("BLUP", "BLUE"), aggregate = c("arithmetic", "harmonic"), options, ... )
model |
Model object of class |
target |
The name of the random effect for which heritability is to be calculated. |
type |
character, whether heritability is calculated using BLUEs or BLUPs |
aggregate |
character, when taking means in the calculation, should harmonic or arithmetic mean be used? |
options |
NULL by default, for internal checking of model object before calculations |
... |
Additional arguments that specify heritability calculation when interactions with genotype effects are modelled. |
The heritability of differences between genotypes is given by:
where:
is the mean of the prediction error variance matrix for the pairwise differences among BLUPs (BLUEs if method = "BLUE") across all genotypes
is the variance attributed to differences between genotype
See reference page 995 - 997 for full derivation of this heritability measure and related variants
Numeric
Schmidt, P., Hartung, J., Rath, J., & Piepho, H.-P. (2019). Estimating Broad-Sense Heritability with Unbalanced Data from Agricultural Cultivar Trials. Crop Science, 59(2), 525–536. https://doi.org/10.2135/cropsci2018.06.0376
H2_Delta_by_genotype(), H2_Delta_pairwise()
# lme4 model lettuce_subset <- lettuce_phenotypes |> subset(loc == "L2") lettuce_lme4 <- lme4::lmer(y ~ rep + (1 | gen), data = lettuce_subset) H2_Delta(lettuce_lme4, target = "gen", type = "BLUP") # asreml model (Requires license) ## Not run: lettuce_asreml <- asreml::asreml(fixed = y ~ rep, random = ~ gen, data = lettuce_subset, trace = FALSE ) H2_Delta(lettuce_asreml, target = "gen", type = "BLUP") ## End(Not run)# lme4 model lettuce_subset <- lettuce_phenotypes |> subset(loc == "L2") lettuce_lme4 <- lme4::lmer(y ~ rep + (1 | gen), data = lettuce_subset) H2_Delta(lettuce_lme4, target = "gen", type = "BLUP") # asreml model (Requires license) ## Not run: lettuce_asreml <- asreml::asreml(fixed = y ~ rep, random = ~ gen, data = lettuce_subset, trace = FALSE ) H2_Delta(lettuce_asreml, target = "gen", type = "BLUP") ## End(Not run)
Instead of computing heritability on a "entry-mean" basis, this method
calculates heritability using "entry-differences". Entry here is
referring to the genotype, line or variety of interest. See
reference for origin and interpretation of h2/H2_Delta_by_genotype and it's variants
H2_Delta_by_genotype(model, target, type = c("BLUP", "BLUE"), options, ...)H2_Delta_by_genotype(model, target, type = c("BLUP", "BLUE"), options, ...)
model |
Model object of class |
target |
The name of the random effect for which heritability is to be calculated. |
type |
character, whether heritability is calculated using BLUEs or BLUPs |
options |
NULL by default, for internal checking of model object before calculations |
... |
Additional arguments that specify heritability calculation when interactions with genotype effects are modelled. |
The heritability of differences for a given genotype is given by:
where:
is the arithmetic mean of the prediction error variance matrix for pairwise differences among BLUPs (or BLUEs if method = "BLUE") for a given genotype
is the variance attributed to differences between genotype
See reference page 995 - 997 for full derivation of this heritability measure and related variants
Numeric
Named list, with each element containing a named numeric vector
Schmidt, P., Hartung, J., Rath, J., & Piepho, H.-P. (2019). Estimating Broad-Sense Heritability with Unbalanced Data from Agricultural Cultivar Trials. Crop Science, 59(2), 525–536. https://doi.org/10.2135/cropsci2018.06.0376
H2_Delta(), H2_Delta_pairwise()
# lme4 model lettuce_subset <- lettuce_phenotypes |> subset(loc == "L2") lettuce_lme4 <- lme4::lmer(y ~ rep + (1 | gen), data = lettuce_subset) H2_Delta_by_genotype(lettuce_lme4, target = "gen", type = "BLUP") # asreml model (Requires license) ## Not run: lettuce_asreml <- asreml::asreml(fixed = y ~ rep, random = ~ gen, data = lettuce_subset, trace = FALSE ) H2_Delta_by_genotype(lettuce_asreml, target = "gen", type = "BLUP") ## End(Not run)# lme4 model lettuce_subset <- lettuce_phenotypes |> subset(loc == "L2") lettuce_lme4 <- lme4::lmer(y ~ rep + (1 | gen), data = lettuce_subset) H2_Delta_by_genotype(lettuce_lme4, target = "gen", type = "BLUP") # asreml model (Requires license) ## Not run: lettuce_asreml <- asreml::asreml(fixed = y ~ rep, random = ~ gen, data = lettuce_subset, trace = FALSE ) H2_Delta_by_genotype(lettuce_asreml, target = "gen", type = "BLUP") ## End(Not run)
Instead of computing heritability on a "entry-mean" basis, this method
calculates heritability using "entry-differences". Entry here is
referring to the genotype, line or variety of interest. See
reference for origin and interpretation of h2/H2_Delta_pairwise and it's variants
H2_Delta_pairwise(model, target, type = c("BLUP", "BLUE"), options, ...)H2_Delta_pairwise(model, target, type = c("BLUP", "BLUE"), options, ...)
model |
Model object of class |
target |
The name of the random effect for which heritability is to be calculated. |
type |
character, whether heritability is calculated using BLUEs or BLUPs |
options |
NULL by default, for internal checking of model object before calculations |
... |
Additional arguments that specify heritability calculation when interactions with genotype effects are modelled. |
A dspMatrix
Schmidt, P., Hartung, J., Rath, J., & Piepho, H.-P. (2019). Estimating Broad-Sense Heritability with Unbalanced Data from Agricultural Cultivar Trials. Crop Science, 59(2), 525–536. https://doi.org/10.2135/cropsci2018.06.0376
H2_Delta_by_genotype(), H2_Delta()
# lme4 model lettuce_subset <- lettuce_phenotypes |> subset(loc == "L2") lettuce_lme4 <- lme4::lmer(y ~ rep + (1 | gen), data = lettuce_subset) H2_Delta_pairwise(lettuce_lme4, target = "gen", type = "BLUP") # asreml model (Requires license) ## Not run: lettuce_asreml <- asreml::asreml(fixed = y ~ rep, random = ~ gen, data = lettuce_subset, trace = FALSE ) H2_Delta_pairwise(lettuce_asreml, target = "gen", type = "BLUP") ## End(Not run)# lme4 model lettuce_subset <- lettuce_phenotypes |> subset(loc == "L2") lettuce_lme4 <- lme4::lmer(y ~ rep + (1 | gen), data = lettuce_subset) H2_Delta_pairwise(lettuce_lme4, target = "gen", type = "BLUP") # asreml model (Requires license) ## Not run: lettuce_asreml <- asreml::asreml(fixed = y ~ rep, random = ~ gen, data = lettuce_subset, trace = FALSE ) H2_Delta_pairwise(lettuce_asreml, target = "gen", type = "BLUP") ## End(Not run)
Compute broad-sense heritability of differences using the variance of differences between two BLUPs/BLUEs
h2_Delta_parameters(G_g, vd_matrix, type) H2_Delta_parameters(vc_g, vd_matrix, type)h2_Delta_parameters(G_g, vd_matrix, type) H2_Delta_parameters(vc_g, vd_matrix, type)
vc_g |
Numeric. Genotype variance component |
vd_matrix |
Matrix. Variance of pairwise differences among BLUES or BLUPs |
type |
Character. Either BLUES or BLUPS used to compute the variance of pairwise differences. |
G_g |
Numeric. Genotypic variance-covariance matrix. |
See H2_Delta() and reference for full derivation
and equation for heritability Delta
Matrix of pairwise heritability of differences among BLUES or BLUPs
Schmidt, P., Hartung, J., Rath, J., & Piepho, H.-P. (2019). Estimating Broad-Sense Heritability with Unbalanced Data from Agricultural Cultivar Trials. Crop Science, 59(2), 525–536. https://doi.org/10.2135/cropsci2018.06.0376
h2_Delta_parameters(G_g = diag(0.15, 2, 2), vd_matrix = matrix(c(NA,0.2,0.2,NA),2,2), type = "BLUP") H2_Delta_parameters(vc_g = 0.01, vd_matrix = matrix(c(NA,0.2,0.2,NA),2,2), "BLUE")h2_Delta_parameters(G_g = diag(0.15, 2, 2), vd_matrix = matrix(c(NA,0.2,0.2,NA),2,2), type = "BLUP") H2_Delta_parameters(vc_g = 0.01, vd_matrix = matrix(c(NA,0.2,0.2,NA),2,2), "BLUE")
Compute heritability for genotype means using the variance–covariance matrix of the genotype BLUPs as described by Oakey et al. (2006).
H2_Oakey(model, target, options, ...)H2_Oakey(model, target, options, ...)
model |
Model object of class |
target |
The name of the random effect for which heritability is to be calculated. |
options |
NULL by default, for internal checking of model object before calculations. |
... |
Additional arguments that specify heritability calculation when interactions with genotype effects are modelled. |
where:
is the number of genotypes
is the number of zero eigenvalues
is the ith eigenvalue of the matrix
is the variance attributed to differences between genotype
See pages 813 and 818 of the reference for full derivation and explanation for Oakey's heritability
Numeric
Oakey, H., Verbyla, A., Pitchford, W., Cullis, B., & Kuchel, H. (2006). Joint modeling of additive and non-additive genetic line effects in single field trials. Theoretical and Applied Genetics, 113(5), 809–819. https://doi.org/10.1007/s00122-006-0333-z
# lme4 model lettuce_subset <- lettuce_phenotypes |> subset(loc == "L2") lettuce_lme4 <- lme4::lmer(y ~ rep + (1 | gen), data = lettuce_subset) H2_Oakey(lettuce_lme4, target = "gen") # asreml model (Requires license) ## Not run: lettuce_asreml <- asreml::asreml(fixed = y ~ rep, random = ~ gen, data = lettuce_subset, trace = FALSE ) H2_Oakey(lettuce_asreml, target = "gen") ## End(Not run)# lme4 model lettuce_subset <- lettuce_phenotypes |> subset(loc == "L2") lettuce_lme4 <- lme4::lmer(y ~ rep + (1 | gen), data = lettuce_subset) H2_Oakey(lettuce_lme4, target = "gen") # asreml model (Requires license) ## Not run: lettuce_asreml <- asreml::asreml(fixed = y ~ rep, random = ~ gen, data = lettuce_subset, trace = FALSE ) H2_Oakey(lettuce_asreml, target = "gen") ## End(Not run)
Rather than providing a model object, supply the necessary components to compute this heritability measure.
H2_Oakey_parameters(Gg_inv, C22_g)H2_Oakey_parameters(Gg_inv, C22_g)
Gg_inv |
The inverse of the genotypic variance-covariance matrix. |
C22_g |
Prediction error variance matrix associated with the genotype effects. |
Numeric value
Gg_inv = diag(1/0.15, 3, 3) C22_g <- matrix( c( 0.08, 0.01, 0.00, 0.01, 0.07, 0.01, 0.00, 0.01, 0.09 ), nrow = 3, byrow = TRUE ) H2_Oakey_parameters(Gg_inv, C22_g)Gg_inv = diag(1/0.15, 3, 3) C22_g <- matrix( c( 0.08, 0.01, 0.00, 0.01, 0.07, 0.01, 0.00, 0.01, 0.09 ), nrow = 3, byrow = TRUE ) H2_Oakey_parameters(Gg_inv, C22_g)
Calculate Piepho's heritability from model object Compute Piepho's heritability using variance differences between genotype BLUEs
H2_Piepho(model, target, options, ...)H2_Piepho(model, target, options, ...)
model |
Model object of class |
target |
The name of the random effect for which heritability is to be calculated. |
options |
NULL by default, for internal checking of model object before calculations. |
... |
Additional arguments that specify heritability calculation when interactions with genotype effects are modelled. |
The equation for Piepho's heritability is as follows:
where:
is the prediction error variance matrix for genotype BLUEs
is the variance attributed to differences between genotype
See reference for full derivation and details.
Numeric
Piepho, H.-P., & Möhring, J. (2007). Computing Heritability and Selection Response From Unbalanced Plant Breeding Trials. Genetics, 177(3), 1881–1888. https://doi.org/10.1534/genetics.107.074229
# lme4 model lettuce_subset <- lettuce_phenotypes |> subset(loc == "L2") lettuce_lme4 <- lme4::lmer(y ~ rep + (1 | gen), data = lettuce_subset) H2_Piepho(lettuce_lme4, target = "gen") # asreml model (Requires license) ## Not run: lettuce_asreml <- asreml::asreml(fixed = y ~ rep, random = ~ gen, data = lettuce_subset, trace = FALSE ) H2_Piepho(lettuce_asreml, target = "gen") ## End(Not run)# lme4 model lettuce_subset <- lettuce_phenotypes |> subset(loc == "L2") lettuce_lme4 <- lme4::lmer(y ~ rep + (1 | gen), data = lettuce_subset) H2_Piepho(lettuce_lme4, target = "gen") # asreml model (Requires license) ## Not run: lettuce_asreml <- asreml::asreml(fixed = y ~ rep, random = ~ gen, data = lettuce_subset, trace = FALSE ) H2_Piepho(lettuce_asreml, target = "gen") ## End(Not run)
Compute Piepho's heritability using the variance of differences between two BLUES.
H2_Piepho_parameters(vc_g, vd_BLUE_avg)H2_Piepho_parameters(vc_g, vd_BLUE_avg)
vc_g |
Numeric. Genotype variance component |
vd_BLUE_avg |
Numeric. Mean variance of pairwise differences among BLUES |
The equation for Piepho's heritability is as follows:
where:
is the prediction error variance matrix for genotype BLUEs
is the variance attributed to differences between genotype
Numeric value
Piepho, H.-P., & Möhring, J. (2007). Computing Heritability and Selection Response From Unbalanced Plant Breeding Trials. Genetics, 177(3), 1881–1888. https://doi.org/10.1534/genetics.107.074229
H2_Piepho_parameters(vc_g = 0.25, vd_BLUE_avg = 0.68)H2_Piepho_parameters(vc_g = 0.25, vd_BLUE_avg = 0.68)
Compute standard heritability using the classic ratio method of genotypic and phenotypic variance. See Falconer & Mackay (1996)
H2_Standard(model, target, options, ...)H2_Standard(model, target, options, ...)
model |
Model object of class |
target |
The name of the random effect for which heritability is to be calculated. |
options |
NULL by default, for internal checking of model object before calculations. |
... |
Additional arguments that specify heritability calculation when interactions with genotype effects are modelled. |
The equation used to calculate standard heritability is:
where:
is the number of genotypes
is the number of replicate for a given genotype i
is the variance attributed to genotype differences
is the variance attributed to phenotypic differences
Numeric value
Falconer, D. S., & Mackay, T. F. C. (1996). Introduction to quantitative genetics (4th ed.). Longman.
# 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") # asreml model (Requires license) ## Not run: lettuce_asreml <- asreml::asreml(fixed = y ~ rep, random = ~ gen, data = lettuce_subset, trace = FALSE ) H2_Standard(lettuce_asreml, target = "gen") ## End(Not run)# 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") # asreml model (Requires license) ## Not run: lettuce_asreml <- asreml::asreml(fixed = y ~ rep, random = ~ gen, data = lettuce_subset, trace = FALSE ) H2_Standard(lettuce_asreml, target = "gen") ## End(Not run)
Compute Standard heritability for genotype means using the variance components of genotype and residuals.
H2_Standard_parameters(vc_g, vc_e, n_r = 1)H2_Standard_parameters(vc_g, vc_e, n_r = 1)
vc_g |
Numeric. Genotype variance component |
vc_e |
Numeric. Residuals variance component |
n_r |
A numeric vector of size n_g, the number of genotype replicates. |
The equation for Standard heritability is as follows:
where:
is the number of genotypes
is the number of replicate for a given genotype i
is the variance attributed to genotype differences
is the variance attributed to phenotypic differences
Numeric value
Falconer, D. S., & Mackay, T. F. C. (1996). Introduction to quantitative genetics (4th ed.). Longman.
H2_Standard_parameters(vc_g = 0.25, vc_e = 0.8)H2_Standard_parameters(vc_g = 0.25, vc_e = 0.8)
Molecular marker data and genomic relatedness matrix of 89 lettuce varieties
lettuce_markers lettuce_GRMlettuce_markers lettuce_GRM
lettuce_markersA data frame with 89 rows and 301 columns:
gen genotype identifier
300 genetic markers scored as -1, 0, 1 (see Details)
lettuce_GRMA matrix array with 89 rows and 89 columns where each row/column represents a genotype
The varieties were genotyped with a total of 300 markers
(i.e. 95 single nucleotide polymorphisms and 205 amplified fragment length
polymorphism markers, see Hayes et al. (2014) for more details of marker
matrix.
The biallelic marker for the ith genotype and the th marker with
alleles (i.e. the reference allele) and was coded as:
1 for ,
-1 for
0 for and
https://figshare.com/articles/dataset/Lettuce_trial_phenotypic_and_marker_data_/8299493
Hadasch, S., Simko, I., Hayes, R.J., Ogutu, J.O. and Piepho, H.-P. (2016), Comparing the Predictive Abilities of Phenotypic and Marker-Assisted Selection Methods in a Biparental Lettuce Population. The Plant Genome, 9: plantgenome2015.03.0014. doi:10.3835/plantgenome2015.03.0014
Hayes, R. J., Galeano, C. H., Luo, Y., Antonise, R., & Simko, I. (2014). Inheritance of Decay of Fresh-cut Lettuce in a Recombinant Inbred Line Population from ‘Salinas 88’ × ‘La Brillante’. Journal of the American Society for Horticultural Science, 139(4), 388–398. doi:10.21273/JASHS.139.4.388
89 lettuce varieties tested at three environments, each laid out as a randomized complete block design. The measured trait was resistance to downy mildew scored on a scale ranging from 0 to 5.
lettuce_phenotypeslettuce_phenotypes
lettuce_phenotypesA data frame with 703 rows and 4 columns:
loc environment identifier
gen genotype identifier
rep replicate identifier
y resistance to downy mildew scored on a scale ranging from 0 to 5
https://figshare.com/articles/dataset/Lettuce_trial_phenotypic_and_marker_data_/8299493
Hadasch, S., Simko, I., Hayes, R.J., Ogutu, J.O. and Piepho, H.-P. (2016), Comparing the Predictive Abilities of Phenotypic and Marker-Assisted Selection Methods in a Biparental Lettuce Population. The Plant Genome, 9: plantgenome2015.03.0014. doi:10.3835/plantgenome2015.03.0014
Hayes, R. J., Galeano, C. H., Luo, Y., Antonise, R., & Simko, I. (2014). Inheritance of Decay of Fresh-cut Lettuce in a Recombinant Inbred Line Population from ‘Salinas 88’ × ‘La Brillante’. Journal of the American Society for Horticultural Science, 139(4), 388–398. doi:10.21273/JASHS.139.4.388
Molecular markers data and genomic relatedness matrix of Australian lizards
lizard_markers lizard_GRMlizard_markers lizard_GRM
lizard_markersA data frame with 261 rows and 8438 columns:
gen individual identifier, equivalent to liz_id in lizard_phenotypes
8437 genetic markers scored as 0, 2, 1 (see Details)
lizard_GRMA matrix array with 261 rows and 261 columns where each row/column represents a genotype
See ?snpReady::G.matrix for how GRM was computed.
The biallelic marker for the ith genotype and the th marker with
alleles (i.e. the reference allele) and was coded as:
0 for ,
1 for and
2 for
https://osf.io/hjkxd/?view_only=12a6b6010567474fac9fecd54472aa3d
Kar, F., Nakagawa, S. and Noble, D.W.A. (2024) “Heritability and developmental plasticity of growth in an oviparous lizard,” Heredity, 132(2), pp. 67–76. Available at: https://doi.org/10.1038/s41437-023-00660-3.
Phenotypic data for Australian lizards (L. delicata). Lizard eggs were incubated at two different incubation treatment temperatures. Lizards were weighed to investigate differences in growth between treatments.
lizard_phenotypeslizard_phenotypes
lizard_phenotypesA data frame with 3928 rows and 9 columns:
liz_id individual identifier, equivalent to gen in lizard_markers 261 individuals
treatment temperature (degrees celcius) at which lizard eggs were incubated
dam_id dam identifier
sire_id sire identifer
mass mass of lizard in
ln_mass natural log mass
days_since_hatch days since hatching (age)
z_days_since_hatch scaled and centered days_since_hatch see ?scale()
z_days_since_hatch_i2 squared z_days_since_hatch see Kar et al 2024 to see details on their analysis
https://osf.io/hjkxd/?view_only=12a6b6010567474fac9fecd54472aa3d
Kar, F., Nakagawa, S. and Noble, D.W.A. (2024) “Heritability and developmental plasticity of growth in an oviparous lizard,” Heredity, 132(2), pp. 67–76. Available at: https://doi.org/10.1038/s41437-023-00660-3.