Report statistics from fmt_regression and fmt_uni_regression inline in an Rmarkdown document

# S3 method for fmt_regression
inline_text(x, cell,
  stat = "{est} (95% CI {ci}; {p_pvalue})", sep = ":", ...)

# S3 method for fmt_uni_regression
inline_text(x, cell,
  stat = "{est} (95% CI {ci}; {p_pvalue})", sep = ":", ...)

Arguments

x

object of class fmt_regression or fmt_uni_regression object

cell

identifier for which cell to return from the fmt_regression object

stat

Statistic to report. User can access the primary estimate (est), the lower and upper limit of the confidence interval (ll and ul), confidence interval (ci), N (N), pvalue (pvalue), and pvalue with p= or p< appended (p_pvalue). Default is "{est} (95% CI {ci}; {p_pvalue})"

sep

a character string to separate the terms

...

further arguments passed from generic inline_text()

Value

Formatted descriptive statistics from a fmt_regression object

Examples

mod <- glm(response ~ age + grade + stage, trial, family = binomial(link = "logit")) %>% fmt_regression(exponentiate = TRUE) inline_text(mod, "age")
#> [1] "1.00 (95% CI 0.98, 1.02; p=0.9)"
inline_text(mod, "grade:III")
#> [1] "0.79 (95% CI 0.38, 1.64; p=0.5)"
trial %>% fmt_uni_regression( method = "lm", y = "age" ) %>% inline_text("grade:II")
#> [1] "1.34 (95% CI -3.78, 6.45; p=0.6)"