Package: survcompare 0.1.2

Diana Shamsutdinova

survcompare: Compares Cox and Survival Random Forests to Quantify Nonlinearity

Performs repeated nested cross-validation for Cox Proportionate Hazards, Cox Lasso, Survival Random Forest, and their ensemble. Returns internally validated concordance index, time-dependent area under the curve, Brier score, calibration slope, and statistical testing of non-linear ensemble outperforming the baseline Cox model. In this, it helps researchers to quantify the gain of using a more complex survival model, or justify its redundancy. Equally, it shows the performance value of the non-linear and interaction terms, and may highlight the need of further feature transformation. Further details can be found in Shamsutdinova, Stamate, Roberts, & Stahl (2022) "Combining Cox Model and Tree-Based Algorithms to Boost Performance and Preserve Interpretability for Health Outcomes" <doi:10.1007/978-3-031-08337-2_15>, where the method is described as Ensemble 1.

Authors:Diana Shamsutdinova [aut, cre], Daniel Stahl [aut]

survcompare_0.1.2.tar.gz
survcompare_0.1.2.tar.gz(r-4.5-noble)survcompare_0.1.2.tar.gz(r-4.4-noble)
survcompare_0.1.2.tgz(r-4.4-emscripten)survcompare_0.1.2.tgz(r-4.3-emscripten)
survcompare.pdf |survcompare.html
survcompare/json (API)

# Install 'survcompare' in R:
install.packages('survcompare', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

15 exports 1 stars 0.09 score 143 dependencies 5 scripts 193 downloads

Last updated 8 months agofrom:5ac7165d8d. Checks:OK: 2. Indexed: yes.

TargetResultDate
Doc / VignettesOKAug 20 2024
R-4.5-linuxOKAug 20 2024

Exports:cox_calibration_statssimulate_crosstermssimulate_linearsimulate_nonlinearsurv_validatesurvcomparesurvcox_cvsurvcox_predictsurvcox_trainsurvcoxlasso_trainsurvensemble_cvsurvensemble_trainsurvsrf_cvsurvsrf_predictsurvsrf_train

Dependencies:backportsbase64encbitbit64bslibcachemcaretcheckmateclassclicliprclockclustercmprskcodetoolscolorspacecpp11crayondata.tabledata.treediagramDiagrammeRdigestdoParalleldplyre1071evaluatefansifarverfastmapfontawesomeforeachforeignFormulafsfuturefuture.applygenericsggplot2glmnetglobalsgluegowergridExtragtablehardhathighrHmischmshtmlTablehtmltoolshtmlwidgetsigraphipredisobanditeratorsjquerylibjsonliteKernSmoothknitrlabelinglatticelavalifecyclelistenvlubridatemagrittrMASSMatrixMatrixModelsmemoisemetsmgcvmimeModelMetricsmultcompmunsellmvtnormnlmennetnumDerivparallellypecpillarpkgconfigplotrixplyrpolsplineprettyunitspROCprodlimprogressprogressrproxyPublishpurrrquantregR6randomForestSRCrangerrappdirsRColorBrewerRcppRcppArmadilloRcppEigenreadrrecipesreshape2riskRegressionrlangrmarkdownrmsrpartrstudioapisandwichsassscalesshapeSparseMSQUAREMstringistringrsurvivalTH.datatibbletidyrtidyselecttimechangetimeDatetimeregtimeROCtinytextzdbutf8vctrsviridisviridisLitevisNetworkvroomwithrxfunyamlzoo

Survcompare_application

Rendered fromsurvcompare_application.Rmdusingknitr::rmarkdownon Aug 20 2024.

Last update: 2024-01-23
Started: 2024-01-23

Readme and manuals

Help Manual

Help pageTopics
Calibration stats of a fitted Cox PH modelcox_calibration_stats
Auxiliary function for simulatedata functionslinear_beta
Predicts event probability for a fitted survensemblepredict.survensemble
Print survcompare objectprint.survcompare
Prints trained survensemble objectprint.survensemble
Prints survensemble_cv objectprint.survensemble_cv
Simulated sample with survival outcomes with non-linear and cross-term dependenciessimulate_crossterms
Simulated sample with survival outcomes with linear dependenciessimulate_linear
Simulated sample with survival outcomes with non-linear dependenciessimulate_nonlinear
Internal function to compute survival probability by time from a fitted survival random forestsrf_survival_prob_for_time
Summary of survcompare resultssummary.survcompare
Prints summary of a trained survensemble objectsummary.survensemble
Prints a summary of survensemble_cv objectsummary.survensemble_cv
Calculates time-dependent Brier Scoresurv_brierscore
Computes performance statistics for a survival data given the predicted event probabilitiessurv_validate
Cross-validates and compares Cox Proportionate Hazards and Survival Random Forest modelssurvcompare
Cross-validates Cox or CoxLasso modelsurvcox_cv
Computes event probabilities from a trained cox modelsurvcox_predict
Trains CoxPH using survival package, or trains CoxLasso (cv.glmnet, lambda.min), and then re-trains survival:coxph on non-zero predictorssurvcox_train
Trains CoxLasso, using cv.glmnet(s="lambda.min")survcoxlasso_train
Cross-validates predictive performance for Ensemble 1survensemble_cv
Fits an ensemble of Cox-PH and Survival Random Forest (SRF) with internal CV to tune SRF hyperparameters.survensemble_train
Calculates survival probability estimated by Kaplan-Meier survival curve Uses polynomial extrapolation in survival function space, using poly(n=3)survival_prob_km
Cross-validates SRF modelsurvsrf_cv
Predicts event probability for a fitted SRF modelsurvsrf_predict
Fits randomForestSRC, with tuning by mtry, nodedepth, and nodesize. Underlying model is by Ishwaran et al(2008) https://www.randomforestsrc.org/articles/survival.html Ishwaran H, Kogalur UB, Blackstone EH, Lauer MS. Random survival forests. The Annals of Applied Statistics. 2008;2:841–60.survsrf_train
Internal function to tune SRF model, in nested CV loopsurvsrf_tune