# NOT RUN {
data(DT_yatesoats)
DT <- DT_yatesoats
m3 <- mmer(fixed=Y ~ V + N + V:N,
random = ~ B + B:MP,
rcov=~units,
data = DT)
summary(m3)$varcomp
p0 <- predict.mmer(object=m3, classify = "N")
p0$hypertable; p0$pvals
p0 <- predict.mmer(object=m3, classify = "V")
p0$hypertable; p0$pvals
p0 <- predict.mmer(object=m3, classify = "B")
p0$hypertable; p0$pvals
p0 <- predict.mmer(object=m3, classify = c("V","N"))
p0$hypertable; p0$pvals
########################################
## force the inclusion of specific terms
## in the hypertable
########################################
p0 <- predict.mmer(object=m3, classify = "N")
hypertable <- p0$hypertable; hypertable
p0$pvals
# force inclusion of 5th term
hypertable[6,c("ignored","include")] <- c(FALSE,TRUE)
hypertable
p1 <- predict.mmer(object=m3, classify = "N", hypertable = hypertable)
p1$hypertable;p1$pvals
########################################
## force the exclusion of specific terms
## in the hypertable
########################################
p0 <- predict.mmer(object=m3, classify = "N")
hypertable <- p0$hypertable; hypertable
p0$pvals
# force inclusion of 4th term
hypertable[4,c("ignored","include")] <- c(TRUE,FALSE)
hypertable
p1 <- predict.mmer(object=m3, classify = "N", hypertable = hypertable)
p1$hypertable;p1$pvals
# }
Run the code above in your browser using DataLab