# NOT RUN {
data(gilmour.slatehall)
dat <- gilmour.slatehall
desplot(yield ~ col * row, dat, num=gen,
out1=rep, main="gilmour.slatehall")
# }
# NOT RUN {
# Model 4 of Gilmour et al 1997
require(asreml)
dat <- transform(dat, xf=factor(col), yf=factor(row))
dat <- dat[order(dat$xf, dat$yf), ]
m4 <- asreml(yield ~ gen + lin(row), data=dat,
random = ~ dev(row) + dev(col),
rcov = ~ ar1(xf):ar1(yf))
coef(m4)$fixed[1] # linear row
# [1] 31.72252 # (sign switch due to row ordering)
require(lucid)
vc(m4)
## effect component std.error z.ratio constr
## dev(row) 20290 10260 2 pos
## dev(col) 2519 1959 1.3 pos
## R!variance 23950 4616 5.2 pos
## R!xf.cor 0.439 0.113 3.9 uncon
## R!yf.cor 0.125 0.117 1.1 uncon
plot(variogram(m4))
# }
Run the code above in your browser using DataLab