Questions tagged [gtsummary]

Use this tag for questions about using the gtsummary package for data visualization in R.

{gtsummary} is an R package that creates presentation-ready summary and analytic tables. All package functions are fully documented on the {gtsummary} website, which also contains detailed tutorials.

Use the gtsummary tag on StackOverflow to ask questions about the usage of {gtsummary} functions, for example, how to use the customization features or inquiries on how to use custom functions within arguments.

To report bugs, please submit an issue on gtsummary's GitHub.

655 questions
0
votes
0 answers

Why 95%CI of OR in tbl_regression (and manual 95%CI) is different from 95%CI from logistic.display and does not match p-value?

If I want to perform logistic regression, I can use three different ways: manually : fit1 <- (glm(outcome~A+B,family=binomial,data=database)) summary(fit1) exp(confint(fit1)) exp(coefficients(fit1) function tbl_regression from gtsumary…
B_slash_
  • 309
  • 2
  • 17
0
votes
1 answer

Summarize categorical variables by numeric: gtsummary package

I need help on how to write R code using gtsummary package to create a summary table with several categorical variables as rows and the column side (the "by" variable) is a numeric variable in my case, age in years. So in essence I would like to…
Nelly
  • 373
  • 2
  • 11
-1
votes
2 answers

Changing () to [] for confidence interval in gtsummary table

I am making my demographics table using gtsummary. I want the confidence interval in my table to appear between [] not (). For example, trial %>% select(response, grade) %>% tbl_summary(statistic = all_categorical() ~ "{p}%", …
-1
votes
1 answer

Standardized Difference Scores after Matching - Discrepancy between packages

I'm using the MatchIt package in R to conduct coursened exact matching. When I complete the matching and check the balance using cobalt, I'm told that the Diff.Adj is 0.00 for my categorical variables, and -0.06 for the continuous…
John Ryan
  • 343
  • 1
  • 9
-1
votes
1 answer

How to add significance stars on p-value produced by add_glance_table {gtsummary}

When making a regression table using {gtsummary}, p-value can be added through add_glance_table(p.value): library(gtsumary) trial %>% na.exclude() %>% lm(ttdeath ~ age + marker + response,.) %>% tbl_regression() %>% …
r_noobie
  • 127
  • 6
-1
votes
1 answer

R gtsummary 3 way table in html

I need to draw 3 way HTML tables with frequency and row percentages. I like gtsummary to draw 2 way HTML tables but do not know how to draw 3 way. So, I tried xtab but can't figure out how to add frequency and row-percentage in the same table.…
HSC
  • 129
  • 6
1 2 3
43
44