####=========================================####
#### For CRAN time limitations most lines in the
#### examples are silenced with one '#' mark,
#### remove them and run the examples
####=========================================####
data(DT_h2)
DT <- DT_h2
head(DT)
####=========================================####
#### fit the mixed model (very heavy model)
####=========================================####
# ans1 <- mmer(y~Env,
# random=~vsr(dsr(Env),Name) + vsr(dsr(Env),Block),
# rcov=~vsr(dsr(Env),units),
# data=DT)
# summary(ans1)$varcomp
#
# DT=DT[with(DT, order(Env)), ]
# ans1b <- mmec(y~Env,
# random=~vsc(dsc(Env),isc(Name)) + vsc(dsc(Env),isc(Block)),
# rcov=~vsc(dsc(Env),isc(units)),
# data=DT)
# summary(ans1b)$varcomp
Run the code above in your browser using DataLab