Learn R Programming

gtsummary (version 1.2.1)

add_global_p.tbl_uvregression: Adds the global p-value for categorical variables

Description

This function uses car::Anova with argument type = "III" to calculate global p-values for categorical variables.

Usage

# S3 method for tbl_uvregression
add_global_p(x, ...)

Arguments

x

Object with class tbl_uvregression from the tbl_uvregression function

...

Additional arguments to be passed to car::Anova.

Value

A tbl_uvregression object

Example Output

See Also

Other tbl_uvregression tools: add_nevent.tbl_uvregression, add_q.tbl_uvregression, bold_italicize_labels_levels, bold_p.tbl_stack, bold_p.tbl_uvregression, inline_text.tbl_uvregression, modify_header, sort_p.tbl_uvregression, tbl_merge, tbl_stack, tbl_uvregression

Examples

Run this code
# NOT RUN {
tbl_uv_global_ex2 <-
  trial %>%
  dplyr::select(response, trt, age, grade) %>%
  tbl_uvregression(
    method = glm,
    y = response,
    method.args = list(family = binomial),
    exponentiate = TRUE
  ) %>%
  add_global_p()
# }

Run the code above in your browser using DataLab