Model-averaged variance of net health benefit over two structures with its within-structure and between-structure parts

Gives the variance of incremental net health benefit once doubt about the model structure is carried into the result by model averaging. Hoeting and colleagues write it as the weighted sum of each model's variance plus its squared mean, less the square of the averaged mean, and the form here has two structures. The first step, NHB_bar, is the probability-weighted sum of HE-FM-CHN-001, and V_W applies the same weights to the two variances. Taking away the weighted mean of the within-structure variances, V_W, leaves V_S, which equals w times one minus w times the squared gap between NHB_A and NHB_B (derived), so it is zero only at a weight of 0 or 1 or when the structures agree. The share s_S reports how much of the total comes from that disagreement, which a probabilistic analysis run on one structure cannot show.

Signature

NHB_bar = w * NHB_A + (1 - w) * NHB_B; V_T = w * (V_A + NHB_A^2) + (1 - w) * (V_B + NHB_B^2) - NHB_bar^2; V_W = w * V_A + (1 - w) * V_B; V_S = V_T - V_W; s_S = V_S / V_T
Inputs
InputsDefinitionUnit
wWeight placed on structure A, the remainder going to structure B; at least 0 and at most 1proportion
NHB_AMean incremental net health benefit under structure A at the stated value of a QALY, INHB_s of HE-FM-EVPI-002 averaged over the draws of that structureQALYs per patient
NHB_BMean incremental net health benefit under structure B at the same value of a QALYQALYs per patient
V_AVariance of incremental net health benefit across the probabilistic draws of structure A(QALYs per patient) squared
V_BVariance of incremental net health benefit across the probabilistic draws of structure B(QALYs per patient) squared
Output
NHB_barWeighted mean of the incremental net health benefit under the two structuresQALYs per patient
V_TVariance of incremental net health benefit over the model-averaged distribution(QALYs per patient) squared
V_WWeighted mean of the two within-structure variances(QALYs per patient) squared
V_SPart of the total variance that arises because the two structures have different means(QALYs per patient) squared
s_SV_S as a share of V_T, undefined when V_T is zeroproportion

Function

Model-averaged net health benefit and its variance across alternative model structures

Maps the incremental net health benefit of a new option under two alternative model structures, the weight on each structure and the variance of the probabilistic draws within each to the mean and variance of the model-averaged result, with the variance split into the part arising within structures and the part arising from disagreement between them. The net health benefit under one structure takes the form of INHB_s of HE-FM-EVPI-002 with the means of that structure in place of one draw, and the ICER under one structure is HE-FM-ICER-001. The weights can be Akaike weights (HE-FM-AIC-003), approximate posterior model probabilities from BIC under equal priors (HE-FM-BIC-003) or prior beliefs. The averaged mean is the probability-weighted sum of HE-FM-CHN-001 (the general form is HE-FN-EV-001). The weight at which the averaged result changes sign, 0.34 / 0.54 = 0.63 in the article, is HE-FM-OWSA-002 with the weight as the input, the two structures as its ends at weights 0 and 1 and each INMB equal to lambda times the net health benefit, exact because the result is linear in the weight. The expected loss from not knowing the structure, 0.102 QALYs per patient in the article, is HE-FM-EVPI-002 with draws repeated in proportion to the weights, and it equals HE-FM-EVPI-003 with P_err of 0.3 and L_wrong of 0.34. None of these is restated, and this package adds the variance. Notation follows the Structural Uncertainty article.

Computational function

  • Computational function for merging probabilistic draws from two model structures in proportion to their weights

    Builds the model-averaged sample from the probabilistic draws of two structures, the procedure of Jackson, Thompson and Sharples, and reads the averaged results from it. From a total of N draws it takes N w draws from structure A and the rest from structure B and merges them, so that each draw belongs to one structure. The mean and variance follow HE-FM-STRU-001, and the merged column gives the same variance directly (derived). EVPI_H is the second part of HE-FM-EVPI-002 applied to the merged draws, P_pos is the two-option acceptability of HE-FM-CEAC-001 on the merged draws, and EVPPI_S takes the form of HE-FM-EVPP-001 with the structure as the parameter of interest, outer draws repeated in proportion to the weight and net benefit in QALYs in place of money (derived).

    Inputs and outputs: a_1 to a_7 are draws of incremental net health benefit from structure A and b_1 to b_3 draws from structure B, in QALYs per patient, 7 and 3 in the calculator form so that w is 7/10. The chain returns the structure means m_A and m_B and population variances V_A and V_B, then NHB_bar, V_T, V_W, V_S, s_S, the share P_pos, EVPI_H and EVPPI_S. The Excel, R and Python versions take any draw columns, a weight and a total N, and return the counts drawn from each structure.

    Assumption: As in HE-AS-STRU-001 to HE-AS-STRU-004. Draws within each column are independent and in no particular order, so taking the first N w draws is a random selection. N w is rounded to a whole number, so the weight actually applied is the count over N. Excel ROUND takes an exact half upwards and R and Python take it to the even number, so the counts differ by one at such a product, as with N of 5 and a weight of 0.5. The variances use the population form so that the merged column matches the formula exactly.

    Worked example (illustrative draws matching the article's means): With a_1 = 0.6; a_2 = -0.1; a_3 = 0.45; a_4 = 0.05; a_5 = 0.3; a_6 = -0.25; a_7 = 0.35; b_1 = -0.6; b_2 = -0.34; b_3 = -0.08 the chain gives w = 0.7; m_A = 0.2; m_B = -0.34; V_A = 0.0814; V_B = 0.0451; NHB_bar = 0.038; V_T = 0.131756; V_W = 0.07052; V_S = 0.061236; s_S = 0.4648; P_pos = 0.5; EVPI_H = 0.137; EVPPI_S = 0.102. The draws are illustrative. NHB_bar and EVPPI_S equal the article's 0.038 and 0.102, and the rest of EVPI_H comes from parameter uncertainty within structure A.

    Worked example (draws that never cross zero within a structure): With a_1 = 0.1; a_2 = 0.15; a_3 = 0.2; a_4 = 0.25; a_5 = 0.3; a_6 = 0.05; a_7 = 0.35; b_1 = -0.24; b_2 = -0.34; b_3 = -0.44 the chain gives w = 0.7; m_A = 0.2; m_B = -0.34; V_A = 0.01; V_B = 0.0067; NHB_bar = 0.038; V_T = 0.070236; V_W = 0.009; V_S = 0.061236; s_S = 0.8719; P_pos = 0.7; EVPI_H = 0.102; EVPPI_S = 0.102. EVPI_H equals EVPPI_S, since every wrong decision in the draws comes from the structure. The draws are illustrative.

    Excel: With the draws in columns named DrawsStructureA and DrawsStructureB, the weight in WeightStructureA and the total in TotalDraws, enter =ROUND(TotalDraws*WeightStructureA,0) in DrawCountA, =TotalDraws-DrawCountA in DrawCountB and =DrawCountA/TotalDraws in RealisedWeightA. In a helper column of TotalDraws rows named MergedDraws, starting at E2, enter =IF(ROWS(E$2:E2)<=DrawCountA,INDEX(DrawsStructureA,ROWS(E$2:E2)),INDEX(DrawsStructureB,ROWS(E$2:E2)-DrawCountA)) and fill down. Enter =AVERAGE(INDEX(DrawsStructureA,1):INDEX(DrawsStructureA,DrawCountA)) in MeanDrawsA and =VARP(INDEX(DrawsStructureA,1):INDEX(DrawsStructureA,DrawCountA)) in VarDrawsA, with the same for structure B using DrawCountB in MeanDrawsB and VarDrawsB. Then =RealisedWeightA*MeanDrawsA+(1-RealisedWeightA)*MeanDrawsB in MergedMean, =RealisedWeightA*(VarDrawsA+MeanDrawsA^2)+(1-RealisedWeightA)*(VarDrawsB+MeanDrawsB^2)-MergedMean^2 in MergedVarTotal, =RealisedWeightA*VarDrawsA+(1-RealisedWeightA)*VarDrawsB in MergedVarWithin, =MergedVarTotal-MergedVarWithin in MergedVarBetween, =MergedVarBetween/MergedVarTotal in MergedShareBetween, =SUMPRODUCT((MergedDraws>0)*1)/TotalDraws in MergedSharePositive, =SUMPRODUCT((MergedDraws>0)*MergedDraws)/TotalDraws-MAX(MergedMean,0) in MergedEvpi and =RealisedWeightA*MAX(MeanDrawsA,0)+(1-RealisedWeightA)*MAX(MeanDrawsB,0)-MAX(MergedMean,0) in StructuralEvppi. Both counts must be at least 1, because INDEX(range,0) returns the whole column and would average every draw. A count above the draws held returns #REF! in the helper column, and a blank draw cell inside the range shows as 0 in the helper column while AVERAGE and VARP skip it, so the mean and variance cells stop describing the merged column and the merged-column test returns FALSE (0.1053 against 0.0967 with a_1 blank in the first worked example).

    R: su_merge <- function(a, b, w, N) { stopifnot(N > 0, w >= 0, w <= 1); nA <- round(N*w); nB <- N-nA; stopifnot(nA <= length(a), nB <= length(b)); xa <- a[seq_len(nA)]; xb <- b[seq_len(nB)]; x <- c(xa, xb); wr <- nA/N; mn <- function(v) if (length(v)) mean(v) else 0; pv <- function(v) if (length(v)) mean((v-mean(v))^2) else 0; mA <- mn(xa); mB <- mn(xb); mx <- wr*mA+(1-wr)*mB; VT <- wr*(pv(xa)+mA^2)+(1-wr)*(pv(xb)+mB^2)-mx^2; VW <- wr*pv(xa)+(1-wr)*pv(xb); VS <- VT-VW; list(nA = nA, nB = nB, mean = mx, VT = VT, VW = VW, VS = VS, share = if (VT > 1e-15) VS/VT else NA, Ppos = mean(x > 0), EVPI = mean(pmax(x, 0))-max(mx, 0), EVPPI_S = wr*max(mA, 0)+(1-wr)*max(mB, 0)-max(mx, 0)) } With a <- c(0.6, -0.1, 0.45, 0.05, 0.3, -0.25, 0.35); b <- c(-0.6, -0.34, -0.08), su_merge(a, b, 0.7, 10) returns mean 0.038, VT 0.131756, VW 0.07052, VS 0.061236, share 0.4648, Ppos 0.5, EVPI 0.137 and EVPPI_S 0.102. At w = 0 or w = 1 it uses one structure and returns VS 0 (to floating point), and with all draws equal VT is 0 and share is NA without an error. A weight outside its range, or a count above the draws held, stops with an error.

    Python: def su_merge(a, b, w, N): assert N > 0 and 0 <= w <= 1; nA = round(N*w); nB = N-nA; assert nA <= len(a) and nB <= len(b); xa, xb = a[:nA], b[:nB]; x = xa+xb; wr = nA/N; mean = lambda v: sum(v)/len(v) if v else 0.0; pv = lambda v: sum((y-mean(v))**2 for y in v)/len(v) if v else 0.0; mA, mB = mean(xa), mean(xb); mx = wr*mA+(1-wr)*mB; VT = wr*(pv(xa)+mA**2)+(1-wr)*(pv(xb)+mB**2)-mx**2; VW = wr*pv(xa)+(1-wr)*pv(xb); VS = VT-VW; return dict(nA=nA, nB=nB, mean=mx, VT=VT, VW=VW, VS=VS, share=(VS/VT if VT > 1e-15 else None), Ppos=sum(y > 0 for y in x)/N, EVPI=sum(max(y, 0) for y in x)/N-max(mx, 0), EVPPI_S=wr*max(mA, 0)+(1-wr)*max(mB, 0)-max(mx, 0)) su_merge([0.6, -0.1, 0.45, 0.05, 0.3, -0.25, 0.35], [-0.6, -0.34, -0.08], 0.7, 10) returns the same values as the R call. At w = 0 or w = 1 it uses one structure and returns VS 0 (to floating point), and with all draws equal share is None without an error. A weight outside its range, or a count above the draws held, raises AssertionError.

    Test (merged column against the formula): With the first worked example's draws, MergedVarTotal is compared with the population variance of the merged column, a route that uses neither the structure means nor the weight. Expected result TRUE. A cell that holds only the within-structure part returns 0.07052 and FALSE, and doubling the cell to 0.263512 or halving it to 0.065878 also gives FALSE. Excel check =ABS(MergedVarTotal-VARP(MergedDraws))<0.0000005

    Test (article's structural value): With the first worked example's draws, StructuralEvppi is compared with 0.102, the article's expected loss from structural uncertainty alone, and MergedEvpi with the hand value 0.137. Expected result TRUE. Doubling StructuralEvppi to 0.204 or halving it to 0.051 gives FALSE, and doubling MergedEvpi to 0.274 or halving it to 0.0685 also gives FALSE. Excel check =AND(ABS(StructuralEvppi-0.102)<0.0005,ABS(MergedEvpi-0.137)<0.0005)

    Common error (Equal numbers of draws whatever the weights): Merging the same number of draws from each structure applies a weight of one half whatever weight was intended. With the article's means the averaged result becomes -0.07 where a weight of 0.7 gives 0.038, and the sign of the decision changes.

    Source: Jackson CH, Thompson SG, Sharples LD. Accounting for uncertainty in health economic decision models by using model averaging. Journal of the Royal Statistical Society Series A. 2009;172(2):383-404. Section 4.2, the results section on model-averaged cost-effectiveness analysis, merges N p(M1|x) Monte Carlo replicates from model M1 with N p(M2|x) replicates from model M2 to give a sample of size N.

    w = 7 / 10; m_A = (a_1 + a_2 + a_3 + a_4 + a_5 + a_6 + a_7) / 7; m_B = (b_1 + b_2 + b_3) / 3; V_A = ((a_1 - m_A)^2 + (a_2 - m_A)^2 + (a_3 - m_A)^2 + (a_4 - m_A)^2 + (a_5 - m_A)^2 + (a_6 - m_A)^2 + (a_7 - m_A)^2) / 7; V_B = ((b_1 - m_B)^2 + (b_2 - m_B)^2 + (b_3 - m_B)^2) / 3; NHB_bar = w * m_A + (1 - w) * m_B; V_T = w * (V_A + m_A^2) + (1 - w) * (V_B + m_B^2) - NHB_bar^2; V_W = w * V_A + (1 - w) * V_B; V_S = V_T - V_W; s_S = V_S / V_T; P_pos = ((a_1 > 0) + (a_2 > 0) + (a_3 > 0) + (a_4 > 0) + (a_5 > 0) + (a_6 > 0) + (a_7 > 0) + (b_1 > 0) + (b_2 > 0) + (b_3 > 0)) / 10; EVPI_H = (max(a_1, 0) + max(a_2, 0) + max(a_3, 0) + max(a_4, 0) + max(a_5, 0) + max(a_6, 0) + max(a_7, 0) + max(b_1, 0) + max(b_2, 0) + max(b_3, 0)) / 10 - max(NHB_bar, 0); EVPPI_S = w * max(m_A, 0) + (1 - w) * max(m_B, 0) - max(NHB_bar, 0)

Try this function

Implementations

  • Excel

    Model-averaged net health benefit variance from named cells

    With the weight in a cell named WeightStructureA, the net health benefits in NhbStructureA and NhbStructureB and the within-structure variances in VarNhbStructureA and VarNhbStructureB, the five formulas return NHB_bar in NhbAveraged, V_T in VarNhbAveraged, V_W in VarNhbWithin, V_S in VarNhbBetween and s_S in ShareNhbBetween. A blank weight cell is read as 0 and returns the results of structure B with no error, and a blank variance cell is read as 0 and understates V_W. When VarNhbAveraged is 0, ShareNhbBetween returns #DIV/0!.

    =WeightStructureA*NhbStructureA+(1-WeightStructureA)*NhbStructureB; =WeightStructureA*(VarNhbStructureA+NhbStructureA^2)+(1-WeightStructureA)*(VarNhbStructureB+NhbStructureB^2)-NhbAveraged^2; =WeightStructureA*VarNhbStructureA+(1-WeightStructureA)*VarNhbStructureB; =VarNhbAveraged-VarNhbWithin; =VarNhbBetween/VarNhbAveraged

Assumptions

  • Structure weights sum to one over a stated set of alternatives

    The weight on each structure is at least 0 and at most 1, and the weights sum to 1 over the structures considered. Hoeting and colleagues state that all probabilities are implicitly conditional on the set of models considered, so a structure left out of the set has no weight and adds nothing to V_T (derived).

  • Both structures valued for the same decision and the same value of a QALY

    NHB_A, NHB_B, V_A and V_B describe the same option against the same comparator in the same population, with cost converted to QALYs at one value of a QALY. Results under different comparators or thresholds cannot be pooled, because the mixture would then describe no single decision.

  • Two exhaustive structures in the calculator form of the averaged variance

    The calculator line has two structures. With more, each sum in Hoeting's form has one term per structure, and V_T is still the weighted sum of variance plus squared mean, less the square of the weighted mean. Jackson and colleagues merge probabilistic draws from each model in proportion to its probability, and the merged column gives the same variance (HE-CF-STRU-001, derived).

  • Total variance as a summary of a mixture and not of a normal distribution

    V_T is the variance of a mixture of two distributions, which can have two peaks when the structures disagree, so V_T summarises spread and does not imply a normal shape (derived). The share s_S needs V_T above zero. V_T is zero when the only structure carrying weight has a within-structure variance of zero, or when both carry weight, both within-structure variances are zero and the structures agree (derived).

Worked examples

  • Cure and no-plateau structures at a weight of 0.7 with illustrative spreads

    The article's two structures give net health benefits of 0.20 and -0.34 QALYs per patient, and the weight on the cure model is 0.7, so the averaged mean is 0.038, as in the article. The within-structure standard deviations of 0.30 and 0.25, variances of 0.09 and 0.0625, are illustrative and are not in the article. The total variance is 0.142986, of which 0.08175 arises within structures and 0.061236 from the gap between them, a share of 0.4283.

    w = 0.7; NHB_A = 0.2; NHB_B = -0.34; V_A = 0.09; V_B = 0.0625; NHB_bar = 0.038; V_T = 0.142986; V_W = 0.08175; V_S = 0.061236; s_S = 0.4283
  • Cure and no-plateau structures with equal weights

    With equal weights the averaged mean is -0.07, the article's result, and the sign of the decision changes. The between-structure part rises to its largest value for this gap, 0.25 times 0.2916, because the weight times its complement peaks at a weight of one half (derived). The within-structure variances are the illustrative values of the first example.

    w = 0.5; NHB_A = 0.2; NHB_B = -0.34; V_A = 0.09; V_B = 0.0625; NHB_bar = -0.07; V_T = 0.14915; V_W = 0.07625; V_S = 0.0729; s_S = 0.4888
  • Limiting case with all weight on the cure structure

    With a weight of 1 on structure A the averaged result is structure A alone. The total variance equals V_A, the between-structure part is zero and structure B plays no part. The inputs are illustrative and the case checks an implementation.

    w = 1; NHB_A = 0.2; NHB_B = -0.34; V_A = 0.09; V_B = 0.0625; NHB_bar = 0.2; V_T = 0.09; V_W = 0.09; V_S = 0; s_S = 0
  • Illustrative structures that reverse the decision with a small between-structure share

    Two illustrative structures give net health benefits of 0.05 and -0.05 QALYs per patient, each with a within-structure variance of 0.09, and the weight on the first is 0.6. The between-structure part is 0.0024, only 2.6% of the total variance of 0.0924, yet the decision reverses with the structure.

    w = 0.6; NHB_A = 0.05; NHB_B = -0.05; V_A = 0.09; V_B = 0.09; NHB_bar = 0.01; V_T = 0.0924; V_W = 0.09; V_S = 0.0024; s_S = 0.026

Common errors

  • Reporting only the within-structure variances after model averaging

    Taking the weighted mean of the two within-structure variances as the variance of the averaged result leaves out the disagreement between the structures. In the first worked example it gives 0.08175 against 0.142986, which is 43% too low, and hides the part of the uncertainty that model averaging exists to represent.

  • Averaging the net health benefit of the two structures draw by draw

    Forming each draw as the weight times a draw from structure A plus the complement times a draw from structure B gives the right mean but the wrong distribution. With independent draws its variance is the squared weight times V_A plus the squared complement times V_B (derived), 0.049725 in the first worked example against 0.142986, which is 65% too low, and the gap between the structures vanishes from the spread. Jackson and colleagues merge the draws instead, so that each draw comes from one structure.

  • Reading a small between-structure share as a decision that does not depend on structure

    The share s_S compares spreads and says nothing about the sign of the decision. In the fourth worked example it is 2.6%, yet one structure gives a positive net health benefit and the other a negative one. The structure-specific results stay informative alongside the average, as the article says, and the weight at which the sign changes is HE-FM-OWSA-002.

  • Treating one weighting rule as settling the structural question

    The weights carry judgement, and the variance and mean move with them. In the aneurysm repair analysis of Jackson and colleagues, the probability of cost-effectiveness at GBP 20,000 per QALY averaged over all models was 0.069 with AIC and 0.35 with BIC, against 0.011 in the base case. Reporting one set of weights without the other, or without the structure-specific results, hides that dependence.

  • Reading a normal probability from the total variance of a mixture

    A normal distribution with mean NHB_bar and variance V_T can misstate the chance of a positive net health benefit, because the averaged distribution is a mixture. With the article's means, a weight of 0.7 and illustrative normal within-structure distributions of variance 0.01, the mixture gives a probability of 0.684 and the normal shortcut 0.557 (computed here). The share of positive merged draws (HE-CF-STRU-001) gives the mixture's value without a shape assumption.

Sources

  • Hoeting and colleagues on the posterior mean and variance under model averaging

    Hoeting JA, Madigan D, Raftery AE, Volinsky CT. Bayesian model averaging: a tutorial. Statistical Science. 1999;14(4):382-417. Section 1, Introduction, page 383, the unnumbered display after equation 3, gives the posterior mean as the sum of each model's mean times its posterior probability and the posterior variance as the sum of each model's variance plus its squared mean, times its posterior probability, less the squared posterior mean. The same section states that all probabilities are implicitly conditional on the set of models considered. The split into V_W and V_S is derived from this display.

    View source →

  • Jackson and colleagues on merging draws and on greater uncertainty after averaging

    Jackson CH, Thompson SG, Sharples LD. Accounting for uncertainty in health economic decision models by using model averaging. Journal of the Royal Statistical Society Series A. 2009;172(2):383-404. Section 3.3, Implementation and consequences of model averaging, states that averaging over models which give different predictions will generally give greater uncertainty than the model-specific inferences. Section 4.2, the results section on model-averaged cost-effectiveness analysis, merges N p(M1|x) replicates from model M1 with N p(M2|x) replicates from model M2 and reports the probabilities of 0.069, 0.35 and 0.011.

    View source →

  • NICE manual on model averaging for structural uncertainty

    National Institute for Health and Care Excellence. NICE technology appraisal and highly specialised technologies guidance: the manual (PMG36). Published 31 January 2022, last updated 13 October 2026. Section 4.7.5 says that it may be possible to incorporate structural uncertainty within a probabilistic model, for example by model averaging or assigning a probability distribution to alternative structural assumptions, and that the alternative assumptions, any probabilities used to weight them and any expert advice should be transparently documented.

    View source →

  • HEMA Report 2 on preferring model averaging where alternatives can be weighted

    Steuten L, Thavorn K, Cipriano LE, Guertin JR, McQueen B, Schmidler G, Sullivan S, Wailoo A, Sculpher M. Methods to Analyze and Present Uncertainty in Economic Evaluation to Support HTA Decisions. HEMA Report 2. Health Economics Methods Advisory; 2026. Section 4.5 states that where the alternatives can be enumerated and weighted, model averaging is preferable, because it returns a single distribution in place of separate results that still have to be combined by judgement.

    View source →

  • Bojke and colleagues on methods for structural uncertainty

    Bojke L, Claxton K, Sculpher M, Palmer S. Characterizing structural uncertainty in decision analytic models: a review and application of methods. Value in Health. 2009;12(5):739-749. The abstract identifies model selection and model averaging as methods to characterise such uncertainties and also considers adding uncertain parameters, and it concludes that only parameterising the uncertainty directly in the model can inform the decision to conduct further research.

    View source →

Canonical Identity

This formula is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).

Author: Dr Darrin Baines · Publisher: Intelligent Parameters Ltd · Identifier: https://healtheconomics.wiki/formula/model-averaged-variance-of-net-health-benefit-over-two-structures-with-its-within-structure-and-between-structure-parts