Learn R Programming

tidycmprsk (version 1.1.0)

gtsummary_s3_methods: gtsummary methods

Description

These functions are S3 methods for working with crr() model results.

  • tbl_regression.tidycrr(): This function sets the tidycmprsk tidier for crr() models.

  • global_pvalue_fun.tidycrr(): This function ensures that gtsummary::add_global_p(anova_fun) uses the Wald test by default (instead of car::Anova(), which does not support this model type). The Wald test is executed with cardx::ard_aod_wald_test(), which wraps aod::wald.test().

Usage

# S3 method for tidycrr
tbl_regression(x, tidy_fun = tidycmprsk::tidy, ...)

# S3 method for tidycrr global_pvalue_fun(x, type, ...)

Value

gtsummary table or data frame of results

Arguments

x

(tidycrr)
tidycmprsk::crr() regression object

tidy_fun

(function)
Tidier function for the model. Default is tidycmprsk::tidy().

...

Additional arguments passed to broom.helpers::tidy_plus_plus().

type

not used

Examples

Run this code
crr(Surv(ttdeath, death_cr) ~ age + grade, trial) |>
  gtsummary::tbl_regression() |>
  gtsummary::add_global_p() |>
  gtsummary::as_gt()

Run the code above in your browser using DataLab