When I run my model:
BurstEn <- lmer(Burst_energy_norm_ms ~ StopType + (StopType | Speaker), data = AllData)
I get the following result:
Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
Formula: Burst_energy_norm_ms ~ StopType + (StopType | Speaker)
Data: AllData
REML criterion at convergence: 496.7
Scaled residuals:
Min 1Q Median 3Q Max
-1.1787 -0.3863 -0.1817 0.0391 8.7832
Random effects:
Groups Name Variance Std.Dev. Corr
Speaker (Intercept) 0.03533 0.18797
StopType+A-F 0.00981 0.09905 -1.00
Residual 0.34991 0.59153
Number of obs: 270, groups: Speaker, 5
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) 0.27765 0.09213 4.14476 3.014 0.0376 *
StopType+A-F -0.19928 0.08678 8.52753 -2.297 0.0488 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr)
StopTyp+A-F -0.407
optimizer (nloptwrap) convergence code: 0 (OK)
boundary (singular) fit: see help('isSingular')
But if I run
sjPlot:: tab_model(BurstEn)
then my p-values change to 0.003 (Intercept) and 0.022 (StopType+A-F).
Is there a reason for this? I don't fully understand the documentation.
I tried reading documentation on this, but I didn't really understand if the p-values were computed differently or if I just misunderstood how this works.
These p-values cannot be derived exactly for coefficient estimates of a linear mixed-effects model because the degrees of freedom cannot be derived exactly. Thus, you need to approximate the degrees of freedom and by default the lmerTest package uses Satterthwaite's method as the output tells you (cf. https://www.jstatsoft.org/article/view/v082i13).
help("tab_model")
indicates (see entry describing thedf.method
parameter) that you can use different approximations for the degrees of freedom intab_model
. By default a simple Wald test is used because of performance reasons. This is an inferior approach and you should change this default if possible.