简体   繁体   English

R:使用小鼠 mipo/data.frame object 和 sjPlot tab_model

[英]R: use mice mipo/data.frame object with sjPlot tab_model

I'm trying to get a table output for a pooled logistic model with imputed datasets from mice so I can see and report the standardized and exponentiated estimates and model fit statistics, but it seems like tab_model will not take a mipo/data.frame object that comes from analyzing pooled data. I'm trying to get a table output for a pooled logistic model with imputed datasets from mice so I can see and report the standardized and exponentiated estimates and model fit statistics, but it seems like tab_model will not take a mipo/data.frame object这来自分析汇总数据。

Here is an example with the trial dataset from the survival package.这是一个来自survival package 的trial数据集的示例。

library(survival)
library(tidyverse)
library(mice)
library(sjPlot)

suppressWarnings(mice::mice(trial, m = 2)) %>%
        with(glm(death ~ marker + grade, family = "binomial")) %>% 
        pool() %>%
        tab_model(., show.se = TRUE, show.std = TRUE, show.aic = TRUE)

This give me this error:这给了我这个错误:

Error in if (fam.info$is_linear) transform <- NULL else transform <- "exp" : 
  argument is of length zero

Is there a way to use pooled mice object with tab_model?有没有办法将池小鼠 object 与 tab_model 一起使用? Or convert it to a type of object tab_model will take?或者将其转换为 object 类型的 tab_model 会怎样?

This is not a mice issue, but a problem with tab_model() and broom objects.这不是mice问题,而是tab_model()broom对象的问题。 See https://stackoverflow.com/a/70422199/17724015 and https://github.com/strengejacke/sjPlot/issues/385 .请参阅https://stackoverflow.com/a/70422199/17724015https://github.com/strengejacke/sjPlot/issues/385

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 有没有办法将 HTML tab_model object 转换为 R ZA8CFDE6331BD59EB26666F89111C4 或 aibble? - Is there a way to convert the HTML tab_model object into an R object, like a data.frame or tibble? R如何使用sjPlot :: tab_model()将lmer,glmer和gamlss模型放入表中 - R how to use sjPlot::tab_model() to put lmer, glmer, and gamlss models into a table 预测变量在 sjPlot 中使用 tab_model (r) 以随机顺序排列(现在具有可重现的代码) - Predictors are in random order in sjPlot using tab_model (r) (with reproducible code now) 如何从 R 中的 tab_model 中提取变量以创建新数据框? - How to extract variables from tab_model in R to create new data frame? 将自定义列添加到回归表(tab_model、sjplot)? - Adding custom column to regression table (tab_model, sjplot)? R中的鼠标包,mipo对象在更新到鼠标3.0后不再返回方差协方差矩阵 - mice package in R, mipo object does not return variance covariance matrix anymore after updating to mice 3.0 R 中的鼠标问题:无法将“mids”类强制转换为 data.frame - problems with mice in R: cannot coerce class '“mids”' into a data.frame R:带有 mipo/mice 对象的 APA 回归表 - R: APA regression tables with mipo/mice objects 为什么 tab_model (sjPlot) 用 rstanarm 模型重新运行 MCMC? - Why does tab_model (sjPlot) re-run MCMC with rstanarm model? 在 R 中:tab_model(隐藏多项式) - In R: tab_model (hide polynomials)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM