agridat (version 1.16)

gotway.hessianfly: Hessian fly damage to wheat varieties

Description

Hessian fly damage to wheat varieties

Arguments

Format

block

block factor, 4 levels

genotype factor, 16 wheat varieties

lat

latitude, numeric

long

longitude, numeric

y

number of damaged plants

n

number of total plants

Details

The response is binomial.

Each plot was square.

References

The GLIMMIX procedure. http://www.ats.ucla.edu/stat/SAS/glimmix.pdf

Examples

Run this code
# NOT RUN {
## FIXME Could the spaMM package be useful here...????

data(gotway.hessianfly)
dat <- gotway.hessianfly

dat$prop <- dat$y / dat$n
if(require(desplot)){
  desplot(prop~long*lat, dat,
          aspect=1, # true aspect
          out1=block, text=gen, cex=1, shorten='no',
          main="gotway.hessianfly")
}

# ----------------------------------------------------------------------------

# Block random.  See Glimmix manual, output 1.18.
# Note: (Different parameterization)
# }
# NOT RUN {
  ## require(lme4)
  ## l2 <- glmer(cbind(y, n-y) ~ gen + (1|block), data=dat, family=binomial,
  ##    control=glmerControl(check.nlev.gtr.1="ignore"))
  ## coef(l2)
# }
# NOT RUN {
# ----------------------------------------------------------------------------

# }
# NOT RUN {
  # asreml3
  require(asreml)
  a2 <- asreml(prop ~ gen, data=dat, random=~block,
               family=asreml.binomial(),
               weights=n)
  coef(a2)
# }
# NOT RUN {
# ----------------------------------------------------------------------------

# }
# NOT RUN {
  ## require(asreml4)
  ## a2 <- asreml(prop ~ gen, data=dat, random=~block,
  ##              family=asr_binomial(),
  ##              weights=n)
  ## coef(a2)
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace