prep_coxfit {shinyCox} | R Documentation |
Create simplified coxph()
object for shiny app
Description
Simplifies coxph()
output and checks that predictions
match those of the original object
Usage
prep_coxfit(coxph.result, tol = 1e-07)
Arguments
coxph.result |
Result returned by |
tol |
numerical tolerance for prediction differences, default is |
Value
list containing baseline survival estimates, linear predictor
estimates, predictor types, coefficient estimates, mean and range of numeric
predictors, levels of categorical predictors, strata if any, coxph()
formula, table of hazard ratios, table with proportional hazard assumption
results, number of subjects, and number of events
Examples
# First, fit model using coxph
library(survival)
bladderph <- coxph(Surv(stop, event) ~ rx + number + size, bladder,
model = TRUE, x = TRUE)
# Use coxph object with function
bladderfit <- prep_coxfit(bladderph)
[Package shinyCox version 1.1.0 Index]