medRxiv · Oct 19, 2026
Cohort Versus Nested Case-Control Design for Prediction Models of Rare Outcomes Using Electronic Health Records
By Fan R, Azadnajafabad S, Reps JM et al.
Objective: To determine how cohort versus nested case-control (NCC) design affects EHR-based prediction of a rare outcome. Materials and Methods: We compared two cohort and five NCC designs for predicting early-onset gastrointestinal cancer using L1-regularized logistic regression (LASSO), XGBoost, and multilayer perceptron (MLP). Models underwent nested five-fold cross-validation with model-specific hyperparameter tuning and temporal evaluation in a held-out prospective cohort representing intended deployment. Model discrimination was assessed using area under the receiver operating characteristic curve (AUROC) and area under the precision-recall curve (AUPRC). Model calibration was assessed using Brier scores and calibration plots before and after recalibration with isotonic regression. Feature-ranking similarity was quantified using rank-biased overlap. Results: The cohort development datasets included 256,854-415,529 patients, with 2-yr cumulative incidence of 0.12%-0.17%, compared with approximately 9% in the 1:10 matched NCC datasets. NCC designs generally produced higher internal discrimination, but temporal performance varied by algorithm and index-date definition. Cohort designs achieved the highest temporal AUPRC for LASSO (0.068), whereas diagnosis-anchored NCC achieved the highest temporal AUPRC for XGBoost (0.086) and MLP (0.070). Temporal AUPRC generally decreased as the required lead time before diagnosis increased. Raw predicted probabilities substantially overestimated observed risks in the temporal cohort. Isotonic recalibration improved probability scaling while largely preserving discrimination, although residual miscalibration remained. Cohort-based feature rankings were more consistent across algorithms, whereas NCC-based rankings depended more strongly on algorithm and index-date anchoring. Conclusion: Study design should be selected and evaluated according to the intended clinical prediction task and deployment setting.