[英]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/17724015和https://github.com/strengejacke/sjPlot/issues/385 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.