wheat {gnm} | R Documentation |
Data from a 10-year experiment at the CIMMYT experimental station located in the Yaqui Valley near Ciudad Obregon, Sonora, Mexico — factorial design using 24 treatments in all. In each of the 10 years the experiment was arranged in a randomized complete block design with three replicates.
data(wheat)
A data frame with 240 observations on the following 33 variables.
1988:1997
T
t
S
s
M
m
0
N
n
Tables A1 and A3 of Vargas, M, Crossa, J, van Eeuwijk, F, Sayre, K D and Reynolds, M P (2001). Interpreting treatment by environment interaction in agronomy trials. Agronomy Journal 93, 949–960.
set.seed(1) data(wheat) ## Scale yields to reproduce analyses reported in Vargas et al (2001) yield.scaled <- wheat$yield * sqrt(3/1000) ## Reproduce (up to error caused by rounding) Table 1 of Vargas et al (2001) aov(yield.scaled ~ year*tillage*summerCrop*manure*N, data = wheat) treatment <- interaction(wheat$tillage, wheat$summerCrop, wheat$manure, wheat$N, sep = "") mainEffects <- lm(yield.scaled ~ year + treatment, data = wheat) svdStart <- residSVD(mainEffects, year, treatment, 3) bilinear1 <- update(asGnm(mainEffects), . ~ . + Mult(year, treatment), start = c(coef(mainEffects), svdStart[,1])) bilinear2 <- update(bilinear1, . ~ . + Mult(year, treatment, inst = 2), start = c(coef(bilinear1), svdStart[,2])) bilinear3 <- update(bilinear2, . ~ . + Mult(year, treatment, inst = 3), start = c(coef(bilinear2), svdStart[,3])) anova(mainEffects, bilinear1, bilinear2, bilinear3) ## Examine the extent to which, say, mTF explains the first bilinear term bilinear1mTF <- gnm(yield.scaled ~ year + treatment + Mult(1 + mTF, treatment), family = gaussian, data = wheat) anova(mainEffects, bilinear1mTF, bilinear1)