Description Usage Arguments Details Examples
View source: R/add_reference_levels.R
add_reference_levels
Adds reference levels to regression
model object
1 | add_reference_levels(model_object)
|
model_object |
A cox.ph object |
Prints summary statistics of cox.ph model using the
broom
-package, and adds a reference level to the
categorical predictors, as is commonly used in epidemiological
publications.
1 2 3 4 5 6 | # Model for which I want reference levels printed in the output.
lung <- survival::lung
lung$species <- iris$Species[ sample.int( 150, 228, replace = TRUE )]
input_to_function <- survival::coxph( survival::Surv( time, status == 2 ) ~ age +
sex + ph.karno + wt.loss + species, data = lung)
add_reference_levels( model_object = input_to_function)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.