gxeVarCov function

Selects the best variance-covariance model for a set of trials

Selects the best variance-covariance model for a set of trials

This function selects the best covariance structure for genetic correlations between trials. It fits a range of variance-covariance models (identity, compound symmetry (cs), diagonal, simple correlation with heterogeneous variance (outside), heterogeneous compound symmetry (hcs), first order factor analytic (fa), second order factor analytic (fa2) and unstructured), and selects the best one using a goodness-of-fit criterion. See details for the exact models fitted.

gxeVarCov( TD, trials = names(TD), trait, models = c("identity", "cs", "diagonal", "hcs", "outside", "fa", "fa2", "unstructured"), engine = c("lme4", "asreml"), criterion = c("BIC", "AIC"), ... )

Arguments

  • TD: An object of class TD.
  • trials: A character string specifying the trials to be analyzed. If not supplied, all trials are used in the analysis.
  • trait: A character string specifying the trait to be analyzed.
  • models: A character vector specifying the models to be fitted.
  • engine: A character string specifying the engine used for modeling. Either "lme4" or "asreml".
  • criterion: A string specifying a goodness-of-fit criterion. Either "AIC" or "BIC".
  • ...: Further arguments to be passed to the modeling engine.

Returns

An object of class varCov, a list object containing: - STA: An object of class STA containing the best fitted model.

  • choice: A character string indicating the best fitted model.

  • summary: A data.frame with a summary of the fitted models.

  • vcov: The covariance matrix of the best fitted model.

  • criterion: A character string indicating the goodness-of-fit criterion used for determining the best model, either "AIC" or "BIC".

  • engine: A character string containing the engine used for the analysis.

  • trait: A character string containing the trait analyzed.

  • dat: A data.frame with the full data set used for the analysis.

Details

The models fitted are of the form yij=μj+ϵijy_{ij} = \mu_j + \epsilon_{ij}, where yijy_{ij} is the phenotypic value of genotype ii in environment jj, μj\mu_j

is the environmental mean, and ϵij\epsilon_{ij} represents mainly genetic variation, although some non-genetic variation may be included as well. The random term ϵij\epsilon_{ij} is modeled in eight ways as described in the table below.

ModelDescriptionvar( gijg_{ij} )cov( gijg_{ij} ; gikg_{ik} )Number of parameters
identityidentityσG2\sigma_G^201
cscompound symmetryσG2+σGE2\sigma_G^2+\sigma_{GE}^2σGE2\sigma_{GE}^22
diagonaldiagonal matrix (heteroscedastic)σGEj2\sigma_{GE_j}^20JJ
hcsheterogeneous compound symmetryσG2+σGEj2\sigma_G^2+\sigma_{GE_j}^2σG2\sigma_G^2J+1J+1
outsideheterogeneity outsideσGj2\sigma_{G_j}^2θ\thetaJ+1J+1
fafirst order factor analyticλ1j2+σGEj2\lambda_{1j}^2+\sigma_{GE_j}^2λ1jλ1k\lambda_{1j}\lambda_{1k}2J2J
fa2second order factor analyticλ1j2+λ2j2+σGEj2\lambda_{1j}^2+\lambda_{2j}^2+\sigma_{GE_j}^2λ1jλ1k+λ2jλ2k\lambda_{1j}\lambda_{1k}+\lambda_{2j}\lambda_{2k}3J13J-1
unstructuredunstructuredσGj2\sigma_{G_j}^2σGj,k2\sigma_{G_{j,k}}^2J(J+1)/2J(J+1)/2

In this table JJ is the number of environments, σG2\sigma_G^2 the variance component for the genotype main effects, σGE2\sigma_{GE}^2 the variance component for GxE interactions. σGj2\sigma_{G_j}^2 and σGEj2\sigma_{GE_j}^2 are the environment specific variance components for the genotype main effects and GxE interaction in environment jj. σGj,k2\sigma_{G_{j,k}}^2 is the genetic covariance between environments jj and kk. θ\theta is the common correlation between environments and λ1j\lambda_{1j} and λ2j\lambda_{2j} are environment specific multiplicative parameters.

Note

If engine = "lme4", only the compound symmetry model can be fitted.

Examples

## Select the best variance-covariance model using lme4 for modeling. geVarCov <- gxeVarCov(TD = TDMaize, trait = "yld") ## Summarize results. summary(geVarCov) ## Create a pdf report summarizing the results. report(geVarCov, outfile = tempfile(fileext = ".pdf")) if (requireNamespace("asreml", quietly = TRUE)) { ## Select the best variance-covariance model using asreml for modeling. ## Use BIC as a goodness-of-fit criterion. geVarCov2 <- gxeVarCov(TD = TDMaize, trait = "yld", engine = "asreml", criterion = "BIC") summary(geVarCov2) ## Plot a heatmap of the correlation matrix for the best model. plot(geVarCov2) }

See Also

Other varCov: fitted.varCov(), plot.varCov(), report.varCov(), residuals.varCov()