WorksMathematics
Evaluation of clinical prediction models: Decomposing performance uncertainty into model development and validation components
Abstract
There has been growing emphasis on acknowledging, quantifying, and communicating the uncertainty inherent in the output of clinical prediction models. However, allowing for model uncertainty when assessing the performance of an existing model in a new sample (i.e., external validation) has not been sufficiently explored. When validating a model that generates uncertain predictions, the uncertainty of a given performance metric is affected by both model uncertainty and the finiteness of the validation sample (validation uncertainty). For a given performance metric, we show that the total uncertainty of the performance estimate can be decomposed into the uncertainty due to the model and the uncertainty due to the validation. Also, we propose , the fraction of the total variance due to model uncertainty, and , the fraction of the total variance due to validation uncertainty. These measures serve as complementary scalar indices that can be implemented for common performance metrics and visualizations such as calibration plots using simple Monte Carlo algorithms. Critically, our case study shows that with the same model and the same validation sample, the contribution of uncertainty sources is highly variable across performance metrics ( varying from 12% for the Brier score to 78% for the calibration slope). This indicates that stakeholders who prioritize different aspects of performance (e.g., calibration versus clinical utility) might arrive at different decisions on whether future efforts should be directed towards creating a more reliable model or procuring a larger validation sample. In conclusion, external validation studies can readily be amended to incorporate model uncertainty, and we recommend that such studies report total variance as well as the relative share of variance components for all performance metrics.
From Faculty of Medicine and Faculty of Pharmaceutical Sciences, The University of British Columbia (MS); Department of Statistics, The University of British Columbia (PG); Department of Applied Health Sciences, School of Health Sciences, College of Medicine and Health, University of Birmingham, and National Institute for Health and Care Research (NIHR) Birmingham Biomedical Research Centre (RDR)
Background
Clinical prediction models are algorithms that make outcome predictions for individuals conditional on their personal characteristics (predictors). Examples include the Framingham score for predicting 10-year risk of cardiovascular conditions[1], or the ISARIC 4C model for predicting the risk of in-hospital mortality in patients admitted to hospital with COVID-19[2].
As these algorithms are developed in finite samples, their estimated predictor-outcome associations, and thus their predictions, are inherently uncertain. This “model uncertainty” has been conceptualized as the advertised model being one possible model from a “multiverse of models” that may arise when repeating a particular model development approach to every possible sample of a particular size from the development population[3].
The relevance of acknowledging, documenting, and reporting model uncertainty is increasingly recognized[4, 5]. During regression model development, uncertainty in model parameters can be characterized by the covariance matrix of the estimated regression coefficients, or by multiple sets of coefficients generated via Monte Carlo sampling or bootstrapping. However, not all models have a clearly defined set of parameters. More generally, development-phase uncertainty can be considered in terms of the instability of predictions, or summary metrics such as calibration, due to the finite development sample[6]. Whether to consider model uncertainty, and how to present such uncertainty, at deployment is the subject of an ongoing debate[4, 5, 7, 8, 9, 10, 11].
Model validation is a critical step between development and deployment, in which a model’s performance is assessed in an independent sample from the target population across several domains (e.g., prediction error, discrimination, calibration, and clinical utility)[12, 13, 14]. The current machinery of validation studies is based on assessing point predictions, with reported uncertainty (e.g., 95% confidence intervals) solely reflecting the finite validation sample, and not uncertainty in predictions. To the best of our knowledge, the relevance of model uncertainty during a validation study has not been sufficiently explored.
Whether model uncertainty should be considered during model validation can be more formally viewed as a question of what constitutes evidence under assessment. One perspective is to see the model as a fixed advertised product, and remain agnostic to what has transpired during model development. An alternative perspective sees the model as the output of an inherently stochastic pipeline which would generate a different product (another model from the multiverse) if repeated. The key source of uncertainty in the output of this pipeline is the finite development sample, but it might also include the model development strategy such as the analytical framework (e.g., functional form, link function), candidate predictors, variable selection, handling of missing values, and so on. This perspective is interested in the merit of this entire process: the process of learning predictive information from the source population and transporting it to the target population.
These perspectives are complementary and not exclusive. One must indeed assess the model in the form to be implemented, but we argue that one should also remain cognizant of the strength of predictive evidence. Our argument is supported by the revealed preferences of the predictive analytics community. For one, a model that is built using a small (effective) sample or with questionable methodology is approached with doubt as its performance may not survive re-development or updating[6]; i.e., the predictive evidence is considered weak. Calls for assessing a prediction model’s quality imply the relevance of considering such evidence[15, 16]. One could argue that if the evidence underlying a model did not matter to potential users, model development studies could have been reduced to just reporting the final model equation. It is in this sense that Riley et al. argue “understanding uncertainty of a model’s predictions may help health professionals, organisations, and policy makers to decide whether to use or endorse that model, and identify when further information or research is needed”[4].
Importantly, such an assessment should accompany every time the model is considered for adoption. For one, a model that is highly uncertain about the predictive information for a given predictor will tend to make less certain predictions in a population with a high prevalence of that predictor than in one with low prevalence. In addition, model uncertainty might affect different aspects of performance differently: discrimination can be unaffected if all models in the multiverse rank the validation sample in the same order, whereas clinical utility is sensitive to the extent to which models place individuals on either side of the treatment threshold. Consequently, as with other aspects of performance, model uncertainty should be investigated in relation to a well-defined target population, and across multiple domains[17].
The premise of the article is to propose what researchers should do if they wish to consider model uncertainty in a validation study. Specifically, we incorporate both sources of uncertainty into the variance of an estimated performance metric. We decompose this total variance into model and validation components, and propose two complementary metrics, and , that summarize their relative contributions. We show how this decomposition can be implemented for common performance metrics, as well as for visualizations such as calibration plots, using simple Monte Carlo algorithms, and illustrate it in a case study. Juxtaposing model and validation uncertainty can help investigators decide whether future efforts should be directed towards developing a more reliable model or towards more precisely estimating its performance in the new population.
Methods
Notation
Our risk prediction model can be written as , a deterministic function taking as input a vector of predictors and that allows predicting for a new individual an estimate of the outcome probability for an outcome , conditional on their predictor values. The model is indexed by parameters (e.g., coefficients of the predictive regression equation, tree structures and branch weights specifying a regression tree, or neuron weights and activation thresholds for an artificial neural network). While in common practice only one set of estimates is considered, such as the (penalized) maximum likelihood estimate (MLE) of predictor effects, in reality, the finite development sample means many different values of are compatible with the development population. This leads to the multiverse of models, each indexed by a certain combination of . The compatibility of a given model (a set of ) with the development population is governed by , the probability distribution over all possible values of . For parametric models, can be made explicit, typically approximated as a multivariate Normal distribution implied by the vector of MLEs and the estimated covariance matrix[18]. However, an explicit probability distribution might not always be present. For example, uncertainty in the model can also be quantified as multiple sets of by drawing from the posterior distribution of in Monte Carlo-based Bayesian methods, or (approximately) by refitting the model over bootstrapped copies of the development data. Yet other approaches might include Bayesian model averaging, where a discrete set of models each has a weight of being the true response-generating model[19].
We assume the model is being evaluated in an iid sample that is drawn independently of the model’s training sample – from the same or a different target population. The sample consists of observations, each containing a vector and an observed for each individual; and denote the corresponding vectors of observed outcomes and predicted probabilities across the sample. By we refer to a particular metric of interest (e.g., c-statistic, or calibration slope) of the model indexed by in the validation population, and by its estimate in a validation sample ; denotes the estimate in the observed validation sample.
Our main goal is to accommodate model uncertainty in the assessment of each and to decompose uncertainty due to the original model itself, and due to the finite validation sample.
Performance metrics
While this methodology is general and can be extended to any metric of model performance, we consider those metrics defined in Table 1 as exemplary metrics used in validation studies[14]. The Brier score and the log score are measures of overall performance, based on quadratic and logarithmic scoring rules, respectively[20]. Mean calibration, log(O/E), and the calibration slope assess calibration-in-the-large and weak calibration[21]. The Integrated Calibration Index (ICI) is a scalar summary of the deviation from moderate calibration (the average true outcome probability among all individuals with predicted probability being equal to )[22]. As the average absolute difference between the predicted and observed probabilities, its computations generally require smoothing, with typical options being LOESS or restricted cubic splines[22]. The recently introduced C*, the maximum absolute cumulative prediction error, is an alternative measure of deviation from moderate calibration whose computation does not require smoothing[23]. Net benefit (NB) is a measure of clinical utility typically expressed in true positives net of false positives, with an exchange rate between false and true positives implied by the treatment threshold. It is the only metric in Table 1 that depends on a threshold.
| Metric | Sample estimate | (Approximate) sampling variance |
| Brier score# | , | |
| Logarithmic score# | , | |
| c-statistic | , | DeLong’s method[24] |
| Mean calibration# | , | |
| Calibration slope | from the logistic recalibration fit \logit\Pr(y_i=1)=\alpha+\beta\logit(\pi_i) | , where , and are the elements of the per-observation Fisher information of that fit, evaluated at the MLE |
| Integrated calibration index[22] | , with a smoothed estimate of on | Bootstrap |
| (maximum absolute cumulative calibration error)[23] | , with indexing observations in increasing order of | Bootstrap |
| Net benefit relative to the better default strategy, at threshold | , , | is the smaller of and . Treating the two as bivariate normal, with variances and covariance from per-observation contributions (as for the similar metrics above), its variance follows from a known formula[25] |
Table 1. Metrics of model performance for a binary outcome, with the sample estimate evaluated in the validation sample at each draw of and the conventional estimator of its sampling variance.
In assessing the clinical utility of a model, the relevant question is whether it offers positive utility over the default decisions (treating no one or treating everyone). As such, we focus on the incremental net benefit (): the NB of the model minus that of the best default strategy at that threshold.
The estimand and general estimation approach
In a conventional validation study, the estimand is a given performance metric of the advertised model in the validation population. Our expanded view takes the uncertainty in the model development pipeline into consideration. That is, we see the model as a stochastic output of a particular model development strategy applied to a finite development sample. Here, the modeling strategy results in an advertised model that, as the development sample increases, converges to the ‘population model’ of the development population: i.e., the model that would have emerged had the developers had access to an infinite development sample. In this view, the estimand becomes the performance of this model in the validation population.
The conventional point estimate (performance metric of the advertised model when evaluated in the validation sample) remains a consistent estimator of this target estimand, with consistency defined as the convergence of the estimate to the population value as both the development and validation samples grow. On the other hand, in this expanded view, uncertainty around the estimate is affected by both the finite development and validation samples: the finite development sample results in a random model from the multiverse of models, and a finite validation sample induces sampling uncertainty around the estimated performance metric of a realized model.
To align the proposed methodology with common practices in validation studies, we adhere to the following general principles. First, we decline to make any assumption about how well the model describes the outcome generation in the new population. This is the impartial stance an external validation study takes, as well as the space where cross-validation or prior predictive checks (and related approaches such as checking for prior–data conflict) operate[26]. This stance, and the independence of the development and validation studies, mean . Second, the information from the development sample is encoded solely as – i.e., the regression function. We do not consider information on case-mix () from the development sample to be available or to be of interest to the investigator. The validation sample, on the other hand, offers information on both the case-mix and outcome generation mechanism. Finally, we wish this approach to be a consistent extension of the current methodology of external validation. Our definition of consistency is that if the uncertainty in model predictions vanishes (), the assessment should converge to the conventional approach towards assessment of the model as advertised. This reflects our desire for a cohesive assessment of the model as the product to be implemented, and the entire modeling pipeline.
Variance decomposition
The core idea is to use the law of total variance to decompose the variance of , the estimated performance metric in the validation sample whilst accounting for uncertainty in the developed model:
The first term on the right-hand side () captures variability due to uncertainty in predictions from the model (M), reflecting the range of predictions across the multiverse of potential models. If , then collapses to a point and this term vanishes, however finite the validation (V) sample. On the other hand, the second term () encapsulates the variability due to the finite validation sample: if that sample grows to infinity, collapses to zero under general regularity conditions for the estimability of . In the current tradition of shipping a single model (a single point estimate of ), the term is zero by construction, and the variance that is conventionally reported corresponds to the second term alone. Our proposal is to undertake such a variance decomposition technique when validating a model, in order to separate the influence of uncertainty sources for a given metric of model performance. In addition to variance decomposition, can be used to construct Wald-type confidence bounds on the performance metric. Such ‘compound’ confidence intervals capture both sources of uncertainty.
Relative share of modeling and validation uncertainty
In addition to total variance, it can be of interest to quantify the relative contribution of each uncertainty source. To this end, one can define a relative measure of uncertainty for each source
Fraction of total variability due to modeling (prediction) uncertainty,
and
Fraction of total variability due to validation (sampling) uncertainty,
with . These complementary measures can be expressed as percentages and accompany the point estimate and uncertainty intervals for each metric. When reporting these metrics, we suggest the absolute value of the corresponding variance component is also reported, and fundamentally the total variance is also provided. The absolute values establish whether the uncertainty is material for a given metric, while the shares, being scale-free, are what can be compared across metrics.
Implementing variance decomposition
Generically, and given the nested structure of equation (1), the variance decomposition requires sampling from nested within samples from . Taking the empirical distribution of as the population – the frequentist framework – results in obtaining draws from via bootstrapping (sampling with replacement from the original sample, creating a new random sample of the same size). A Bayesian view would replace the ordinary bootstrap with the Bayesian bootstrap[27]. Regardless, these bootstrap copies are nested within draws from which are obtained via Monte Carlo sampling (e.g., from the multivariate Normal distribution specified by the vector of MLEs and the covariance matrix, or by direct draws from in Bayesian Monte Carlo methods). This generic algorithm is provided in Appendix § 1.
However, two simplifications remove the need for such potentially expensive nested sampling, while also offering consistency with the conventional validation platform. First, we replace with , the estimate of the metric in the validation sample. In other words, for a given , instead of averaging across many bootstrap samples, we simply use the original validation sample to estimate given the current draw from . For metrics that can be written as the sum of per-observation contributions (sum-type metrics: Brier score, log-score, and mean calibration), the equality is exact. This is because bootstrapping , either frequentist or Bayesian, is akin to assigning stochastic weights to each observation, and those weights have the same expected values. This replacement can in fact be seen as a form of variance-reduction technique – effectively equal to averaging across an infinite number of bootstraps. On the other hand, for metrics whose sample estimate is a non-linear function of observations (e.g., c-statistic, log(O/E), and calibration slope), this remains an approximation. Further, for most metrics need not be bootstrapped either: a closed-form estimator is often available (Table 1) and is evaluated at each draw before then taking the expectation to obtain . For the sum-type metrics it is the standard unbiased estimator of the variance of the mean; for others, it is an asymptotic approximation. Algorithm 1 outlines the steps involved for this analytic-variance-based method.
Among common metrics of model performance (Table 1), only two (ICI and C*) lack a closed-form variance estimator, requiring bootstrapping for variance estimation. For these metrics, and generally for any metric whose variance is obtained via bootstrapping, nesting remains unnecessary, provided we retain the substitution . This is because we can avoid a direct estimation of the term that involves . We accomplish this by instead computing and , and taking . Both and are available from a non-nested combination of sampling from and , i.e., sequential draws from
Algorithm 1 Variance decomposition for a performance metric based on analytical variance
for do
Sample
Compute predicted probabilities in the validation sample using
Estimate
end for
Set
Set
return , , and calculate
model parameters and bootstrapping: within each draw of , we evaluate the metric once on a bootstrap resample (of the same size), whose spread across draws gives , and once on the original sample, so that the spread of the paired difference gives . For a Monte Carlo simulation of size , the cost is evaluations of the metric. The algorithm is provided in Algorithm 2.
Algorithm 2 Variance decomposition for a performance metric based on bootstrap variance3
for do
Sample
Compute predicted probabilities in the validation sample using
Estimate the performance metric in the validation sample
Obtain a bootstrap sample of pairs,
Estimate the performance metric in the bootstrap sample
end for
Set
Set
return , , and calculate
Both algorithms return as well as its two components, and . Both satisfy our requirement for convergence to conventional validation studies when . This is achieved by using the estimate of the metric in the original validation sample in lieu of its average across a large number of bootstraps (as in validation studies, we conventionally report rather than the average of across bootstraps). This replacement, and using analytical variance in Algorithm 1, are exact for sum-type metrics but an approximation for others. In the Appendix, we show the negligible effect of these approximations in our case study.
Compound calibration plots
Flexible calibration plots are common visualization methods of the degree of moderate calibration[21]. Each point on a calibration plot is the conditional mean observed outcome probability (y-axis) at a given value of predicted probability (x-axis), often estimated via a locally smoothed regression approach (e.g., LOESS, or restricted cubic splines). We note that this conditional mean is a metric like any other and can be made subject to the same variance decomposition. As such, one can create compound plots with uncertainty intervals around the calibration plot that incorporate both sources of uncertainty, and partition the two components.
The common local smoothing methods such as LOESS and restricted cubic splines report the variance of the estimated conditional mean. This enables applying Algorithm 1 to all points on the calibration plots. From the estimated , one can construct uncertainty (e.g., 95% coverage) bands around the point estimates, which will capture uncertainty due to the finite validation sample (corresponding to the uncertainty interval in conventional calibration plots), and a second uncertainty band based on capturing total uncertainty.
An illustrative example
We use data from the GUSTO study, an extensively studied, publicly available dataset in predictive analytics[28, 29, 30]. We use this dataset to create exemplary prediction models for 30-day mortality after an acute myocardial infarction, a binary outcome. Given the short follow-up time and the ability to verify death status via coroner’s report, there was no right-censoring in the data. Similar to previous studies, a logistic regression model was developed with 6 predictors (7 coefficients): age, MI location (inferior, anterior, other), Killip class (a measure of the severity of heart failure), previous history of MI, systolic blood pressure (capped at 100 mmHg), and pulse rate (per minute).
As is typical in realistic model development, we apply shrinkage to mitigate the risk of overfitting. We use a Bayesian ridge penalization (based on a hierarchical Gaussian prior on standardized coefficients) with plug-in predictions as the output. In the frequentist interpretation, these plug-in predictions are based on penalized MLE estimates of ; in the Bayesian interpretation, predictions are based on the mode of the posterior distribution of (maximum a posteriori). Unlike conventional ridge regression, the Bayesian ridge incorporates uncertainty in the final value of the tuning parameter, and enables its propagation to the resulting covariance matrix[31]. The mgcv package in R was used for the implementation of the Bayesian ridge[32, 33].
The total sample size of GUSTO ( with 2,851 events, 6.98%) is much larger than a typical development or validation study. In our first analysis, we therefore make illustrations for smaller sample sizes via subsets of the data for a realistic scenario. In the second analysis we take advantage of the full sample to study how the contribution of uncertainty sources varies by the size of the development and validation samples.
For the first analysis, out of the 16 regions in GUSTO, we develop the model on region 16, with 1,231 patients and 99 events, and validate it on region 10, with 1,717 patients and 95 events. These two regions are chosen as they have similar (effective) sample sizes, thus offering a balanced amount of data for development and validation. With events per variable of 14.1 and 13.6, the development and validation sample sizes are within the range typically seen in empirical studies. is reported at treatment thresholds of 2%, 5% and 10%. The coefficients of the model are provided in the footnote of Table 2. To calculate the variance decomposition, for Algorithm 1, we obtained 5,000 draws from the multivariate Normal approximation specified by point estimates and covariance matrix of , and for Algorithm 2, 5,000 bootstrap draws from the validation sample. Algorithm 1 was used for all performance metrics aside ICI and which were based on Algorithm 2. With this number of draws, the Monte Carlo standard error of , estimated by resampling the draws, was below 1 percentage point for every metric (largest: 0.88, for ICI).
| Metric | Estimate | 95% interval: Conventional (ignores model uncertainty) | 95% interval: Compound (accounts for model uncertainty) | |||||
| Brier | 0.0461 | (0.0380, 0.0541) | (0.0374, 0.0548) | 0.00155 | 0.00418 | 0.00446 | 12.1 | 87.9 |
| log score | 0.182 | (0.158, 0.207) | (0.154, 0.210) | 0.00605 | 0.0128 | 0.0142 | 18.2 | 81.8 |
| c-statistic | 0.780 | (0.732, 0.828) | (0.718, 0.842) | 0.0190 | 0.0252 | 0.0316 | 36.2 | 63.8 |
| mean calibration | −0.0174 | (−0.0275, −0.00729) | (−0.0370, 0.00222) | 0.00853 | 0.00525 | 0.0100 | 72.5 | 27.5 |
| log(O/E) | −0.274 | (−0.469, −0.0782) | (−0.571, 0.0238) | 0.114 | 0.0997 | 0.152 | 56.8 | 43.2 |
| calibration slope | 1.13 | (0.906, 1.34) | (0.666, 1.58) | 0.207 | 0.110 | 0.234 | 78.0 | 22.0 |
| ICI | 0.0178 | (0.00895, 0.0266) | (0.00154, 0.0340) | 0.00681 | 0.00470 | 0.00827 | 67.7 | 32.3 |
| C* | 0.0180 | (0.00901, 0.0269) | (<0.001, 0.0354) | 0.00745 | 0.00485 | 0.00888 | 70.2 | 29.8 |
| NB(0.02) | 0.00102 | (> −0.001, 0.00267) | (−0.00128, 0.00333) | 0.000899 | 0.000759 | 0.00118 | 58.3 | 41.7 |
| NB(0.05) | 0.0166 | (0.0116, 0.0216) | (0.0101, 0.0231) | 0.00207 | 0.00260 | 0.00332 | 38.6 | 61.4 |
| NB(0.10) | 0.0152 | (0.00644, 0.0240) | (0.00529, 0.0251) | 0.00259 | 0.00435 | 0.00506 | 26.3 | 73.7 |
Table 2. Variance decomposition for the GUSTO case study: region 16 (non-US) for development (, 99 events), region 10 (US) for validation (, 95 events).
Table 2 shows the components. Absolute uncertainty components are reported as standard deviations (, , and ), and relative values ( and ) as percentages of total variance. The conventional and compound uncertainty intervals are also presented. The former focuses on the advertised model (and thus ignores model uncertainty – i.e., that predictions are uncertain), while the latter focuses on the entire modeling pipeline, including model uncertainty.
A clear finding in these results is the high variability among metrics in terms of the share of the modeling versus validation uncertainty. For measures of prediction error, the contribution of modeling uncertainty to total variance () was generally small (at most 18%). On the other hand, for calibration metrics, model uncertainty substantially contributed to total variance ( from 57% to 78% for different metrics). For , the share of uncertainty sources depended on the threshold, with model uncertainty dominating at the lowest threshold and validation uncertainty at higher thresholds ( of 58%, 39% and 26% at thresholds of 2%, 5% and 10%).
The compound calibration plot is provided in Figure 1. The blue band is the 95% interval due to validation uncertainty alone (), and the orange band extends it to the compound 95% interval (), so its width is what model uncertainty adds to total uncertainty.
Figure 1. Flexible calibration curve for the GUSTO case study. Left: the conventional plot. Right: the compound plot, with the validation-sampling and model components shown separately. The dashed line is the line of perfect calibration. The calibration curve is a logistic regression of the outcome on a natural cubic spline in the predicted probability (ns() in R, 4 degrees of freedom).
Model fitted on the development region, with a Bayesian ridge prior on each slope
Predictor are on their natural scale: age in years, Killip class as 1 to 4, systolic blood pressure in mmHg capped at 100, pulse in beats per minute, and the three binary terms coded 0 or 1 with inferior infarct as the reference category for infarct location.
How the two components move with sample size
To see how the decomposition responds to both sources of uncertainty, we repeated the above analyses over a grid of varying development and validation sample sizes. In each simulation, we first divided the entire GUSTO sample into two random halves for development and validation. The model has the same structure as before. For each of the two samples, in a factorial design, we varied the sample from small to large at four relative values: using 1/30 (n=680), 1/10 (n=2,042), 1/3 (n=6,805), and the entire sample (n=20,415). Within each simulation, the smaller samples were nested within the larger ones (each comprising the first individuals of a single random ordering of its half), so that cells differ only in the amount of data used. The entire simulation (starting from dividing the dataset into development and validation halves) was repeated 10 times, and results were averaged across repetitions. Variance decomposition followed the same approach as in the previous section, with 1,000 draws per cell in each repetition (2,000 for ICI and ). These numbers of draws were chosen such that the Monte Carlo standard error of each value in Figure 2 due to the finite number of draws remained below 1 percentage point (largest: 0.87), the same tolerance as for Table 2.

Figure 2. Variance decomposition over a grid of development and validation sample sizes. Columns are development and rows are validation sample sizes. Within each panel, total disc area is proportional to the total variance , and the areas of the two sectors to and ; the number beneath each disc is , as a percentage. After averaging across the 10 replications, the Monte Carlo standard error of the printed values ranged from 0.01 to 6.1 percentage points (median 0.8).
Results are provided in Figure 2, with each panel representing one metric. Again, these results demonstrate the high variability of the contribution of uncertainty sources, this time as a function of development and validation sample sizes. For several metrics (Brier, log score, c-statistic, and NB), validation uncertainty dominated modeling uncertainty when the development and validation samples were equal (diagonal elements). These metrics are generally much more sensitive to the size of the validation than to the size of the development sample (manifested as the size of the circles changing substantially on the vertical axis but much less so on the horizontal axis). On the other hand, for metrics of calibration (mean calibration, , calibration slope, ICI, and ), the share of uncertainty was rather equal, and the overall uncertainty was sensitive to both development and validation sample sizes.
Discussion
Many of the recent developments and debates on model uncertainty in predictive analytics have been around model development or deployment [4, 5, 6, 7, 34]. However, between model development and deployment sits the critical step of model validation, and to the best of our knowledge, model uncertainty at this stage has not been sufficiently explored. Our contribution here is a general approach for incorporating such uncertainty into the conventional machinery of external validation studies. In particular, we suggested methods for quantifying total variance as well as the relative shares of model () and validation () components for each metric of model performance. We proposed simple, generalizable Monte Carlo algorithms for this purpose. Our case study and the associated simulation study showed that the share of variation attributed to each source can be quite variable across different performance metrics, and
depends on the development and validation sample sizes. While our example focused on a binary outcome and characterized model uncertainty via point estimates and their covariance matrix, the proposed algorithms apply to other outcome types (e.g., continuous or time-to-event outcomes) and to any model development approach for which model uncertainty can be quantified (e.g., via posterior draws or bootstrapping).
These findings can have important implications for external validation studies. High variability in and values across different metrics means conclusions about the role of development versus validation uncertainty can differ depending on which aspect of the model performance is considered. In our case study, focusing on calibration metrics might lead to the conclusion that uncertainty is substantial and is dominated by model uncertainty (with of at least 57% across all calibration metrics). On the other hand, metrics of prediction error (Brier and log-score), with of at most 18%, would indicate the dominance of validation uncertainty, with discrimination (c-statistic) in between. For clinical utility (NB), results varied substantially across the range of plausible treatment thresholds, with the share of model uncertainty being generally higher at smaller thresholds. While these numerical examples are meant to be illustrative rather than exhaustive, they should be enough to demonstrate that model uncertainty can affect different performance domains differently, potentially resulting in different decisions.
Based on these, we recommend that validation studies report, for every performance metric of interest, total variation (e.g., the compound CI alongside the conventional one), together with the model and validation components ( and ). This recommendation is based on key issues decision-makers face with regard to current model adoption and future research. A decision to adopt a model (say, by a national guideline committee) carries direct and intangible costs: efforts required for implementation, training, changing clinical workflows, and the credibility of future recommendations, to name a few. Model adoption decisions should thus be at low risk of short-term reversal. A reversal can occur not just when a larger validation sample changes current assessments, but also if the next iteration of development results in a model with different performance. The latter is not hypothetical: models, especially those that gain traction in clinical practice, often go through iterations. Our numerical studies illustrate that even a development sample of typical size can leave substantial model uncertainty. Thus, stakeholders should expect potentially wide swings in performance across future model iterations (or adoption of a different model for the same outcome), regardless of how robust the current validation study is. In our case study, if decision-makers prioritize calibration (e.g., if predicted risks are to be communicated to patients), the high total variation in model calibration assessment might nudge them to pause model adoption. On the other hand, if decision-makers prioritize net benefit at the 10% threshold (e.g., when the model is primarily used to generate treatment recommendations), they might be content with the existing uncertainty and proceed to adoption.
Even if such reversal costs are not considered during adoption, incorporating model uncertainty into performance assessment remains relevant in terms of whether, and where, future learning is needed. As we argued, it is total uncertainty that signals the strength of predictive evidence.
If total uncertainty is high, in particular if the compound CIs are compatible with conflicting assessments of model performance (e.g., a interval spanning zero), further research is warranted, regardless of the adoption decision. In this case, the contributions of uncertainty sources ( and ) can help determine where such efforts should be directed. In our case study, high total variation in model calibration signals value in strengthening predictive evidence, with the high indicating a generally higher priority of further model development. Again, total variance and the contribution of model versus validation uncertainty can differ substantially across metrics, so this assessment should be conducted for all performance metrics of interest. Finally, we echo previous calls that model development studies report model uncertainty as a core part of the quality of evidence underlying a model[4, 6]; this practice is not yet universal[35, 36], and is a prerequisite for applying the methods proposed here.
To highlight the core principles, in our numerical studies we considered model and validation uncertainties to be solely due to, respectively, the finite development and validation sample sizes - that is, the model development strategy was considered pre-specified and not dependent on the sample. We emphasize that proper uncertainty propagation is predicated on all sources of uncertainty being accounted for. Other sources of uncertainty that often creep into realistic scenarios include sample selection (for both development and validation studies), choice of predictors, analytical decisions (e.g., the functional form, the choice of link function for generalized linear models), and handling of missing values, to name a few. In principle, some of these sources can be incorporated into this framework: uncertainty due to missing predictor values at development can be propagated to the advertised model (e.g., by applying Rubin’s rules to the reported covariance matrix), and imputation of missing values at validation can be embedded within the bootstrapping step of our algorithms. For others, such as concerns about compatibility between the development and validation samples, structured approaches to assessing population compatibility might be warranted[37].
There are several areas that this framework can be extended to. A ‘multiverse’ view of prediction uncertainty offers a new perspective on the practice of model updating (or revision), which is often considered during model validation if model performance is shown to be sub-par[30, 38]. If the advertised model is seen as a multiverse of models, each weighted by its compatibility with the development population, model updating becomes re-weighting these models according to their compatibility with the validation population. This naturally invites a Bayesian view towards model updating. Further, for net benefit, decision-theoretic approaches towards uncertainty assessment based on value of information (VoI) analysis have been proposed[39, 40]. However, such approaches have been developed in isolation for development and validation studies. Extending them to consider model and validation uncertainty jointly is a natural next step. The implications of this joint view for study design, in particular sample size calculations for validation studies[41, 42, 43, 44], need to be explored.
In summary, this article builds on previous recommendations that developers report their model uncertainty, by proposing how to propagate this uncertainty at the validation stage. Our proposal shows how to quantify the contributions of both model uncertainty and validation uncertainty toward the estimation of performance metrics, and reveals their relative contribution toward the total variance. This can help provide a more complete picture for decision-makers in their judgment of whether to adopt a model, and whether future efforts are better directed towards a more reliable model or a larger validation sample.
References
Appendix
Comparison of the proposed algorithms against nested Monte Carlo sampling
In the main text we required the variance decomposition to converge to conventional external validation as model uncertainty vanishes (). To this end, Algorithms 1 and 2 evaluate the metric in the original validation sample as a shortcut for its expected value across bootstrap samples, and Algorithm 1 uses closed-form variance estimators instead of bootstrapping. For sum-type metrics (Brier score, log score, mean calibration) these substitutions are exact. Here we assess them for the other metrics against nested Monte Carlo sampling (Algorithm A1), which makes neither substitution.
Algorithm A1 Variance decomposition for a performance metric based on nested Monte Carlo sampling3
for do
Sample
Compute predicted probabilities
for do
Obtain a bootstrap sample of pairs,
Estimate the metric in the bootstrap sample
end for
Estimate the mean and variance of the metric across the bootstrap samples
end for
Set
Set
return , , and
We used the case study of the main text. For each metric, the algorithm used in Table 2 (Algorithm 2 for ICI and , Algorithm 1 for the others) was compared with Algorithm A1 on the same 5,000 draws of , with bootstrap samples per draw. Sharing the draws means that Monte Carlo error in largely cancels in the comparison; standard errors were obtained by resampling the draws. All metrics of Table 1 are included; for the sum-type metrics the differences measure the Monte Carlo error of the comparison itself.
The algorithms closely reproduced the reference (Table A1). The ratio of total variances ranged from 0.991 to 1.038, and differences in were within 1.8 percentage points for all metrics except (−2.3 points), whose closed-form variance exceeded the bootstrap variance by 10%.
| Metric | Algorithm | Ratio, algorithm / reference | |||||
| Metric | Algorithm | Algorithm | Reference | % difference | |||
| Brier† | 1 | 0.997 (0.003) | 0.990 (0.011) | 0.998 (0.003) | 12.1 | 12.2 | −0.08 (0.12) |
| log score† | 1 | 1.004 (0.003) | 1.008 (0.009) | 1.003 (0.003) | 18.2 | 18.2 | +0.07 (0.14) |
| c-statistic | 1 | 1.000 (0.003) | 1.005 (0.006) | 0.997 (0.003) | 36.2 | 36.1 | +0.17 (0.15) |
| mean calibration† | 1 | 1.002 (0.002) | 1.004 (0.002) | 0.996 (0.003) | 72.5 | 72.3 | +0.17 (0.08) |
| 1 | 1.038 (0.002) | 0.998 (0.003) | 1.096 (0.003) | 56.8 | 59.1 | −2.28 (0.11) | |
| calibration slope | 1 | 0.991 (0.002) | 0.995 (0.002) | 0.977 (0.004) | 78.0 | 77.7 | +0.32 (0.08) |
| ICI | 2 | 1.006 (0.014) | 0.980 (0.021) | 1.065 (0.022) | 67.7 | 69.5 | −1.80 (0.74) |
| 2 | 1.011 (0.013) | 0.996 (0.018) | 1.047 (0.021) | 70.2 | 71.3 | −1.03 (0.63) | |
| 1 | 0.999 (0.003) | 0.999 (0.004) | 1.000 (0.004) | 58.3 | 58.4 | −0.02 (0.15) | |
| 1 | 1.007 (0.003) | 0.998 (0.005) | 1.014 (0.003) | 38.6 | 39.0 | −0.37 (0.14) | |
| 1 | 1.002 (0.003) | 1.001 (0.007) | 1.003 (0.003) | 26.3 | 26.3 | −0.05 (0.15) |
Table A1. Comparing results of the case study against the reference method (nested simulations), on the 5,000 draws of , with 50 bootstrap replicates each.
References
- [1]D’Agostino RB, Vasan RS, Pencina MJ, Wolf PA, Cobain M, Massaro JM, et al. General cardiovascular risk profile for use in primary care: The Framingham heart study. Circulation. 2008;117(6):743–53. doi:10.1161/CIRCULATIONAHA.107.699579DOI
- [2]Knight SR, Ho A, Pius R, Buchan I, Carson G, Drake TM, et al. Risk stratification of patients admitted to hospital with COVID-19 using the ISARIC WHO clinical characterisation protocol: Development and validation of the 4C mortality score. BMJ. 2020;370:m3339. doi:10.1136/bmj.m3339DOI
- [3]Riley RD, Pate A, Dhiman P, Archer L, Martin GP, Collins GS. Clinical prediction models and the multiverse of madness. BMC Medicine. 2023;21(1):502. doi:10.1186/s12916-023-03212-yDOI
- [4]Riley RD, Collins GS, Kirton L, Snell KI, Ensor J, Whittle R, et al. Uncertainty of risk estimates from clinical prediction models: Rationale, challenges, and approaches. BMJ. 2025 Feb;e080749. doi:10.1136/bmj-2024-080749DOI
- [5]Thomassen D, le Cessie S, van Houwelingen HC, Steyerberg EW. Effective sample size: A measure of individual uncertainty in predictions. Statistics in Medicine. 2024;43(7):1384–96. doi:10.1002/sim.10018DOI
- [6]Riley RD, Collins GS. Stability of clinical prediction models developed using statistical or machine learning methods. Biometrical Journal. 2023;65(8). doi:10.1002/bimj.202200302DOI
- [7]Politi MC, Han PKJ, Col NF. Communicating the uncertainty of harms and benefits of medical interventions. Medical Decision Making. 2007;27(5):681–95. doi:10.1177/0272989X07307270DOI
- [8]van der Bles AM, van der Linden S, Freeman ALJ, Mitchell J, Galvao AB, Zaval L, et al. Communicating uncertainty about facts, numbers and science. Royal Society Open Science. 2019;6(5):181870. doi:10.1098/rsos.181870DOI
- [9]Banerji CRS, Chakraborti T, Harbron C, MacArthur BD. Clinical AI tools must convey predictive uncertainty for each individual patient. Nature Medicine. 2023;29(12):2996–8. doi:10.1038/s41591-023-02562-7DOI
- [10]Kompa B, Snoek J, Beam AL. Second opinion needed: Communicating uncertainty in medical machine learning. npj Digital Medicine. 2021;4(1):4. doi:10.1038/s41746-020-00367-3DOI
- [11]Kattan MW. Doc, what are my chances? A conversation about prognostic uncertainty. European Urology. 2011;59(2):224. doi:10.1016/j.eururo.2010.10.041DOI
- [12]Steyerberg EW, Vergouwe Y. Towards better clinical prediction models: Seven steps for development and an ABCD for validation. European Heart Journal. 2014;35(29):1925–31. doi:10.1093/eurheartj/ehu207DOI
- [13]Collins GS, Dhiman P, Ma J, Schlussel MM, Archer L, Van Calster B, et al. Evaluation of clinical prediction models (part 1): From development to external validation. BMJ (Clinical research ed). 2024;384:e074819. doi:10.1136/bmj-2023-074819DOI
- [14]Riley RD, Archer L, Snell KIE, Ensor J, Dhiman P, Martin GP, et al. Evaluation of clinical prediction models (part 2): How to undertake an external validation study. BMJ (Clinical research ed). 2024;384:e074820. doi:10.1136/bmj-2023-074820DOI
- [15]Wolff RF, Moons KGM, Riley RD, Whiting PF, Westwood M, Collins GS, et al. PROBAST: A tool to assess the risk of bias and applicability of prediction model studies. Annals of Internal Medicine. 2019;170(1):51–8. doi:10.7326/M18-1376DOI
- [16]Moons KGM, Damen JAA, Kaul T, Hooft L, Andaur Navarro C, Dhiman P, et al. PROBAST+AI: An updated quality, risk of bias, and applicability assessment tool for prediction models using regression or artificial intelligence methods. BMJ. 2025;388:e082505. doi:10.1136/bmj-2024-082505DOI
- [17]Sperrin M, Riley RD, Collins GS, Martin GP. Targeted validation: Validating clinical prediction models in their intended population and setting. Diagnostic and Prognostic Research. 2022;6(1). doi:10.1186/s41512-022-00136-8DOI
- [18]van der Vaart AW. Asymptotic statistics. Cambridge: Cambridge University Press; 1998. doi:10.1017/CBO9780511802256DOI
- [19]Hoeting JA, Madigan D, Raftery AE, Volinsky CT. Bayesian model averaging: A tutorial. Statistical Science. 1999;14(4):382–417. doi:10.1214/ss/1009212519
- [20]Steyerberg EW, Vickers AJ, Cook NR, Gerds T, Gonen M, Obuchowski N, et al. Assessing the performance of prediction models: A framework for traditional and novel measures. Epidemiology. 2010;21(1):128–38. doi:10.1097/EDE.0b013e3181c30fb2DOI
- [21]Van Calster B, Nieboer D, Vergouwe Y, De Cock B, Pencina MJ, Steyerberg EW. A calibration hierarchy for risk models was defined: From utopia to empirical data. Journal of Clinical Epidemiology. 2016;74:167–76. doi:10.1016/j.jclinepi.2015.12.005DOI
- [22]Austin PC, Steyerberg EW. The integrated calibration index (ICI) and related metrics for quantifying the calibration of logistic regression models. Statistics in Medicine. 2019;38:4051–65. doi:10.1002/sim.8281
- [23]Sadatsafavi M, Petkau J. Non-parametric inference on calibration of predicted risks. Statistics in Medicine. 2024;43(18):3524–38. doi:10.1002/sim.10138DOI
- [24]DeLong ER, DeLong DM, Clarke-Pearson DL. Comparing the areas under two or more correlated receiver operating characteristic curves: A nonparametric approach. Biometrics. 1988;44(3):837–45. doi:10.2307/2531595DOI
- [25]Clark CE. The greatest of a finite set of random variables. Operations Research. 1961;9(2):145–62. doi:10.1287/opre.9.2.145DOI
- [26]Pfeiffer RM, Gail MH. Estimating the decision curve and its precision from three study designs. Biometrical Journal. 2020;62(3):764–76. doi:10.1002/bimj.201800240DOI
- [27]Rubin DB. The bayesian bootstrap. The Annals of Statistics. 1981;9(1). doi:10.1214/aos/1176345338DOI
- [28]GUSTO investigators. An international randomized trial comparing four thrombolytic strategies for acute myocardial infarction. The New England Journal of Medicine. 1993;329(10):673–82. doi:10.1056/NEJM199309023291001DOI
- [29]Ennis M, Hinton G, Naylor D, Revow M, Tibshirani R. A comparison of statistical learning methods on the GUSTO database. Statistics in Medicine. 1998;17(21):2501–8. doi:10.1002/(SICI)1097-0258(19981115)17:21<2501::AID-SIM938>3.0.CO;2-Mdoi.org/10.1002/(sici)1097-0258(19981115)17:21<2501::aid-sim938>3.0.co;2-m
- [30]Steyerberg EW, Borsboom GJJM, van Houwelingen HC, Eijkemans MJC, Habbema JDF. Validation and updating of predictive logistic regression models: A study on sample size and shrinkage. Statistics in Medicine. 2004;23:2567–86. doi:10.1002/sim.1844DOI
- [31]Wood SN, Pya N, Säfken B. Smoothing parameter and model selection for general smooth models. Journal of the American Statistical Association. 2016;111(516):1548–63. doi:10.1080/01621459.2016.1180986DOI
- [32]Wood SN. Fast stable restricted maximum likelihood and marginal likelihood estimation of semiparametric generalized linear models. Journal of the Royal Statistical Society: Series B (Statistical Methodology). 2011;73(1):3–36. doi:10.1111/j.1467-9868.2010.00749.xDOI
- [33]Wood SN. Generalized additive models: An introduction with R. 2nd ed. Boca Raton, FL: Chapman; Hall/CRC; 2017. doi:10.1201/9781315370279DOI
- [34]Han PKJ, Klein WMP, Arora NK. Varieties of uncertainty in health care: A conceptual taxonomy. Medical Decision Making. 2011;31(6):828–38. doi:10.1177/0272989X10393976DOI
- [35]Heus P, Damen JAAG, Pajouheshnia R, Scholten RJPM, Reitsma JB, Collins GS, et al. Poor reporting of multivariable prediction model studies: Towards a targeted implementation strategy of the TRIPOD statement. BMC Medicine. 2018;16(1):120. doi:10.1186/s12916-018-1099-2DOI
- [36]Dhiman P, Ma J, Andaur Navarro CL, Speich B, Bullock G, Damen JAA, et al. Reporting of prognostic clinical prediction models based on machine learning methods in oncology needs to be improved. Journal of Clinical Epidemiology. 2021;138:60–72. doi:10.1016/j.jclinepi.2021.06.024DOI
- [37]Debray TPA, Vergouwe Y, Koffijberg H, Nieboer D, Steyerberg EW, Moons KGM. A new framework to enhance the interpretation of external validation studies of clinical prediction models. Journal of Clinical Epidemiology. 2015 Mar;68(3):279–89. doi:10.1016/j.jclinepi.2014.06.018DOI
- [38]Vergouwe Y, Nieboer D, Oostenbrink R, Debray TPA, Murray GD, Kattan MW, et al. A closed testing procedure to select an appropriate method for updating prediction models. Statistics in Medicine. 2017;36(28):4529–39. doi:10.1002/sim.7179DOI
- [39]Sadatsafavi M, Yoon Lee T, Gustafson P. Uncertainty and the value of information in risk prediction modeling. Medical Decision Making. 2022 Feb;42(5):661–71. doi:10.1177/0272989x221078789DOI
- [40]Sadatsafavi M, Lee TY, Wynants L, Vickers AJ, Gustafson P. Value-of-information analysis for external validation of risk prediction models. Medical Decision Making. 2023;43(5):564–75. doi:10.1177/0272989X231178317DOI
- [41]Collins GS, Ogundimu EO, Altman DG. Sample size considerations for the external validation of a multivariable prognostic model: A resampling study. Statistics in Medicine. 2016;35(2):214–26. doi:10.1002/sim.6787DOI
- [42]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. Statistical Methods in Medical Research. 2021;30(10):2187–206. doi:10.1177/09622802211007522DOI
- [43]Riley RD, Debray TPA, Collins GS, Archer L, Ensor J, van Smeden M, et al. Minimum sample size for external validation of a clinical prediction model with a binary outcome. Statistics in Medicine. 2021;40(19):4230–51. doi:10.1002/sim.9025DOI
- [44]Sadatsafavi M, Gustafson P, Setayeshgar S, Wynants L, Riley RD. Bayesian sample size calculations for external validation studies of risk prediction models. Statistics in Medicine. 2026;45(3–5):e70389. doi:10.1002/sim.70389DOI
AI tools statement
No AI-use declaration is available for this version in Valency.
The available record does not establish whether AI systems or models contributed to this work.
