Learn R Programming

agridat (version 1.12)

vargas.txe: Treatment x environment interaction in agronomy trials

Description

Treatment x environment interaction in agronomy trials

Arguments

Format

A list of two matrices, yields and covs. See details below.

Details

The yield matrix contains grain yields (kg/ha) of 24 treatments over 10 years. Treatment names indicate:

T deep knife
t no deep knife
S sesbania
s soybean
M chicken manure
m no chicken manure
0 no nitrogen
n 100 kg/ha nitrogen
N 200 kg/ha nitrogen

The covs matrix contains environmental covariates for each year. The names of the covariates indicate:

MT mean maximum temperature sheltered
mT mean minimum temperature sheltered
mTU mean minimum temperature unsheltered
PR total monthly precipitation
SH sun hours per day
EV total monthly evaporation
D December
J January
F February
M March
A April

Examples

Run this code
# NOT RUN {
data(vargas.txe)

require(lattice)
levelplot(vargas.txe$yields, col.regions=RedGrayBlue,
          main="vargas.txe", xlab="year", ylab="treatment")

Z <- vargas.txe$yields
Z <- sweep(Z, 1, rowMeans(Z))
Z <- sweep(Z, 2, colMeans(Z)) # Double-centered like AMMI
# Vargas figure 1
biplot(prcomp(Z, scale.=FALSE), main="vargas.txe")

# }
# NOT RUN {
  # Now, PLS relating the two matrices
  U <- vargas.txe$covs
  U <- scale(U) # Standardized covariates
  require(pls)
  m1 <- plsr(Z~U)
  # Vargas Fig 2, flipped vertical/horizontal
  biplot(m1, which="x", var.axes=TRUE)

# }
# NOT RUN {
# }

Run the code above in your browser using DataLab