Exam8.2 | R Documentation |
Exam8.2 Incomplete strip-plot
Muhammad Yaseen (myaseen208@gmail.com)
Adeela Munawar (adeela.uaf@gmail.com)
Stroup, W. W. (2012). Generalized Linear Mixed Models: Modern Concepts, Methods and Applications. CRC Press.
DataSet8.2
data(DataSet8.2)
DataSet8.2$block <- factor(x = DataSet8.2$block)
DataSet8.2$a <- factor(x = DataSet8.2$a)
DataSet8.2$b <- factor(x = DataSet8.2$b)
library(lmerTest)
Exam8.2lmer <-
lmer(
formula = y ~ a*b + (1|block) + (1|block:a) + (1|block:b)
, data = DataSet8.2
)
anova(Exam8.2lmer,ddf="Kenward-Roger")
library(emmeans)
emmeans(object = Exam8.2lmer, specs = ~a|b)
emmip(
object = emmeans(object = Exam8.2lmer, specs = ~a|b)
, formula = a~b
, ylab = "y Lsmeans"
, main = "Lsmeans for a*b"
)
##---Simple effect comparisons of a*b Least Squares Means by a ( page # 254)
emmeans(Exam8.2lmer, pairwise ~ b|a)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.