Learn R Programming

gtsummary (version 0.1.0)

add_q.fmt_uni_regression: Add a column of q values to fmt_uni_regression object to account for multiple comparisons

Description

The adjustments to the p-values is performed with stats::p.adjust. The default method for correction is false discovery rate ("fdr")

Usage

# S3 method for fmt_uni_regression
add_q(x, method = "fdr", ...)

Arguments

x

table1 object

method

character argument. Methods from stats::p.adjust are accepted. Default is method = fdr.

...

further arguments passed to or from other methods

Examples

Run this code
# NOT RUN {
lm(mpg ~ hp + am, mtcars) %>%
  fmt_regression() %>%
  bold_p()

trial %>%
  fmt_uni_regression(
    method = "lm",
    y = "age"
  ) %>%
  add_global() %>%
  add_q()
# }

Run the code above in your browser using DataLab