sjplot::tab_model() 与 lmer Summary() 中 P 值的差异

问题描述 投票:0回答:1

当我运行我的模型时:

BurstEn <- lmer(Burst_energy_norm_ms ~ StopType + (StopType | Speaker), data = AllData)

我得到以下结果:

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')

但是如果我跑步

sjPlot:: tab_model(BurstEn)

然后我的 p 值更改为 0.003(截距)和 0.022(StopType+A-F)。

这有什么原因吗?我不完全理解文档。

我尝试阅读相关文档,但我不太明白 p 值的计算方式是否不同,或者我是否只是误解了其工作原理。

r lme4 p-value sjplot
1个回答
0
投票

无法准确导出线性混合效应模型的系数估计的这些 p 值,因为无法准确导出自由度。因此,您需要近似自由度,并且默认情况下 lmerTest 包使用 Satterthwaite 的方法,正如输出告诉您的那样(参见 https://www.jstatsoft.org/article/view/v082i13)。

help("tab_model")
表示(请参阅描述
df.method
参数的条目)您可以对
tab_model
中的自由度使用不同的近似值。出于性能原因,默认情况下使用简单的 Wald 测试。这是一种较差的方法,如果可能的话,您应该更改此默认值。

library(lmerTest)
fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)
summary(fm1)$coef

tab_model(fm1, digits.p = 6, p.style = "scientific", df.method = "satterthwaite")
© www.soinside.com 2019 - 2024. All rights reserved.