Learn R Programming

gtsummary (version 0.1.0)

add_global.fmt_uni_regression: Adds the global p-value for a categorical variables in fmt_uni_regression objects

Description

This function uses Anova from the car package with type = "III" to calculate global p-values.

Usage

# S3 method for fmt_uni_regression
add_global(x, ...)

Arguments

x

object with class fmt_uni_regression from the fmt_uni_regression function

...

arguments to be passed to Anova. Adding test.statistic = can change the type of test (e.g. Likelihood-ratio, Wald, etc.).

Examples

Run this code
# NOT RUN {
fmt_uni_regression(
  trial,
  method = "glm",
  y = "response",
  method.args = list(family = binomial),
  exponentiate = TRUE
) %>%
  add_global()
# }

Run the code above in your browser using DataLab