Context
The reproducibility of scientific results depends on several factors. One such factor is the consistency and accuracy of the reported results.
Those of you who run statistical analyses, fit models and report results in scientific publications know that there are many risks of errors when reporting results as copy/paste are usually required.
– The CIs may be obtained in one section of the output.
– The test statistics, degreed of freedom and p-values in another section.
– Exponentiating coefficients and CIs may be needed (for Generalized Linear Models).
– Need to report results for several endpoints.
– Etc.
These numerous steps increase the risk of errors as multiple copy/paste are required to create complete summary tables:
– Tables of patient characteristics
– Tables containing model results
– etc.
gtsummary in R Comes in Handy
“The R gtsummary package provides an elegant and flexible way to create publication-ready summary tables in R.
A critical part of the work of statisticians, data scientists, and analysts is summarizing data sets and regression models in R and publishing or sharing polished summary tables.
The gtsummary package was created to streamline these everyday analysis tasks by allowing users to easily create reproducible summaries of data sets, regression models, survey data, and survival data with a simple interface and very little code.
The package follows a tidy framework, making it easy to integrate with standard data workflows, and offers many table customization features through function arguments, helper functions, and custom themes.”
Illustration
☀ I wish I had had access to these tools during my entire career. Young folks, you are very fortunate!
Reference
Daniel D. Sjoberg, Karissa Whiting, Michael Curry, Jessica A. Lavery, Joseph Larmarange
Reproducible Summary Tables with the gtsummary Package. The R Journal. Volume 13/1, June 2021