gxeVarCov {statgenGxE}R Documentation

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

Description

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.

Usage

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.

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.

Model Description var(gijg_{ij}) cov(gijg_{ij};gikg_{ik}) Number of parameters
identity identity σG2\sigma_G^2 0 1
cs compound symmetry σG2+σGE2\sigma_G^2+\sigma_{GE}^2 σGE2\sigma_{GE}^2 2
diagonal diagonal matrix (heteroscedastic) σGEj2\sigma_{GE_j}^2 0 JJ
hcs heterogeneous compound symmetry σG2+σGEj2\sigma_G^2+\sigma_{GE_j}^2 σG2\sigma_G^2 J+1J+1
outside heterogeneity outside σGj2\sigma_{G_j}^2 θ\theta J+1J+1
fa first order factor analytic λ1j2+σGEj2\lambda_{1j}^2+\sigma_{GE_j}^2 λ1jλ1k\lambda_{1j}\lambda_{1k} 2J2J
fa2 second 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
unstructured unstructured σGj2\sigma_{G_j}^2 σGj,k2\sigma_{G_{j,k}}^2 J(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.

Value

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.

Note

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

See Also

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

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)
  }



[Package statgenGxE version 1.0.8 Index]