AMMI                package:agricolae                R Documentation

_A_M_M_I _A_n_a_l_y_s_i_s

_D_e_s_c_r_i_p_t_i_o_n:

     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 biplot, triplot 
     graphs and analysis.

_U_s_a_g_e:

     AMMI(ENV, GEN, REP, Y, MSE = 0, number=TRUE,graph="biplot",...)

_A_r_g_u_m_e_n_t_s:

     ENV: Environment 

     GEN: Genotype 

     REP: Replication  

       Y: Response 

     MSE: Mean Square Error 

  number: TRUE or FALSE 

   graph: "biplot" or "triplot" 

     ...: plot graphics parameters 

_D_e_t_a_i_l_s:

     additional biplot.

_V_a_l_u_e:

    ENV : Factor

    GEN : Factor

    REP : Numeric

      Y : Numeric

    MSE : Numeric

  number: TRUE or FALSE 

   graph: "biplot" or "triplot" 

     ...: others parameters 

_A_u_t_h_o_r(_s):

     F. de Mendiburu

_R_e_f_e_r_e_n_c_e_s:

     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

_S_e_e _A_l_s_o:

     'lineXtester'

_E_x_a_m_p_l_e_s:

     # Full replications
     library(agricolae)
     library(klaR)
     # Example 1
     data(plrv)
     #startgraph
     # biplot
     model<- AMMI(plrv[,2], plrv[,1], plrv[,3], plrv[,5],graph="biplot")
     model<- AMMI(plrv[,2], plrv[,1], plrv[,3], plrv[,5],graph="biplot",number=FALSE)
     # triplot
     model<- AMMI(plrv[,2], plrv[,1], plrv[,3], plrv[,5],graph="triplot")
     model<- AMMI(plrv[,2], plrv[,1], plrv[,3], plrv[,5],graph="triplot",number=FALSE)
     #endgraph
     # 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)
     #startgraph
     par(cex=0.6)
     model<-AMMI(Locality, Genotype, Rep, relative,
     ylim=c(-1.5e-8,1.5e-8))
     #endgraph
     pc<- princomp(model$genXenv, cor = FALSE)
     pc$loadings
     summary(pc)
     model$biplot
     detach(cic)
     # 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)
     #endgraph
     pc<- princomp(model$genXenv, cor = FALSE)
     pc$loadings
     summary(pc)
     model$biplot
     detach(sinRepAmmi)
     # Biplot with the one restored observed.
     rm(REP)
     bplot<-model$biplot[,1:4]
     attach(bplot)
     #startgraph
     par(cex=0.8)
     plot(YLD,PC1,cex=0.0,text(YLD,PC1,labels=row.names(bplot),col="blue"),
      main="AMMI BIPLOT",frame=TRUE)
     MEANS<-mean(YLD)
     abline(h=0,v= MEANS,lty=2,col="red")
     amb<-subset(bplot,type=="ENV")
     detach(bplot)
     attach(amb)
     s <- seq(length(YLD))
     arrows(MEANS, 0, 0.9*(YLD[s]-MEANS)+MEANS, 0.9*PC1[s], col= "brown",
     lwd=1.8,length=0.1)
     #endgraph
     detach(amb)
     # Principal components by means of the covariance 
     # 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

