2

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.

Here is an example with the trial dataset from the survival package.

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? Or convert it to a type of object tab_model will take?

L. Tucker
  • 523
  • 2
  • 12
  • 1
    I've encountered similar issues and so far I haven’t found a way to use mice objects with tab_model or tab_corr – maybe this is worth posting on https://github.com/strengejacke/sjPlot as a future enhancement? – jrcalabrese Dec 13 '21 at 04:06
  • Done! Good thought, thank you! – L. Tucker Dec 13 '21 at 18:11

1 Answers1

0

This is not a mice issue, but a problem with tab_model() and broom objects. See https://stackoverflow.com/a/70422199/17724015 and https://github.com/strengejacke/sjPlot/issues/385.

hanne
  • 36
  • 4