Learn R Programming

agricolae (version 1.2-0)

AMMI: AMMI Analysis

Description

Additive Main Effects and Multiplicative Interaction Models (AMMI) are widely used to analyze main effects and genotype by environment (GEN, ENV) interactions in multilocation variety trials. Furthermore, this function generates data to biplot, triplot graphs and analysis.

Usage

AMMI(ENV, GEN, REP, Y, MSE = 0,console=FALSE,PC=FALSE)

Arguments

ENV
Environment
GEN
Genotype
REP
Replication
Y
Response
MSE
Mean Square Error
console
ouput TRUE or FALSE
PC
Principal components ouput TRUE or FALSE

Value

  • ANOVAanalysis of variance general
  • genXenvclass by, genopyte and environment
  • analysisanalysis of variance principal components
  • meansaverage genotype and environment
  • biplotdata to produce graphics
  • PCclass princomp

Details

additional graphics see help(plot.AMMI).

References

GGE Biplot Analysis: A graphical tool for breeder, geneticists, and agronomists. Weikai Yan and Manjit S. Kang. www.crepress.com 2003, Principles and procedures of statistics: a biometrical approach Steel & Torry & Dickey. Third Edition 1997

See Also

lineXtester,plot.AMMI

Examples

Run this code
# Full replications
library(agricolae)
# triplot and influence genotype
require(klaR) # type=2
require(spdep) # type=3
# Example 1
data(plrv)
attach(plrv)
model<- AMMI(Locality, Genotype, Rep, Yield, console=FALSE)
model$ANOVA
# see help(plot.AMMI)
detach(plrv)
# biplot
plot(model)
# triplot PC 1,2,3 
plot(model, type=2, number=TRUE)
# biplot PC1 vs Yield 
plot(model, first=0,second=1, number=TRUE)
# Example 2
data(CIC)
data1<-CIC$comas[,c(1,6,7,17,18)]
data2<-CIC$oxapampa[,c(1,6,7,19,20)]
cic <- rbind(data1,data2)
attach(cic)
model<-AMMI(Locality, Genotype, Rep, relative)
detach(cic)
model$ANOVA
plot(model,0,1,angle=20,ecol="brown")
# Example 3
# Only means. Mean square error is well-known.
data(sinRepAmmi)
attach(sinRepAmmi)
REP <- 3
MSerror <- 93.24224
#startgraph
model<-AMMI(ENV, GEN, REP, YLD, MSerror,PC=TRUE)
detach(sinRepAmmi)
# print anova
print(model$ANOVA,na.print = "")
# Biplot with the one restored observed.
plot(model,0,1,type=1)
# with principal components model$PC is class "princomp" 
pc<- model$PC
pc$loadings
summary(pc)
biplot(pc)
# Principal components by means of the covariance similar AMMI
# It is to compare results with AMMI
cova<-cov(model$genXenv)
values<-eigen(cova)
total<-sum(values$values)
round(values$values*100/total,2)
# AMMI: 64.81 18.58 13.50  3.11  0.00

Run the code above in your browser using DataLab