gxeAmmi {statgenGxE} | R Documentation |
AMMI analysis
Description
The Additive Main Effects and Multiplicative Interaction (AMMI) model fits
a model which involves the Additive Main effects (i.e. genotype and trial)
along with Multiplicative Interaction effects. The additive effects are the
classical ANOVA main effects for genotype and environment, the
multiplicative effects follow from a principal component analysis on the
interaction residuals (= genotype by environment means after adjustment for
additive genotype and environment effects). This results in an interaction
characterized by Interaction Principal Components (IPCA) enabling
simultaneous plotting of genotypes and trials.
The parameter nPC
is used to indicate the number of principal
components that is used in the principal component analysis (PCA). By setting
this parameter to NULL
the algorithm determines the best number of
principal components (see Details).
By specifying the parameter byYear = TRUE
, a separate analysis will be
done for every year in the data. Combining the option with nPC = NULL
may result in different numbers of principal components per year. The AMMI
estimates will still be returned as a single data.frame, but the other
results will be either lists or arrays.
Usage
gxeAmmi(
TD,
trials = names(TD),
trait,
nPC = 2,
byYear = FALSE,
center = TRUE,
excludeGeno = NULL,
useWt = FALSE
)
Arguments
TD |
An object of class |
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. |
nPC |
An integer specifying the number of principal components used
as multiplicative term of genotype-by-trial interaction. If |
byYear |
Should the analysis be done by year? If |
center |
Should the variables be shifted to be zero centered? |
excludeGeno |
An optional character vector with names of genotypes to
be excluded from the analysis. If |
useWt |
Should weighting be used when modeling? Requires a column
|
Details
First a linear model trait = genotype + trial + \epsilon
is fitted with
both genotype and trial fixed components in the model.
The residuals from the fitted model are then used in a PCA. If nPC
is
not NULL
a single PCA is done using prcomp
with
maximum rank nPC
.
In case nPC = NULL
, the PCA is first done with one PC. Then using
forward selection one by one the number of PCs is increased as long as the
added component is significant in the analysis.
AMMI estimates are then computed using the results of the PCA.
Value
An object of class AMMI
, a list containing:
envScores |
A matrix with environmental scores. |
genoScores |
A matrix with genotypic scores. |
importance |
A data.frame containing the importance of the principal components. |
anova |
A data.frame containing anova scores of the AMMI analysis. |
fitted |
A data.frame containing fitted values from the AMMI model. |
trait |
A character string containing the analyzed trait. |
envMean |
A numerical vector containing the environmental means. |
genoMean |
A numerical vector containing the genotypic means. |
overallMean |
A numerical value containing the overall mean. |
If byYear
= TRUE
, all returned items in the AMMI object except
fitted
will consist of a list of results by year.
References
Gauch H.G. (1992) Statistical Analysis of Regional Yield Trials: AMMI Analysis of Factorial Designs. Elsevier, Amsterdam.
Yan, W., Kang, M. (2002). GGE Biplot Analysis. Boca Raton: CRC Press.
See Also
Other AMMI:
fitted.AMMI()
,
plot.AMMI()
,
report.AMMI()
,
residuals.AMMI()
Examples
## Run AMMI analysis on TDMaize.
geAmmi <- gxeAmmi(TD = TDMaize, trait = "yld")
## Summarize results.
summary(geAmmi)
## Create a biplot of genotypes and environment interaction with PC1 and PC2.
plot(geAmmi, plotType = "AMMI2")
## Create a pdf report summarizing the results.
report(geAmmi, outfile = tempfile(fileext = ".pdf"))