TriaLab Power Studio · Method

Developing a prediction model — binary outcome (Riley et al.)

Prediction models Validated 12 published examples

Sizes the dataset for developing a logistic-regression prediction model to Riley et al.’s criteria — an expected shrinkage of predictor effects of at most 10%, an optimism in the apparent Nagelkerke R² of at most 0.05, the outcome proportion within 0.05, and van Smeden’s mean absolute prediction error within 0.05 — and reports which one binds, with the events and events per parameter that replace the ten-events-per-variable rule. pmsampsize’s type(b).

Also known as: prediction model, prognostic model, diagnostic model, clinical prediction rule, events per variable, EPV, EPP, pmsampsize, Riley, van Smeden, shrinkage, overfitting, logistic regression, TRIPOD.

Maturity

Validated: 12 published examples from 2 independent publications (Riley et al. 2019; Riley et al. 2020) reproduce on every build (ADR-0001 §58).

What it solves for

  • Precision: offered.
  • Sample size: not offered — A development sample for a prediction model has no null hypothesis to reject: Riley’s criteria are precisions and shrinkages that fall with the sample size, and the Precision target is where they live (ADR-0001 §35).
  • Power: not offered — A development sample for a prediction model has no null hypothesis to reject: Riley’s criteria are precisions and shrinkages that fall with the sample size, and the Precision target is where they live (ADR-0001 §35).
  • Detectable effect: not offered — A development sample for a prediction model has no null hypothesis to reject: Riley’s criteria are precisions and shrinkages that fall with the sample size, and the Precision target is where they live (ADR-0001 §35).
  • Assurance: not offered — No source on disk states a prior on this design’s effect, so the assurance modifier is not admitted here.
  • Duration: not offered — A development or validation sample is counted in participants; there is no calendar axis to solve.

Size axes:

  • Participants in the development dataset (participants), Count

Inputs

Every field as the form shows it, with its help. A field marked advanced sits behind Expert mode.

Common to every method

  • Significance level (alpha) (alpha): a number, above 0 and below 1; default 0.05; typically 0.01 to 0.05 (0.05 in most trials; 0.01 for confirmatory claims); entered as proportion (0-1) or percent The type I error rate. Interpreted as two-sided when testing plain equality and one-sided when a margin frame is active, following the usual convention.
  • Target power (power_target): a number, above 0 and below 1; default 0.8; typically 0.8 to 0.9 (0.80 is conventional; 0.90 for definitive trials); entered as proportion (0-1) or percent The chance of a significant result if the assumed effect is real. Used when solving for sample size or detectable effect; ignored when solving for power.

The method’s own

  • Candidate predictor parameters (p) (predictor_parameters): a whole number, at least 1; default 20 Every β term the model might estimate — a categorical predictor with k levels is k − 1, a spline or interaction as many as its terms — for every predictor considered, not only those kept.
  • Anticipated outcome proportion (φ) (outcome_proportion): a number, above 0 and below 1; default 0.2; entered as proportion (0-1) or percent The proportion with the outcome in the target population; it sets the ceiling of the Cox–Snell R² (0.75 at 0.5, 0.33 at 0.05, 0.11 at 0.01) and turns participants into events.
  • Anticipated Cox–Snell R² (adjusted) (r_squared): a number, above 0 and below 1; default 0.1; entered as proportion (0-1) or percent The model’s expected Cox–Snell R² in new data — an existing model’s adjusted value, a fraction of the ceiling (15% of 0.33 is 0.05), or a conservative lower bound; Riley’s figure 4 gives the ways of arriving at it.
  • Anticipated Nagelkerke R² (adjusted) (r_squared_nagelkerke): a number, above 0 and below 1; default 0.15; entered as proportion (0-1) or percent The Cox–Snell R² over its ceiling: the proportion of the explainable variation the model explains. Converted by the ceiling at the outcome proportion entered.
  • Shrinkage factor to hold, S (shrinkage_target): a number, above 0 and below 1; default 0.9; entered as proportion (0-1) or percent The expected shrinkage of the predictor effects on new data; 0.9 is 10% shrinkage, Riley’s recommendation.
  • Optimism in Nagelkerke’s R² to allow, δ (optimism_target), advanced: a number, above 0 and below 1; default 0.05; entered as proportion (0-1) or percent The largest difference between the apparent and the adjusted Nagelkerke R²; 0.05 is Riley’s recommendation.
  • Margin of error of the outcome proportion to allow (margin_target), advanced: a number, above 0 and below 1; default 0.05; entered as proportion (0-1) or percent Half the width of the 95% interval for the overall outcome proportion — the model’s intercept; 0.05 is Riley’s recommendation (385 participants at a proportion of 0.5).
  • Mean absolute prediction error to allow (mape_target), advanced: a number, above 0 and below 1; default 0.05; entered as proportion (0-1) or percent Van Smeden’s average absolute difference between predicted and true probabilities, for up to 30 candidate parameters; 0.05 is the BMJ’s recommendation.
  • Criteria index target (half_width_target), advanced: a number, above 0; default 1 The design is sized so that every criterion’s shortfall is within this multiple of its allowance: 1 meets Riley’s recommendations exactly, 0.5 halves every allowance, 2 doubles them. The index reported is the worst criterion’s shortfall over its allowance at the size found.

Sizes entered when another axis is solved for

  • Participants in the development dataset (participants): a whole number, at least 1 Participants in the development dataset. Required when solving for power or detectable effect; produced by the solver when solving for sample size.

Ways to express an input

Anticipated model fit — The model’s expected proportion of variation explained, on either R² scale.

  • Cox–Snell R², the form’s default: The scale the formulas use. (fields r_squared)
  • Nagelkerke R²: Scaled to the ceiling at this outcome proportion. (fields r_squared_nagelkerke)

Modifiers admitted

  • dropout: Dropout

Published examples it reproduces (12)

Each is a worked example: the inputs as a user enters them, and the number the source prints, which the engine reproduces within the tolerance on every build (the Validation screen runs them on your machine).

Source Example Solves for Inputs Published
Riley et al. 2019, Stat Med 38:1276, Part II 20 candidate parameters, Cox–Snell R² 0.1 => 1698 for a shrinkage of 0.9 (§2.3; the formula’s 1698.04, which pmsampsize rounds to 1699) Precision alpha = 0.05; half_width_target = 1; mape_target = 0.05; margin_target = 0.05; optimism_target = 0.05; outcome_proportion = 0.3; predictor_parameters = 20; r_squared = 0.1; shrinkage_target = 0.9; fit expressed as cox_snell n_shrinkage = 1698 ± 1
Riley et al. 2019, Stat Med 38:1276, Part II An outcome proportion of 0.5 within 0.05 => 385 participants (§4.2) Precision alpha = 0.05; half_width_target = 1; mape_target = 0.05; margin_target = 0.05; optimism_target = 0.05; outcome_proportion = 0.5; predictor_parameters = 20; r_squared = 0.1; shrinkage_target = 0.9; fit expressed as cox_snell n_proportion = 385 ± 0.5
Riley et al. 2019, Stat Med 38:1276, Part II An outcome proportion of 0.1 within 0.05 => 139 participants (§4.2) Precision alpha = 0.05; half_width_target = 1; mape_target = 0.05; margin_target = 0.05; optimism_target = 0.05; outcome_proportion = 0.1; predictor_parameters = 20; r_squared = 0.1; shrinkage_target = 0.9; fit expressed as cox_snell n_proportion = 139 ± 0.5
Riley et al. 2019, Stat Med 38:1276, Part II An outcome proportion of 0.2 within 0.05 => 246 participants (§4.2) Precision alpha = 0.05; half_width_target = 1; mape_target = 0.05; margin_target = 0.05; optimism_target = 0.05; outcome_proportion = 0.2; predictor_parameters = 20; r_squared = 0.1; shrinkage_target = 0.9; fit expressed as cox_snell n_proportion = 246 ± 0.5
Riley et al. 2019, Stat Med 38:1276, Part II Chronic Chagas disease: 24 candidate parameters, Cox–Snell R² 0.288, prevalence 0.174 => 623 for a shrinkage of 0.9 (§5.1.2) Precision alpha = 0.05; half_width_target = 1; mape_target = 0.5; margin_target = 0.05; optimism_target = 0.05; outcome_proportion = 0.174; predictor_parameters = 24; r_squared = 0.288; shrinkage_target = 0.9; fit expressed as cox_snell n_shrinkage = 623 ± 0.5
Riley et al. 2019, Stat Med 38:1276, Part II Chagas: the prevalence of 0.174 within 0.05 => 221 (§5.1.4) Precision alpha = 0.05; half_width_target = 1; mape_target = 0.5; margin_target = 0.05; optimism_target = 0.05; outcome_proportion = 0.174; predictor_parameters = 24; r_squared = 0.288; shrinkage_target = 0.9; fit expressed as cox_snell n_proportion = 221 ± 0.5
Riley et al. 2019, Stat Med 38:1276, Part II Chagas: an optimism of 0.05 in Nagelkerke’s R² => 668 (§5.1.3), where the paper rounds the ceiling to 0.60 and the shrinkage it needs to 0.906; the exact ceiling 0.6032 gives 662, as pmsampsize does Precision alpha = 0.05; half_width_target = 1; mape_target = 0.5; margin_target = 0.05; optimism_target = 0.05; outcome_proportion = 0.174; predictor_parameters = 24; r_squared = 0.288; shrinkage_target = 0.9; fit expressed as cox_snell n_optimism = 668 ± 6
Riley et al. 2019, Stat Med 38:1276, Part II Chagas: 668 in all, the optimism binding (662 exactly); the 2020 paper’s mean absolute error criterion, which Part II predates, is relaxed Precision alpha = 0.05; half_width_target = 1; mape_target = 0.5; margin_target = 0.05; optimism_target = 0.05; outcome_proportion = 0.174; predictor_parameters = 24; r_squared = 0.288; shrinkage_target = 0.9; fit expressed as cox_snell participants = 668 ± 6
Riley et al. 2020, BMJ 368:m441 Pre-eclampsia: 30 candidate parameters, Cox–Snell R² 0.05 (15% of the ceiling 0.33), outcome proportion 0.05 => 5249 in all, the shrinkage binding (263 events, 8.75 per parameter) Precision alpha = 0.05; half_width_target = 1; mape_target = 0.05; margin_target = 0.05; optimism_target = 0.05; outcome_proportion = 0.05; predictor_parameters = 30; r_squared = 0.05; shrinkage_target = 0.9; fit expressed as cox_snell participants = 5249 ± 0.5
Riley et al. 2020, BMJ 368:m441 Pre-eclampsia: a mean absolute prediction error of 0.05 => 544 (figure 2’s formula) Precision alpha = 0.05; half_width_target = 1; mape_target = 0.05; margin_target = 0.05; optimism_target = 0.05; outcome_proportion = 0.05; predictor_parameters = 30; r_squared = 0.05; shrinkage_target = 0.9; fit expressed as cox_snell n_mape = 544 ± 0.5
Riley et al. 2020, BMJ 368:m441 Pre-eclampsia with 20 candidate parameters => 3500 in all Precision alpha = 0.05; half_width_target = 1; mape_target = 0.05; margin_target = 0.05; optimism_target = 0.05; outcome_proportion = 0.05; predictor_parameters = 20; r_squared = 0.05; shrinkage_target = 0.9; fit expressed as cox_snell participants = 3500 ± 0.5
Riley et al. 2020, BMJ 368:m441 10 candidate parameters, outcome proportion 0.3 => 461 for a mean absolute prediction error of 0.05 (the text beside figure 2) Precision alpha = 0.05; half_width_target = 1; mape_target = 0.05; margin_target = 0.05; optimism_target = 0.05; outcome_proportion = 0.3; predictor_parameters = 10; r_squared = 0.1; shrinkage_target = 0.9; fit expressed as cox_snell n_mape = 461 ± 0.5

Sources

  1. Riley RD, Snell KIE, Ensor J, et al. Minimum sample size for developing a multivariable prediction model: Part II - binary and time-to-event outcomes. Stat Med. 2019;38(7):1276-1296.
  2. Riley RD, Ensor J, Snell KIE, et al. Calculating the sample size required for developing a clinical prediction model. BMJ. 2020;368:m441.
  3. van Smeden M, Moons KGM, de Groot JAH, et al. Sample size for binary logistic prediction models: beyond events per variable criteria. Stat Methods Med Res. 2019;28(8):2455-2474.

This page was generated from TriaLab Power Studio 2.0.1's engine, as the method is built, and is published in English only. All methods →