Prediction models are everywhere in health research. The paper below notes that about 250,000 had been published by 2024, and Ethiopian researchers publish more every year: risk scores for neonatal death, pre-eclampsia, treatment failure, stunting. Very few reach clinical use. One of the most common reasons is simple: the model was developed on too few people, so it fits the development data well and predicts poorly in new patients.
A study published on 13 November 2026 in BMJ Medicine asks a practical question: which sample size calculation should you use? Nigus Bililign Yimer, Yitayeh Belsti, Helena Teede, Richard D Riley and Joanne Enticott compared the main methods on routine data from 78,170 pregnancies in three Australian maternity hospitals, for a rare outcome (pre-eclampsia, 3.2%) and a common one (gestational diabetes, 20.3%).
Three methods, three targets
Each method answers a different question, and that is why their numbers differ.
Method 1, the Riley criteria (closed-form; the R package pmsampsize). The model should not overfit (expected shrinkage of at least 0.9), its R² should not be too optimistic, and it should estimate the overall risk precisely. This is about performance across the population.
Method 2, a simulation-based version (Pavlou et al.; the R package samplesizedev). The same aims, calculated more exactly, with a small average prediction error.
Method 3, individual-level stability (Riley et al. 2025; the R package pmstabilityss). Would a woman classified as high risk still be classified as high risk if the model had been developed on a different sample from the same population?
| Required sample size | Pre-eclampsia (rare) | Gestational diabetes (common) |
|---|---|---|
| Method 1: Riley criteria | 3,097 | 519 |
| Method 2: simulation | 3,935 | 954 |
| Method 3: individual-level stability | 150,318 | 52,269 |
Population-level accuracy needs a modest sample. Stable predictions for individual patients need tens of times more, and rare outcomes need the most. The authors also applied a simulation-based general framework for sample size (Riley et al., 2026), which encompasses the three methods above: penalised logistic regression (lasso, ridge) kept the most stable calibration even with small samples, while a random forest discriminated consistently but stayed miscalibrated (calibration slope about 1.7) at every sample size.
Their advice: choose the method by what the model is for. A model that describes risk in a population can be developed on fewer people than one whose individual predictions will decide who gets an intervention. And whichever method you use, report it in the protocol and the paper, as TRIPOD+AI asks.
Working through method 1
Method 1 is where most studies start, because it needs only four things you can usually find before collecting any data:
- The outcome prevalence in the people the model is for, from a similar study or routine data.
- The number of candidate predictor parameters. Count parameters, not variables: a categorical predictor with k categories uses k − 1, and a spline or an interaction adds more. The pre-eclampsia model had 15 predictors but 20 parameters, because language had seven categories.
- The C-statistic you expect, from a previous model for the same outcome. A cautious guess is better than an optimistic one.
- How precisely the overall risk must be estimated, usually ±5 percentage points.
From the C-statistic and the prevalence, the calculation anticipates the model's Cox–Snell R², which says how much the predictors explain. Then it checks three criteria and takes the largest:
- Little overfitting: n = P / ((S − 1) ln(1 − R²/S)), with S = 0.9.
- Small optimism in R²: the same formula, with the S that keeps the optimism in Nagelkerke R² under 0.05.
- A precise overall risk: n = (1.96 / 0.05)² × φ(1 − φ), where φ is the prevalence.
For the pre-eclampsia model (20 parameters, prevalence 3.2%, C-statistic 0.84):
| Criterion | People needed |
|---|---|
| Little overfitting (shrinkage at least 0.9) | 3,097 |
| Small optimism in R² | 1,566 |
| Precise overall risk (±5 points) | 48 |
| Minimum | 3,097 |
That is about 100 women with pre-eclampsia, or 5.0 events per candidate parameter. The old rule of thumb of 10 events per variable would have asked for 200 events here, and in other settings it asks for too few. The criteria replace it with a number that depends on the data and the model.
For gestational diabetes (17 parameters, 20.3%, C-statistic 0.85) the minimum is 519: about 105 women with the outcome.
Try it
The calculation is now in Researchite's free sample size calculator, which needs no account. Open researchite.com/sample-size, choose Calculation method → Develop a risk prediction model, and enter your four numbers. It shows each criterion, the events per parameter, the formula and the references; with a free account, the study planner also drafts the methods section for your protocol. It gives the same numbers as pmsampsize, including 3,097 and 519 for the paper's two examples.
It covers method 1 for yes/no, continuous and time-to-event outcomes, and it also sizes a study that validates an existing model in a new population (precise calibration, C-statistic and, optionally, net benefit, as the R function pmvalsampsize does). For methods 2 and 3, use the R packages the paper used: samplesizedev and pmstabilityss.
A methods paragraph you can adapt
The minimum sample size for developing the prediction model was calculated with the criteria of Riley et al. (2020), for a binary outcome with an anticipated prevalence of 3.2%, 20 candidate predictor parameters and an anticipated C-statistic of 0.84 from a previous model. The criteria require an expected uniform shrinkage of at least 0.9, optimism in Nagelkerke R² of at most 0.05, and estimation of the overall risk within ±0.05. The minimum sample size was 3,097 women, about 100 events (5.0 events per candidate parameter).
Before you collect data
- Count parameters honestly. Every category, spline term and interaction counts. If the number is too large for the data you can get, prespecify fewer predictors from the literature rather than selecting them from your data.
- Use a cautious C-statistic. An optimistic one makes the required sample smaller than it should be.
- Ask what the model is for. If a clinician will act on an individual's predicted risk at a threshold, the minimum from method 1 is not enough: check individual-level stability (method 3).
- For routine data you already have, the calculation still tells you whether the data are enough to develop a reliable model.
Reference Yimer NB, Belsti Y, Teede H, Riley RD, Enticott J. Sample size calculations for developing clinical prediction models for binary outcomes: applied methodological study with real examples. BMJ Medicine 2026;5(1):e002750. https://bmjmedicine.bmj.com/content/5/1/e002750
Riley RD, Ensor J, Snell KIE, et al. Calculating the sample size required for developing a clinical prediction model. BMJ 2020;368:m441.
Riley RD, Whittle R, Sadatsafavi M, Martin GP, Pate A, Collins GS, Ensor J. A general sample size framework for developing or updating a predictive algorithm: with application to clinical prediction models. BMC Medical Research Methodology 2026;26(1):121. https://pubmed.ncbi.nlm.nih.gov/42056904/

Tesfahun Mulatu
Epidemiologist and biostatistician with more than 10 years in academia and research, including multi-country and mixed-methods studies with local and international research institutions, and monitoring, evaluation and learning across Ethiopia’s development and humanitarian sectors on projects funded by UN agencies and international donors. Tesfahun’s work spans maternal and child health, sexual and reproductive health, gender-based violence and mental health, with over 19 publications.
Epidemiologist and biostatistician, founder of Researchite · LinkedIn