-
Notifications
You must be signed in to change notification settings - Fork 20
Description
I noticed a discrepancy between the MET PCA plot and an AMMI2 plot, though they appear to both be using 2 PCAs for plotting G x E. Here is the R code I used for the AMMI2 plot and data is attached. Why are the results between MET PCA and AMMI2 so different?
setwd("Y:/_OilSeedCrops/Camelina/2024-25_Field_Data/2024-25_Cam_Seed_Yield&_Full_Data/DataAnalysi11Feb2026")
Loc5Geno4CamData <- read.csv("2024-25YldCombinedData11Feb26.csv")
Loc5Geno4CamData$Genotype.Name <- as.factor(Loc5Geno4CamData$Genotype.Name)
Loc5Geno4CamData$Location <- as.factor(Loc5Geno4CamData$Location)
Loc5Geno4CamData$Rep <- as.factor(Loc5Geno4CamData$Rep)
library(agricolae)
model<- with(Loc5Geno4CamData,AMMI(Location, GEN=Genotype.Name, Rep, oil.yield.kg.ha, console=FALSE))
summary(model)
model$ANOVA
model$means
model$analysis
model$genXenv
see help(plot.AMMI)
#Set wider plot margins
par(mar=c(6,4,4,4))
par(mgp = c(2, 1, 0))
biplot
plot(model, number=T, ylim=c(-10,10), xlim=c(-11, 11))
par(new=TRUE)
title("AMMI2 GxE Plot Camelina PYT 2024-25", line = 1)
#Allows for plotting in the margins.
par(xpd=T)
legend("bottom", inset=c(-0.6, -1.1), c("1=PI650163-1", "2=Joelle", "3=CMN2207", "4=PI650168"), fill = c("blue","blue","blue","blue"), density = c(700, 700), bty='n', x.intersp = 0.1, ncol=2)
2024-25YldCombinedData11Feb26.csv