View source: R/display-coxph.R
display_coxph | R Documentation |
Given a coxph
model fit object, displays univariable and (optionally) multivariable results
from Cox proportional hazards regression in a format suitable for presentation.
display_coxph(
fit,
data,
add_multi = FALSE,
format = "html",
conf_level = 0.95,
exponentiate = TRUE,
include_last_row = TRUE
)
fit |
An object of class |
data |
A tibble or data frame with the full dataset used for modeling. |
add_multi |
Logical; whether to include multivariable results. Default is |
format |
Display format in case characters need escaping. Placeholder for future use. Default is |
conf_level |
The confidence level to use for confidence intervals. Must be between 0 and 1. Default is 0.95. |
exponentiate |
Logical; whether to exponentiate coefficient estimates to show hazard ratios. Default is |
include_last_row |
Logical; if |
A tibble containing the Cox regression results.
## Not run:
library(survival)
data(lung)
# Fit a Cox model
fit <- coxph(Surv(time, status) ~ age + sex + ph.ecog, data = lung)
# Display Cox regression results
display_coxph(fit, data = lung, add_multi = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.