I have a question regarding p-value estimations for an lme4 LMM model output:
I compared p-values produced by the functions tab_model
and Anova
and they don't seem to match. When I run Anova
, I get significant results for a fixed effect I don't get significant results for when running tab_model
. I'm aware computing p-values for LMMs is a controversial topic, but I would like to do this nonetheless.
I ran tab_model
with both the Wald and the Satterthwaite approximation for the argument df.method
, and with setting p.adjust = NULL
so I get uncorrected p-values, but it still produces different p-values than Anova
.
My code looks like this:
tab_model(my_lmm,
seed = 42,
show.se = TRUE,
show.stat = FALSE,
show.intercept = FALSE,
show.df = FALSE,
show.re.var = FALSE,
show.icc = TRUE,
show.obs = FALSE,
p.style = "scientific",
p.threshold = c(0.05),
p.adjust = NULL,
df.method = "satterthwaite",
digits = 6,
digits.p = 3)
Anova(my_lmm)
Thanks in advance for your help!
Merle
By default, Anova()
uses type = "II"
. If you set type = "III"
, it produces the same results as tab_model
. So instead of running Anova(my_lmm)
, the code should look like this: Anova(my_lmm, type = "III")
.
Here's an explanation concerning these different ANOVA types: https://md.psych.bio.uni-goettingen.de/mv/unit/lm_cat/lm_cat_unbal_ss_explained.html