prep_coxfit {shinyCox} | R Documentation |
coxph()
object for shiny appSimplifies coxph()
output and checks that predictions
match those of the original object
prep_coxfit(coxph.result, tol = 1e-07)
coxph.result |
Result returned by |
tol |
numerical tolerance for prediction differences, default is |
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
# 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)