Giter Club home page Giter Club logo

Comments (2)

ddsjoberg avatar ddsjoberg commented on July 18, 2024

Dear @ABohynDOE , thanks for the post. That is an interesting idea.

First, I just want to point out that you can add footnotes from within gtsummary, and it will be included whether you use gt or flextable output (see example below).

Regarding the request: hmmm, there is certainly good information that could be reported alongside MICE regression models. I think that statement applies to all models, actually. But I question whether it needs to be included by default, since it's possible to simply update the table with any additional information you'd like.
🤔

set.seed(1)
imp <- mice::mice(iris, m = 2)
# Fit a model for each imputation
mod <- with(imp, lm(Petal.Width ~ Petal.Length))

gtsummary::tbl_regression(mod) |> 
  gtsummary::modify_footnote(label = glue::glue("Results pooled from {mod$call1[[3]]} imputations"))
#> pool_and_tidy_mice(): Tidying mice model with
#> `mice::pool(x) %>% mice::tidy(conf.int = TRUE, conf.level = 0.95, exponentiate = FALSE)`
Characteristic1 Beta 95% CI2 p-value
Petal.Length 0.42 0.40, 0.43 <0.001
1 Results pooled from 2 imputations
2 CI = Confidence Interval

Created on 2024-05-24 with reprex v2.1.0

from gtsummary.

ABohynDOE avatar ABohynDOE commented on July 18, 2024

Dear @ddsjoberg, thanks a lot for the quick answer ! I wasn't aware that modify_footnote() could add new footnote, that's really interesting !

Given this new information I don't think that adding the caption by default is a good idea because, as you mentioned, it opens the door to doing it differently for each possible model that can be passed to tbl_regression().

So I'll stick with your solution and close this issue. Thanks for the help !

from gtsummary.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.