0
$\begingroup$

I would like to obtain p-values from my model fit with lmer()from the lme4 package.

It looks something like this:

model4<- lmer(rt~ a + b + c + a*b*c + (1|id), data= dat, REML= FALSE)

I compared the model to less complex models with an LRT-Test via anova() and thus set REML=FALSE.

Now, I would like to analyse contrasts in my model model4 and obtain p values.

I read about the package lmerTest and thought about using satterthwaite method:

library(lmerTest)
fit<- as(model4, "merModLmerTest")
anova(fit)

R gives me an output which looks good.

however, I read that my model needs to be fit by REML=TRUE.

Did I fit my model wrong, then? And why do I need to fit REML=TRUE?

I am confused and would be glad if somebody helped me out! Thanks a lot in advance!

$\endgroup$
3
  • 1
    $\begingroup$ I think you are looking for this stats.stackexchange.com/questions/48671/… $\endgroup$ Commented May 25, 2020 at 12:19
  • $\begingroup$ Thank you! So it is okay to "mix" the methods? $\endgroup$ Commented May 25, 2020 at 12:40
  • $\begingroup$ As the answers in the provided link state, REML is used to get better estimates, while ML is used to compare models. You can compare models using ML, and then select the best one and use REML. $\endgroup$ Commented May 26, 2020 at 5:42

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.