tidy.step | R Documentation |
Tidy the STEP results into a tibble
format ready for plotting.
## S3 method for class 'step'
tidy(x, ...)
x |
( |
... |
not used. |
A tibble
with one row per STEP subgroup. The estimates and CIs are on the HR or OR scale,
respectively. Additional attributes carry metadata also used for plotting.
g_step()
which consumes the result from this function.
library(survival)
lung$sex <- factor(lung$sex)
vars <- list(
time = "time",
event = "status",
arm = "sex",
biomarker = "age"
)
step_matrix <- fit_survival_step(
variables = vars,
data = lung,
control = c(control_coxph(), control_step(num_points = 10, degree = 2))
)
broom::tidy(step_matrix)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.