Description Usage Arguments Value See Also Examples
Cox-PH model assumptions This function outputs a bunch of plots related to Cox-PH diagnostics and model assumptions. Based on "Amendment 2 DFCI Analyses 3November2017.R"
1 | CoxPH_Diagnostics(model, data, continuous_vars, save_prefix)
|
model |
A cox-ph fitted model object |
data |
The data.frame containing the covariates used to generate the model |
continuous_vars |
A character vector of the names of the continuous variables used in the model |
save_prefix |
The file prefix for saving the output. E.g., "Results/coxph_" |
This function doesn't return anything, but writes four plots to disk: the scaled schoenfeld residuals, dfBetas, Deviance and Martingale residuals. These plots can be used to e.g. diagnose issues with the model, find outliers or find time-varying trends.
"Checking the Cox model with cumulative sums of martingale-based residuals." Biometrika 80.3 (1993): 557-572. "Using Time Dependent Covariates..." (https://cran.r-project.org/web/packages/survival/vignettes/timedep.pdf) "Proportional Hazards Regression Diagnostics" (http://www.ics.uci.edu/~dgillen/STAT255/Handouts/lecture10.pdf)
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.