Exam4.1 | R Documentation |
Exam4.1 REML vs ML criterion is used keeping block effects random
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.
DataSet4.1
DataSet4.1$trt <- factor(x = DataSet4.1$trt)
DataSet4.1$block <- factor(x = DataSet4.1$block)
#---REML estimates on page 138(article 4.4.3.3)
library(lmerTest)
Exam4.1REML <- lmer(formula = y~ trt +( 1|block ), data = DataSet4.1)
library(parameters)
model_parameters(Exam4.1REML)
print(VarCorr(x = Exam4.1REML), comp = c("Variance"))
##---ML estimates on page 138(article 4.4.3.3)
Exam4.1ML <- lmer(formula = y ~ trt + (1|block), data = DataSet4.1, REML = FALSE)
model_parameters(Exam4.1ML)
print(VarCorr(x = Exam4.1ML), comp = c("Variance"))
Exam4.1.lm <- lm(formula = y~ trt + block, data = DataSet4.1)
anova(object = Exam4.1.lm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.