data(DT_yatesoats)
DT <- DT_yatesoats
m3 <- mmec(fixed=Y ~ V + N + V:N ,
random = ~ B + B:MP,
rcov=~units,
data = DT)
#############################
## predict means for nitrogen
#############################
Dt <- m3$Dtable; Dt
# first fixed effect just average
Dt[1,"average"] = TRUE
# second fixed effect include
Dt[2,"include"] = TRUE
# third fixed effect include and average
Dt[3,"include"] = TRUE
Dt[3,"average"] = TRUE
Dt
pp=predict(object=m3, Dtable=Dt, D="N")
pp$pvals
#############################
## predict means for variety
#############################
Dt <- m3$Dtable; Dt
# first fixed effect include
Dt[1,"include"] = TRUE
# second fixed effect just average
Dt[2,"average"] = TRUE
# third fixed effect include and average
Dt[3,"include"] = TRUE
Dt[3,"average"] = TRUE
Dt
pp=predict(object=m3, Dtable=Dt, D="V")
pp$pvals
#############################
## predict means for nitrogen:variety
#############################
# prediction matrix D based on (equivalent to classify in asreml)
Dt <- m3$Dtable; Dt
# first fixed effect include and average
Dt[1,"include"] = TRUE
Dt[1,"average"] = TRUE
# second fixed effect include and average
Dt[2,"include"] = TRUE
Dt[2,"average"] = TRUE
# third fixed effect include and average
Dt[3,"include"] = TRUE
Dt[3,"average"] = TRUE
Dt
pp=predict(object=m3, Dtable=Dt, D="N:V")
pp$pvals
Run the code above in your browser using DataLab