A comprehensive simulation study evaluating the predictive performance of Cox proportional hazards model and machine learning methods for time-to-event data.
The 4 matches · 3 of them tie a paragraph to a whole file without given lines: weak matches, whose lines are not tinted
- [1] § Materials and methods › Real survival data ↔ sim_data.R, lines 1 to 32 · score 0.95 · stroke alert, Rankin Scale, stroke unit, age, ambulance, anticoagulants · Report a mismatch
- [2] § Results › Stroke survival results ↔ metrics.R, the whole file · a weak match · score 0.61 · RSF models, XGBoost model, Cox PH model, fitted, DeepSurv, prediction · Report a mismatch
- [3] § Materials and methods › Simulation of survival data ↔ metrics.R, the whole file · a weak match · score 0.55 · XGBoost, Cox PH model, fitted, DeepSurv, RSF, risk · Report a mismatch
- [4] § Materials and methods › Simulation of survival data ↔ metric_correctPH.R, the whole file · a weak match · score 0.50 · survSplit, Cox PH, fitted, risk, trained, predictive · Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
R · 110 lines · 5 KB · no license · 2 matches
- #------------------------------------------------------------------------------------------#
- # A function to fit the models and calculate metrics : IBS/Cstats #
- #-------------------------------------------------------------------------------------------#
- models_metric_IBS <- function(train_df, test_df){
- #fit models
- fmla <- Surv(time = time, event = status) ~ .
- # 1 RSF model: 'logrank'
- rsf_model <- rfsrc(formula = fmla, data = train_df, splitrule = "logrank",
- mtry = as.integer(sqrt(ncol(train_df[, !names(train_df) %in% c("time", "status")]))))
- rsf_predict <- get_predictions(fitted_model = rsf_model, newdata = test_df) # times = rsf_model$time.interest
- # 2. Cox PH model
- cph_model <- coxph(formula = fmla, data = train_df, x=T, y=T)
- cph_predict <- get_predictions(fitted_model = cph_model, newdata = test_df, times = rsf_model$time.interest)
- # 3. Survival neural network model
- nn_model <- deepsurv(fmla, data = train_df, frac = 0)
- nn_predict <- get_predictions(fitted_model = nn_model, newdata = test_df)
- # 4. XGBoost for survival analysis
- # Prepare the training and validation data for XGBoost
- x_label <- ifelse(train_df$status == 1, train_df$time, -train_df$time)
- x_train <- as.matrix(train_df %>% select(-time, -status))
- Dtrain <- xgb.DMatrix(x_train, label = x_label)
- surv_xgboost_model <- xgb.train.surv(
- params = list(objective = "survival:cox", eval_metric = "cox-nloglik"),
- data = x_train, label = x_label, nrounds = 100)
- xgb_predict <- get_predictions(fitted_model = surv_xgboost_model, newdata = test_df, times = rsf_model$time.interest)
- times <- test_df$time
- status <- test_df$status
- # 1. RSF model
- IBS_rsf <- my_sbrier(Surv(times, status), pred = t(rsf_predict$surv), btime = rsf_predict$times)[1,1]
- # 2. Cox PH model
- IBS_cox <- my_sbrier(Surv(times, status), pred = t(cph_predict$surv), btime = cph_predict$times)[1,1]
- # 3. Survival neural network model
- IBS_nn <- my_sbrier(Surv(times, status), pred = t(nn_predict$surv), btime = nn_predict$times)[1,1]
- # 4. XGBoost for survival analysis
- IBS_xgb <- my_sbrier(Surv(times, status), pred = t(xgb_predict$surv), btime = xgb_predict$times)[1,1]
- # }else{
- prob = .95
- z <- qnorm((1-prob)/2)
- # Harrell's Cstats
- # 1. Cox PH model
- cox_index.H <- concordance(object = Surv(time = times, event = status) ~ cph_predict$risk, data=test_df, reverse = TRUE)
- cox_c_CI.H <- cox_index.H$concordance + c(0, z, -z) * sqrt(cox_index.H$var)
- # 2. RSF model
- rsf_index.H <- concordance(object = Surv(time = times, event = status) ~ rsf_predict$risk, data=test_df, reverse = TRUE)
- rsf_c_CI.H <- rsf_index.H$concordance + c(0, z, -z) * sqrt(rsf_index.H$var)
- # 3. XGBoost for survival analysis
- xgb_index.H <- concordance(object = Surv(time = times, event = status) ~ xgb_predict$risk, data=test_df, reverse = TRUE)
- xgb_c_CI.H <- xgb_index.H$concordance + c(0, z, -z) * sqrt(xgb_index.H$var)
- # 4. Survival neural network model
- nn_index.H <- concordance(object = Surv(time = times, event = status) ~ nn_predict$risk, data = test_df, reverse = TRUE)
- nn_c_CI.H <- nn_index.H$concordance + c(0, z, -z) * sqrt(nn_index.H$var)
- #Uno's Cstats
- # 1. Cox PH model
- cox_index.U <- concordance(object = Surv(time = times, event = status) ~ cph_predict$risk, data=test_df, reverse = TRUE,timewt= "n/G2")
- cox_c_CI.U <- cox_index.U$concordance + c(0, z, -z) * sqrt(cox_index.U$var)
- # 2. RSF model
- rsf_index.U <- concordance(object = Surv(time = times, event = status) ~ rsf_predict$risk, data=test_df, reverse = TRUE,timewt= "n/G2")
- rsf_c_CI.U <- rsf_index.U$concordance + c(0, z, -z) * sqrt(rsf_index.U$var)
- # 3. XGBoost for survival analysis
- xgb_index.U <- concordance(object = Surv(time = times, event = status) ~ xgb_predict$risk, data=test_df, reverse = TRUE,timewt= "n/G2")
- xgb_c_CI.U <- xgb_index.U$concordance + c(0, z, -z) * sqrt(xgb_index.U$var)
- # 4. Survival neural network model
- nn_index.U <- concordance(object = Surv(time = times, event = status) ~ nn_predict$risk, data = test_df, reverse = TRUE,timewt= "n/G2")
- nn_c_CI.U <- nn_index.U$concordance + c(0, z, -z) * sqrt(nn_index.U$var)
- # Output
- models <- c("XGBoost", "RSF-logrank", "Cox PH", "NN")
- c_index.H <- c(xgb_c_CI.H[1], rsf_c_CI.H[1], cox_c_CI.H[1], nn_c_CI.H[1])
- lower_ci.H <- c(xgb_c_CI.H[2], rsf_c_CI.H[2], cox_c_CI.H[2], nn_c_CI.H[2])
- upper_ci.H <- c(xgb_c_CI.H[3], rsf_c_CI.H[3], cox_c_CI.H[3], nn_c_CI.H[3])
- c_index.U <- c(xgb_c_CI.U[1], rsf_c_CI.U[1], cox_c_CI.U[1], nn_c_CI.U[1])
- lower_ci.U <- c(xgb_c_CI.U[2], rsf_c_CI.U[2], cox_c_CI.U[2], nn_c_CI.U[2])
- upper_ci.U <- c(xgb_c_CI.U[3], rsf_c_CI.U[3], cox_c_CI.U[3], nn_c_CI.U[3])
- IBS_val <- c(IBS_xgb, IBS_rsf, IBS_cox, IBS_nn)
- d.frame <- data.frame(Model = models,
- C_index_H = c_index.H, Lower_CI_H = lower_ci.H, Upper_CI_H = upper_ci.H,
- C_index_U = c_index.U, Lower_CI_U = lower_ci.U, Upper_CI_U = upper_ci.U,
- IBScore = IBS_val)
- return(d.frame)
- }
metrics.R at commit df54dd9, no license · at the source
Overview
Abstract
Background: Many data-driven risk prediction models have been developed for analyzing time-to-event data. However, choosing the most suitable model for accurate predictions in a specific medical application remains a challenge. Simulation enables effective comparison on the basis of equal-sized datasets. This study provided a comprehensive and fair comparison of the overall survival prediction performance of machine learning models and the traditional Cox proportional hazards model, using both simulated and real datasets.
Methods: Machine learning models included random survival forests, eXtreme Gradient Boosting, and deep neural networks (DeepSurv). We evaluated the performance of the models using the C-index and the Integrated Brier Score. The evaluation was performed under different data-generating mechanisms, such as varying sample sizes, censoring proportions, the addition of noise variables, and in the presence of different types of model misspecification.
Results: All the models showed improved predictive performance with increasing sample sizes. However, their performance declined as the proportion of censoring increased. An increase in noise variables reduced prediction accuracy across all models, regardless of dataset size. Tree-based models demonstrated promising predictive performance compared to the Cox proportional hazards model and DeepSurv in the presence of misspecification and a large number of noise variables. The Cox proportional hazards model performed well with larger sample sizes and fewer noise variables. It also performed well when the model was correctly specified or had only minor misspecification.
Conclusions: Appropriate model for a specific medical application should be motivated by the research question and the underlying data structure.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 4 matches between paragraphs and lines of code.
Josline90/Cox-vs-ML-models-for-time-to-event-data_A-simulation-study
df54dd9e5181d78b43bfc8c921e95c0913382095, 7 October 2026Availability: 1 check, the latest on 12 November 2026: the link answers
- 12 November 2026: the link answers
9 files
- analysisA.R, R, 71 lines
- analysisB.R, R, 79 lines
- ibs.R, R, 90 lines
- libraries.R, R, 44 lines
- metric_correctPH.R, R, 107 lines, 1 match
- metrics.R, R, 110 lines, 2 matches
- predictions.R, R, 33 lines
- sim_data.R, R, 162 lines, 1 match
- README.md, Text, 2 lines
The paper's code and data availability statement is in the Data section.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 8 scripts, each with its path and the digest of its content;
- 4 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Data availability
The analysis code is publicly available in a Github repository https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 12 November 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 3 authors, 5 keywords, 10 MeSH terms, 1 funder, 52 references.
Cite
This paper
Otieno, J. A., Häggström, J., & Eriksson, M. (2026). A comprehensive simulation study evaluating the predictive performance of Cox proportional hazards model and machine learning methods for time-to-event data. BMC medical research methodology, 26(1), 240. https://
BibTeX
@article{otieno2026compr
author = {Otieno, Josline Adhiambo and Häggström, Jenny and Eriksson, Marie},
title = {{A comprehensive simulation study evaluating the predictive performance of Cox proportional hazards model and machine learning methods for time-to-event data}},
journal = {BMC medical research methodology},
year = {2026},
month = nov,
volume = {26},
number = {1},
pages = {240},
publisher = {BMC},
issn = {1471-2288},
doi = {10.1186/
url = {https://
pmid = {43004245},
pmcid = {PMC13749909}
}
RIS
TY - JOUR
AU - Otieno, Josline Adhiambo
AU - Häggström, Jenny
AU - Eriksson, Marie
TI - A comprehensive simulation study evaluating the predictive performance of Cox proportional hazards model and machine learning methods for time-to-event data
T2 - BMC medical research methodology
J2 - BMC Med Res Methodol
PY - 2026
DA - 2026/
VL - 26
IS - 1
SP - 240
SN - 1471-2288
PB - BMC
DO - 10.1186/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1186/
"type": "article-journal",
"title": "A comprehensive simulation study evaluating the predictive performance of Cox proportional hazards model and machine learning methods for time-to-event data",
"container-title": "BMC medical research methodology",
"author": [
{
"family": "Otieno",
"given": "Josline Adhiambo"
},
{
"family": "Häggström",
"given": "Jenny"
},
{
"family": "Eriksson",
"given": "Marie"
}
],
"container-title-short":
"volume": "26",
"issue": "1",
"page": "240",
"DOI": "10.1186/
"PMID": "43004245",
"PMCID": "PMC13749909",
"ISSN": "1471-2288",
"publisher": "BMC",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
11,
10
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1038/s41598-023-47935-7 [code]
- Accurate personalized survival prediction for amyotrophic lateral sclerosis patients.Journal: Scientific reportsIn common: survival, caret, reticulate, 2 other tools, 4 references
- [2] doi:10.3390/genes16050473 [code]
- Enhancing Prognostic Signatures in Glioblastoma with Feature Selection and Regularised Cox Regression.Journal: GenesIn common: survival, caret, ggplot2, 1 other tool, 4 references
- [3] doi:10.1371/journal.pone.0336476 [code]
- A meaningful prediction of functional decline in amyotrophic lateral sclerosis based on multi-event survival analysis.Journal: PloS oneIn common: 7 references
- [4] doi:10.1016/j.isci.2023.107522 [code]
- Deep learning for risk-based stratification of cognitively impaired individuals.Journal: iScienceIn common: survival, caret, XGBoost, 2 other tools, 2 references
- [5] doi:10.1038/s42003-026-10957-8 [code]
- Brain defence by the extracellular matrix protein Cochlin.Journal: Communications biologyIn common: survival, caret, XGBoost, 3 other tools
- [6] doi:10.1038/s43856-023-00276-y [code]
- Multimodal deep learning to predict prognosis in adult and pediatric brain tumors.Journal: Communications medicineIn common: survival, 4 references
- [7] doi:10.1186/s13014-026-02825-w [code]
- Prediction of local failure after stereotactic radiotherapy in melanoma brain metastases using ensemble learning on clinical, dosimetric, and radiomic data.Journal: Radiation oncology (London, England)In common: survival, caret, reticulate, 1 other tool, 1 reference
- [8] doi:10.3390/ijms27156925 [code]
- XGBoost-SHAP Interpretable Modeling Identifies and Validates an Eight-Gene Biomarker for Hepatic Encephalopathy Risk Prediction in Cirrhosis.Journal: International journal of molecular sciencesIn common: survival, caret, XGBoost, 2 other tools
- [9] doi:10.21037/jtd-2026-0997 [code]
- Machine learning models based on XGBoost algorithm to predict prognosis of lung cancer brain metastases.Journal: Journal of thoracic diseaseIn common: survival, caret, XGBoost, 2 other tools
- [10] doi:10.7554/elife.99538 [code]
- Menopausal hormone therapy and the female brain: Leveraging neuroimaging and prescription registry data from the UK Biobank cohort.Journal: eLifeIn common: survival, caret, XGBoost, 2 other tools
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 8 scripts, and 4 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:61e772abe161a8d4…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1186/s12874-026-03050-5)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1186/s12874-026-03050-5.svg
:target: https://openscicode.org/badge/doi/10.1186/s12874-026-03050-5
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1186/s12874-026-03050-5"><img src="https://openscicode.org/badge/doi/10.1186/s12874-026-03050-5.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
