Learn R Programming

agridat (version 1.23)

omer.sorghum: Multi-environment trial of sorghum, 6 environments

Description

Multi-environment trial of sorghum, 6 environments

Usage

data("omer.sorghum")

Arguments

Format

A data frame with 432 observations on the following 4 variables.

env

environment

rep

replication

gen

genotype factor

yield

yield, kg/ha

Details

Trials were conducted in Sudan, 3 years at 2 locations, 4 reps in RCBD at each location. The year and location have been combined to form 6 environments. Only environments are given in the data, not the individual year and location.

References

None.

Examples

Run this code
if (FALSE) {

library(agridat)

data(omer.sorghum)
dat <- omer.sorghum

# REML approach
libs(lme4)
libs(lucid)

# 1 loc, 2 years. Match Omer table 1.
m1 <- lmer(yield ~ 1 + env + (1|env:rep) + (1|gen) + (1|gen:env),
           data=subset(dat, is.element(env, c('E2','E4'))))
vc(m1)
##      grp        var1 var2    vcov  sdcor
##  gen:env (Intercept)  17050   130.6
##      gen (Intercept)   2760    52.54
##  env:rep (Intercept)    959.1  30.97
## Residual          43090   207.6

# 1 loc, 3 years. Match Omer table 1.
m2 <- lmer(yield ~ 1 + env + (1|env:rep) + (1|gen) + (1|gen:env),
           data=subset(dat, is.element(env, c('E2','E4','E6'))))
vc(m2)
##      grp        var1 var2  vcov  sdcor
##  gen:env (Intercept)  22210 149
##      gen (Intercept)   9288  96.37
##  env:rep (Intercept)   1332  36.5
## Residual          40270 200.7

# all 6 locs. Match Omer table 3, frequentist approach
m3 <- lmer(yield ~ 1 + env + (1|env:rep) + (1|gen) + (1|gen:env),
           data=dat)
vc(m3)
##       grp        var1 var2  vcov  sdcor
##   gen:env (Intercept)  21340 146.1
##   env:rep (Intercept)   1152  33.95
##       gen (Intercept)   1169  34.2
##  Residual          24660 157
}

Run the code above in your browser using DataLab