TriaLab Power Studio · Method
Externally validating a prediction model — binary outcome (Riley et al.)
Sizes an external validation study of a risk prediction model to Riley et al.’s criteria — the O/E ratio, the calibration slope and the C-statistic each estimated to a target precision, and the net benefit at a risk threshold when one is given — from the outcome proportion, the anticipated C-statistic and the distribution of the model’s linear predictor, and reports which one binds. pmvalsampsize’s binary type, with the expectations integrated rather than simulated.
Also known as: external validation, prediction model, calibration slope, O/E, observed to expected, C-statistic, AUC, net benefit, decision curve, pmvalsampsize, Riley, TRIPOD.
Maturity
Validated: 18 published examples from 2 independent publications (Pavlou et al. 2021; Riley et al. 2021) reproduce on every build (ADR-0001 §58).
What it solves for
- Precision: offered.
- Sample size: not offered — A validation 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 validation 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 validation 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 validation 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
- 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 validation population; it turns participants into events. - Anticipated C-statistic on validation (
cstatistic): a number, above 0.5 and below 1; default 0.75; entered as proportion (0-1) or percent The model’s discrimination in the validation population — the development value, or 0.05 below it to be safe; Riley et al. suggest trying both and keeping the larger sample. - Distribution of the linear predictor (
lp_distribution): a choice; defaultnormalWhat is known of the model’s linear predictor (its logit risk) in the validation population — a normal with a mean and SD from the development study, a beta distribution of the predicted risks read off a histogram, or the two normals with a common variance a C-statistic implies (Riley’s equation 10, a strong assumption they show can double the sample).normalNormal, with a mean and SD: As reported for the development data.beta_riskBeta distribution of the predicted risks: Its logit is the linear predictor.from_cstatisticFrom the C-statistic: Events N(μ + s², s²) and non-events N(μ, s²), s² = 2(Φ⁻¹(C))², the mean solved for the outcome proportion.
- Mean of the linear predictor (
lp_mean): a number, any finite number; default -1.5 Under the normal description; check that the distribution’s implied outcome proportion (a derived row) is the one anticipated. - SD of the linear predictor (
lp_sd): a number, above 0; default 1.5 Under the normal description; a wider spread needs fewer participants. - Beta shape α of the predicted risks (
risk_alpha), advanced: a number, above 0; default 2 Under the beta description. - Beta shape β of the predicted risks (
risk_beta), advanced: a number, above 0; default 8 Under the beta description. - Interval width for O/E (
oe_ci_width): a number, above 0; default 0.2 The full width of the 95% confidence interval targeted. - Standard error of ln(O/E) (
oe_se): a number, above 0; default 0.051 The standard error targeted; the interval is ± 1.96 of it. - Interval width for the calibration slope (
slope_ci_width): a number, above 0; default 0.2 The full width of the 95% confidence interval targeted. - Standard error of the calibration slope (
slope_se): a number, above 0; default 0.051 The standard error targeted; the interval is ± 1.96 of it. - Interval width for the C-statistic (
cstat_ci_width): a number, above 0; default 0.1 The full width of the 95% confidence interval targeted. - Standard error of the C-statistic (
cstat_se): a number, above 0; default 0.0255 The standard error targeted; the interval is ± 1.96 of it. - Anticipated O/E ratio (
oe_ratio), advanced: a number, above 0; default 1 Observed over expected outcome events; 1 is calibration-in-the-large. It enters only the conversion of an interval width to the standard error of ln(O/E). - Anticipated calibration slope (
calibration_slope), advanced: a number, above 0; default 1 1 is the conservative choice; below 1 (an overfitted model) lowers the sample, and the calibration intercept is then solved to keep the outcome proportion. - Risk threshold for net benefit (blank: not sized) (
risk_threshold), advanced: a number, above 0 and below 1; entered as proportion (0-1) or percent The predicted risk above which the model would act; the net benefit there is sized to its own precision when given. - Sensitivity and specificity at the threshold (
classification): a choice; defaultfrom_linear_predictorDerived from the linear predictor’s distribution — the model’s classification of the outcomes its own risks generate — or entered.from_linear_predictorFrom the linear predictor: As Riley’s §4.4 derives them.enteredEntered: From a published classification table.
- Sensitivity at the threshold (
sensitivity), advanced: a number, above 0 and below 1; entered as proportion (0-1) or percent When entered. - Specificity at the threshold (
specificity), advanced: a number, above 0 and below 1; entered as proportion (0-1) or percent When entered. - Standard error to hold for the standardised net benefit (
nb_se_target), advanced: a number, above 0; default 0.051 0.051 targets a 95% interval about 0.2 wide, Marsh et al.’s choice. - 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 validation dataset (
participants): a whole number, at least 1 Participants in the validation dataset. Required when solving for power or detectable effect; produced by the solver when solving for sample size.
Ways to express an input
Precision for O/E — A 95% interval width of 0.2 on the O/E scale (0.9 to 1.1 at 1) is Riley’s starting point; wider where the outcome is rare.
- Interval width, the form’s default: What Riley et al. state first. (fields
oe_ci_width) - Standard error: What their formulas take. (fields
oe_se)
Precision for the calibration slope — A 95% interval width of 0.2 (0.9 to 1.1 at a slope of 1) is Riley’s recommendation.
- Interval width, the form’s default: What Riley et al. state first. (fields
slope_ci_width) - Standard error: What their formulas take. (fields
slope_se)
Precision for the C-statistic — A 95% interval width of 0.1 is Riley’s recommendation.
- Interval width, the form’s default: What Riley et al. state first. (fields
cstat_ci_width) - Standard error: What their formulas take. (fields
cstat_se)
Modifiers admitted
dropout: Dropout
Published examples it reproduces (18)
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. 2021, Stat Med 40:4230 | O/E at an outcome proportion of 0.5 and a standard error of ln(O/E) of 0.051 => 385 | Precision | alpha = 0.05; calibration_slope = 1; cstat_se = 0.0255; cstatistic = 0.8; half_width_target = 1; lp_distribution = normal; lp_mean = -1.75; lp_sd = 1.47; nb_se_target = 0.051; oe_ratio = 1; oe_se = 0.051; outcome_proportion = 0.5; slope_se = 0.051; cstat_precision expressed as cstat_se; oe_precision expressed as oe_se; slope_precision expressed as slope_se |
n_oe = 385 ± 0.5 |
| Riley et al. 2021, Stat Med 40:4230 | O/E at an outcome proportion of 0.1 and a standard error of ln(O/E) of 0.051 => 3461 | Precision | alpha = 0.05; calibration_slope = 1; cstat_se = 0.0255; cstatistic = 0.8; half_width_target = 1; lp_distribution = normal; lp_mean = -1.75; lp_sd = 1.47; nb_se_target = 0.051; oe_ratio = 1; oe_se = 0.051; outcome_proportion = 0.1; slope_se = 0.051; cstat_precision expressed as cstat_se; oe_precision expressed as oe_se; slope_precision expressed as slope_se |
n_oe = 3461 ± 0.5 |
| Riley et al. 2021, Stat Med 40:4230 | O/E at an outcome proportion of 0.1 and a standard error of ln(O/E) of 0.175 => 294 | Precision | alpha = 0.05; calibration_slope = 1; cstat_se = 0.0255; cstatistic = 0.8; half_width_target = 1; lp_distribution = normal; lp_mean = -1.75; lp_sd = 1.47; nb_se_target = 0.051; oe_ratio = 1; oe_se = 0.175; outcome_proportion = 0.1; slope_se = 0.051; cstat_precision expressed as cstat_se; oe_precision expressed as oe_se; slope_precision expressed as slope_se |
n_oe = 294 ± 0.5 |
| Riley et al. 2021, Stat Med 40:4230 | O/E at an outcome proportion of 0.018 and a standard error of ln(O/E) of 0.245 => 909 | Precision | alpha = 0.05; calibration_slope = 1; cstat_se = 0.0255; cstatistic = 0.8; half_width_target = 1; lp_distribution = normal; lp_mean = -1.75; lp_sd = 1.47; nb_se_target = 0.051; oe_ratio = 1; oe_se = 0.245; outcome_proportion = 0.018; slope_se = 0.051; cstat_precision expressed as cstat_se; oe_precision expressed as oe_se; slope_precision expressed as slope_se |
n_oe = 909 ± 0.5 |
| Riley et al. 2021, Stat Med 40:4230 | DVT: linear predictor N(−1.75, 1.47²), outcome proportion 0.22, slope 1, standard error 0.051 => 2407 from their million-draw I’s (0.1289, −0.1237, 0.2784); the integrals give 2408 | Precision | alpha = 0.05; calibration_slope = 1; cstat_se = 0.0255; cstatistic = 0.8; half_width_target = 1; lp_distribution = normal; lp_mean = -1.75; lp_sd = 1.47; nb_se_target = 0.051; oe_ratio = 1; oe_se = 0.051; outcome_proportion = 0.22; slope_se = 0.051; cstat_precision expressed as cstat_se; oe_precision expressed as oe_se; slope_precision expressed as slope_se |
n_slope = 2407 ± 1.5 |
| Riley et al. 2021, Stat Med 40:4230 | Mechanical heart valve: linear predictor N(−5.799, 2.237²), outcome proportion 0.018 => 8286 by their simulation (§4.6.2); the integrals give 8293 | Precision | alpha = 0.05; calibration_slope = 1; cstat_se = 0.0255; cstatistic = 0.8; half_width_target = 1; lp_distribution = normal; lp_mean = -5.799; lp_sd = 2.237; nb_se_target = 0.051; oe_ratio = 1; oe_se = 0.051; outcome_proportion = 0.018; slope_se = 0.051; cstat_precision expressed as cstat_se; oe_precision expressed as oe_se; slope_precision expressed as slope_se |
n_slope = 8286 ± 8 |
| Riley et al. 2021, Stat Med 40:4230 | Mechanical heart valve: linear predictor N(−5, 2.5²) => 4555 by their simulation (§4.6.1); the integrals give 4558 | Precision | alpha = 0.05; calibration_slope = 1; cstat_se = 0.0255; cstatistic = 0.8; half_width_target = 1; lp_distribution = normal; lp_mean = -5; lp_sd = 2.5; nb_se_target = 0.051; oe_ratio = 1; oe_se = 0.051; outcome_proportion = 0.018; slope_se = 0.051; cstat_precision expressed as cstat_se; oe_precision expressed as oe_se; slope_precision expressed as slope_se |
n_slope = 4555 ± 4 |
| Riley et al. 2021, Stat Med 40:4230 | Mechanical heart valve from the C-statistic 0.8 alone: two normals with variance 1.417 => 17049 with the mean −4.7 they found by trial (§4.6.3); the mean solved, −4.7075, gives 17143 | Precision | alpha = 0.05; calibration_slope = 1; cstat_se = 0.0255; cstatistic = 0.8; half_width_target = 1; lp_distribution = from_cstatistic; lp_mean = -1.75; lp_sd = 1.47; nb_se_target = 0.051; oe_ratio = 1; oe_se = 0.051; outcome_proportion = 0.018; slope_se = 0.051; cstat_precision expressed as cstat_se; oe_precision expressed as oe_se; slope_precision expressed as slope_se |
n_slope = 17049 ± 100 |
| Riley et al. 2021, Stat Med 40:4230 | C-statistic 0.7 at an outcome proportion of 0.1, interval width 0.1 => 1154 (their z is 1.96 to two places, this engine’s 1.959964, which moves the smallest of these by one) | Precision | alpha = 0.05; calibration_slope = 1; cstat_ci_width = 0.1; cstat_se = 0.0255; cstatistic = 0.7; half_width_target = 1; lp_distribution = normal; lp_mean = -1.75; lp_sd = 1.47; nb_se_target = 0.051; oe_ratio = 1; oe_se = 0.051; outcome_proportion = 0.1; slope_se = 0.051; cstat_precision expressed as cstat_ci_width; oe_precision expressed as oe_se; slope_precision expressed as slope_se |
n_cstat = 1154 ± 1 |
| Riley et al. 2021, Stat Med 40:4230 | C-statistic 0.8 at an outcome proportion of 0.5, interval width 0.1 => 302 (their z is 1.96 to two places, this engine’s 1.959964, which moves the smallest of these by one) | Precision | alpha = 0.05; calibration_slope = 1; cstat_ci_width = 0.1; cstat_se = 0.0255; cstatistic = 0.8; half_width_target = 1; lp_distribution = normal; lp_mean = -1.75; lp_sd = 1.47; nb_se_target = 0.051; oe_ratio = 1; oe_se = 0.051; outcome_proportion = 0.5; slope_se = 0.051; cstat_precision expressed as cstat_ci_width; oe_precision expressed as oe_se; slope_precision expressed as slope_se |
n_cstat = 302 ± 1 |
| Riley et al. 2021, Stat Med 40:4230 | C-statistic 0.8 at an outcome proportion of 0.018, interval width 0.1 => 4252 (their z is 1.96 to two places, this engine’s 1.959964, which moves the smallest of these by one) | Precision | alpha = 0.05; calibration_slope = 1; cstat_ci_width = 0.1; cstat_se = 0.0255; cstatistic = 0.8; half_width_target = 1; lp_distribution = normal; lp_mean = -1.75; lp_sd = 1.47; nb_se_target = 0.051; oe_ratio = 1; oe_se = 0.051; outcome_proportion = 0.018; slope_se = 0.051; cstat_precision expressed as cstat_ci_width; oe_precision expressed as oe_se; slope_precision expressed as slope_se |
n_cstat = 4252 ± 1 |
| Riley et al. 2021, Stat Med 40:4230 | C-statistic 0.75 at an outcome proportion of 0.018, interval width 0.1 => 5125 (their z is 1.96 to two places, this engine’s 1.959964, which moves the smallest of these by one) | Precision | alpha = 0.05; calibration_slope = 1; cstat_ci_width = 0.1; cstat_se = 0.0255; cstatistic = 0.75; half_width_target = 1; lp_distribution = normal; lp_mean = -1.75; lp_sd = 1.47; nb_se_target = 0.051; oe_ratio = 1; oe_se = 0.051; outcome_proportion = 0.018; slope_se = 0.051; cstat_precision expressed as cstat_ci_width; oe_precision expressed as oe_se; slope_precision expressed as slope_se |
n_cstat = 5125 ± 1 |
| Riley et al. 2021, Stat Med 40:4230 | C-statistic 0.85 at an outcome proportion of 0.018, interval width 0.1 => 3271 (their z is 1.96 to two places, this engine’s 1.959964, which moves the smallest of these by one) | Precision | alpha = 0.05; calibration_slope = 1; cstat_ci_width = 0.1; cstat_se = 0.0255; cstatistic = 0.85; half_width_target = 1; lp_distribution = normal; lp_mean = -1.75; lp_sd = 1.47; nb_se_target = 0.051; oe_ratio = 1; oe_se = 0.051; outcome_proportion = 0.018; slope_se = 0.051; cstat_precision expressed as cstat_ci_width; oe_precision expressed as oe_se; slope_precision expressed as slope_se |
n_cstat = 3271 ± 1 |
| Riley et al. 2021, Stat Med 40:4230 | Marsh et al.’s example: outcome proportion 0.72, threshold 0.8, sensitivity 0.60, specificity 0.88, standard error 0.051 => 546 | Precision | alpha = 0.05; calibration_slope = 1; classification = entered; cstat_se = 0.0255; cstatistic = 0.8; half_width_target = 1; lp_distribution = normal; lp_mean = -1.75; lp_sd = 1.47; nb_se_target = 0.051; oe_ratio = 1; oe_se = 0.051; outcome_proportion = 0.72; risk_threshold = 0.8; sensitivity = 0.6; slope_se = 0.051; specificity = 0.88; cstat_precision expressed as cstat_se; oe_precision expressed as oe_se; slope_precision expressed as slope_se |
n_net_benefit = 546 ± 0.5 |
| Riley et al. 2021, Stat Med 40:4230 | Mechanical heart valve: threshold 0.08, sensitivity 0.53, specificity 0.96, standard error 0.051 => 6443 | Precision | alpha = 0.05; calibration_slope = 1; classification = entered; cstat_se = 0.0255; cstatistic = 0.8; half_width_target = 1; lp_distribution = normal; lp_mean = -1.75; lp_sd = 1.47; nb_se_target = 0.051; oe_ratio = 1; oe_se = 0.051; outcome_proportion = 0.018; risk_threshold = 0.08; sensitivity = 0.53; slope_se = 0.051; specificity = 0.96; cstat_precision expressed as cstat_se; oe_precision expressed as oe_se; slope_precision expressed as slope_se |
n_net_benefit = 6443 ± 0.5 |
| Pavlou et al. 2021, Stat Methods Med Res 30:2187, §4.1, p. 9 | C-statistic 0.72, outcome proportion 0.1, linear predictor N(-2.469, 0.8491²) — the mean of their (7), the two-normal variance in place of their misprinted (8) — calibration slope 1 to a standard error of 0.15 => 860 participants (86 events) rounded up to the ten, so a whole size from 851 to 860 | Precision | alpha = 0.05; calibration_slope = 1; cstat_se = 0.025; cstatistic = 0.72; half_width_target = 1; lp_distribution = normal; lp_mean = -2.468988; lp_sd = 0.849089; nb_se_target = 0.051; oe_ratio = 1; oe_se = 0.051; outcome_proportion = 0.1; slope_se = 0.15; cstat_precision expressed as cstat_se; oe_precision expressed as oe_se; slope_precision expressed as slope_se |
n_slope = 855.5 ± 4.5 |
| Pavlou et al. 2021, Stat Methods Med Res 30:2187, §4.1, p. 9 | C-statistic 0.8, outcome proportion 0.1, linear predictor N(-2.7639, 1.2638²) — the mean of their (7), the two-normal variance in place of their misprinted (8) — calibration slope 1 to a standard error of 0.15 => 510 participants (51 events) rounded up to the ten, so a whole size from 501 to 510 | Precision | alpha = 0.05; calibration_slope = 1; cstat_se = 0.025; cstatistic = 0.8; half_width_target = 1; lp_distribution = normal; lp_mean = -2.763886; lp_sd = 1.263833; nb_se_target = 0.051; oe_ratio = 1; oe_se = 0.051; outcome_proportion = 0.1; slope_se = 0.15; cstat_precision expressed as cstat_se; oe_precision expressed as oe_se; slope_precision expressed as slope_se |
n_slope = 505.5 ± 4.5 |
| Pavlou et al. 2021, Stat Methods Med Res 30:2187, §7, p. 16 | C-statistic 0.77, outcome proportion 0.057, linear predictor N(-3.2897, 1.0751²) — the mean of their (7), the two-normal variance in place of their misprinted (8) — calibration slope 1 to a standard error of 0.15 => 940 participants (54 events) rounded up to the ten, so a whole size from 931 to 940 | Precision | alpha = 0.05; calibration_slope = 1; cstat_se = 0.025; cstatistic = 0.77; half_width_target = 1; lp_distribution = normal; lp_mean = -3.289678; lp_sd = 1.07511; nb_se_target = 0.051; oe_ratio = 1; oe_se = 0.051; outcome_proportion = 0.057; slope_se = 0.15; cstat_precision expressed as cstat_se; oe_precision expressed as oe_se; slope_precision expressed as slope_se |
n_slope = 935.5 ± 4.5 |
Sources
- Riley RD, Debray TPA, Collins GS, et al. Minimum sample size for external validation of a clinical prediction model with a binary outcome. Stat Med. 2021;40(19):4230-4251.
- Pavlou M, Qu C, Omar RZ, Seaman SR, Steyerberg EW, White IR, et al. Estimation of required sample size for external validation of risk models for binary outcomes. Stat Methods Med Res. 2021;30(10):2187-2206.
- Marsh TL, Janes H, Pepe MS. Statistical inference for net benefit measures in biomarker validation studies. Biometrics. 2020;76(3):843-852.
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 →