使用 sjPlot 为拟合模型统计信息构建迭代表的策略

A strategy to build iteratively tables for fitted models statistics with sjPlot

我面临着这个合适的模型列表:

    Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
Formula: value ~ COND + (1 | ID)
   Data: .

REML criterion at convergence: 389.4

Scaled residuals: 
     Min       1Q   Median       3Q      Max 
-1.71940 -0.52142 -0.02861  0.43071  2.17384 

Random effects:
 Groups   Name        Variance Std.Dev.
 ID       (Intercept) 14.461   3.803   
 Residual              5.527   2.351   
Number of obs: 75, groups:  ID, 25

Fixed effects:
            Estimate Std. Error      df t value Pr(>|t|)  
(Intercept)  -1.5888     0.8942 35.1754  -1.777   0.0842 .
CONDNEG-NOC   0.1964     0.6649 48.0000   0.295   0.7690  
CONDNEU-NOC   0.1130     0.6649 48.0000   0.170   0.8658  
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Correlation of Fixed Effects:
            (Intr) CONDNEG
CONDNEG-NOC -0.372        
CONDNEU-NOC -0.372  0.500 

和其他 12 个元素,全部嵌入到一个名为 model_list

的对象中

如果我想用 sjPlot() 包或其他包(可选)将它们呈现为优雅的表格(如这些幻灯片中的每个模型单独显示):

有人知道我该怎么做吗?

您似乎使用的是模型摘要而不是模型本身。做:

models_list_3 <- out_long %>%   
       group_by(signals) %>%   
       do(fit = lmerTest::lmer(value ~ COND + (1|ID), data = .)) %>%    
       pull(fit) 

tab_model(model_list_3, show.ci =  FALSE, show.se =  TRUE)

对于每个模型,您可以这样做:

 lapply(model_list_3, tab_model, show.ci = FALSE, show.se = TRUE)