Random effects funnel limits for an over-dispersed observed-to-expected ratio

Widens the funnel of HE-FM-BENC-001 when providers vary more than chance predicts, by adding a between-provider variance tau2 to the sampling variance of the log ratio. The ratio has the form of HE-FM-ALOS-004, which computes it only for bed-days; the same form holds for event counts (derived). The widening follows version 1.19 (2015) of the specification of the Summary Hospital-level Mortality Indicator, in which the standard error of the log ratio is 1 over the square root of the expected count, and the limits are exponentials of z times the square root of that variance plus tau2. The form resembles the prediction interval HE-FM-ADMA-006, but the centre here is the fixed target, log 1 = 0, and the variance is the provider's own, not that of a pooled mean. The band is 1 above the upper limit, 2 within the limits inclusive and 3 below the lower limit, as the specification sets. With tau2 at zero the limits are those of the log ratio without over-dispersion.

Signature

R_h = O_h / E_h; v = 1 / E_h + tau2; L_OD = exp(-z * sqrt(v)); U_OD = exp(z * sqrt(v)); band = 2 - (R_h > U_OD) + (R_h < L_OD)
Inputs
InputsDefinitionUnit
O_hNumber of events observed at provider h over the period compared, zero or morecount
E_hNumber of events expected at provider h from the reference risk model, above zeroevents
tau2Over-dispersion parameter, the variance of true provider effects on the log ratio scale after risk adjustment, estimated by HE-CF-BENC-002, zero or moresquared log ratio
zUpper standard normal percentile for the chosen level, 1.96 for the 95% limit of the specification, above zerostandard deviations
Output
R_hObserved events divided by expected events, with 1 meaning events as the benchmark impliesratio
vSampling variance of the log ratio plus the between-provider variancesquared log ratio
L_ODLower limit for the ratio after allowing for over-dispersionratio
U_ODUpper limit for the ratio after allowing for over-dispersionratio
bandValue 1 above the upper limit, 2 within the limits inclusive and 3 below the lower limitcategory

Function

Benchmark comparison of a provider against a reference level with control limits and payment verdicts

Maps a provider's observed and expected events, or its scored measures, to a verdict against a reference level. The observed-to-expected ratio itself takes the form of HE-FM-ALOS-004, which computes it only for bed-days; the same form holds for event counts (derived), and HE-FM-CWT-003 is the cost version, so it is not restated as its own formula. A crude rate is the first part of HE-FM-PR-001, Wilson limits for a proportion are HE-FM-BINOM-006, and frontier efficiency is the family of HE-FM-EFF-001. HE-FM-BENC-001 tests the ratio against funnel limits held around the target, which have the algebra of the Wald interval HE-FM-AN-001 at theta_hat = 1 but are not built around an estimate. HE-FM-BENC-002 widens those limits for over-dispersion. HE-FM-BENC-003 and HE-FM-BENC-004 turn comparisons into United States Medicare payment reductions, one by distance from a peer median and one by rank. Notation follows the Benchmark Comparison article.

Computational function

  • Computational function for the over-dispersion factor and between-provider variance after trimming

    Takes each provider's expected count and observed-to-expected ratio and returns the over-dispersion factor Phi and the between-provider variance tau2 that HE-FM-BENC-002 needs. It computes the standardised residual sqrt(E) log(R) for each provider, removes the top and bottom 10% of residuals, and applies the specification's estimator to those that remain. The estimator has the denominator of HE-FM-ADMA-004, but its numerator is measured around the target and not around a pooled estimate. The calculator line writes out four retained providers; the trim and any number of providers are in the Excel, R and Python code. The specification prints the estimator without a lower bound, and the code sets a negative value to zero, as HE-FM-ADMA-004 does for its own estimator, so that the square root in HE-FM-BENC-002 exists (derived).

    Inputs and outputs: E_1 to E_4 are the expected counts and R_1 to R_4 the ratios of the retained providers; Z_1 to Z_4 are the standardised residuals; Phi is the over-dispersion factor; W_1 is the sum of expected counts and W_2 the sum of their squares; tau2 is the over-dispersion parameter on the log ratio scale. In the code E and R are vectors of equal length and trim is the share removed at each end.

    Assumption: The assumptions of HE-FM-BENC-002 hold (HE-AS-BENC-004 and HE-AS-BENC-005). Each ratio is above zero. The specification states a trim of 10% at each end and gives no rounding rule, so the code removes the whole number of providers at or below 10% of the total at each end, a choice made here.

    Worked example (Article's four hospitals, no trim): The residuals of the four illustrative hospitals are 1.5047, 2.9938, -1.7285 and 0. Phi is 3.5537 and tau2 is 0.0485. Four providers are far too few to estimate a variance well and the 10% rule removes none; the example only shows the arithmetic. E_1 = 20; R_1 = 1.4; E_2 = 180; R_2 = 1.25; E_3 = 60; R_3 = 0.8; E_4 = 100; R_4 = 1; Z_1 = 1.5047; Z_2 = 2.9938; Z_3 = -1.7285; Z_4 = 0; Phi = 3.5537; W_1 = 360; W_2 = 46400; tau2 = 0.0485

    Worked example (Under-dispersed ratios on target): All four providers exactly on target have residuals of 0 and Phi of 0, so the formula gives a negative value and tau2 is set to 0, a limiting case that checks an implementation. E_1 = 20; R_1 = 1; E_2 = 180; R_2 = 1; E_3 = 60; R_3 = 1; E_4 = 100; R_4 = 1; Z_1 = 0; Z_2 = 0; Z_3 = 0; Z_4 = 0; Phi = 0; W_1 = 360; W_2 = 46400; tau2 = 0

    Worked example (Ten illustrative providers with the trim, for reading against the code): With E of 25, 40, 60, 80, 100, 120, 150, 180, 220 and 300 and R of 1.9, 1.3, 0.8, 1.15, 0.95, 1.2, 0.85, 1.1, 0.9 and 1.05, the trim removes one provider at each end, leaving 8. Phi is 2.0434 and tau2 is 0.0102. This example is for reading against the R and Python code; the scalar lines above run on the site.

    Excel: Name the expected counts ExpectedColumn and the ratios RatioColumn in columns A and B. Enter =SQRT(A2)*LN(B2) in C2 and fill down, naming the column ResidualColumn. Hold =INT(0.1*COUNT(ResidualColumn)) in TrimCount. Enter =IF(AND(RANK(C2,ResidualColumn,0)>TrimCount,RANK(C2,ResidualColumn,1)>TrimCount),1,0) in D2 and fill down, naming the column KeepColumn. OverdispersionFactor holds =SUMPRODUCT(KeepColumn,ResidualColumn,ResidualColumn)/SUM(KeepColumn). TauSquared holds =MAX(0,(SUM(KeepColumn)*OverdispersionFactor-(SUM(KeepColumn)-1))/(SUMPRODUCT(KeepColumn,ExpectedColumn)-SUMPRODUCT(KeepColumn,ExpectedColumn,ExpectedColumn)/SUMPRODUCT(KeepColumn,ExpectedColumn))). A blank or zero ratio returns #NUM! in column C and in every result, and a blank expected count gives a residual of 0 that would pass silently, so the columns should have no gaps. Providers tied at a trim boundary share a RANK and all drop out, so fewer can be retained than the code keeps, and ten or more providers with identical residuals all drop out and return #DIV/0!.

    R: tau2_funnel <- function(E, R, trim = 0.1) { if (any(R <= 0) || any(E <= 0)) stop("E and R must be above zero"); Z <- sqrt(E)*log(R); k <- floor(trim*length(Z)+1e-9); o <- order(Z); keep <- if (k > 0) o[(k+1):(length(Z)-k)] else o; if (length(keep) < 2) stop("need two retained providers"); N <- length(keep); Es <- E[keep]; Phi <- sum(Z[keep]^2)/N; W1 <- sum(Es); c(Phi = Phi, tau2 = max(0, (N*Phi-(N-1))/(W1-sum(Es^2)/W1))) } tau2_funnel(c(20,180,60,100), c(1.4,1.25,0.8,1)) gives Phi of 3.5537 and tau2 of 0.0485; a zero ratio or a single retained provider stops with the message.

    Python: import math then def tau2_funnel(E, R, trim=0.1): Z = [math.sqrt(e)*math.log(r) for e, r in zip(E, R)]; k = int(trim*len(Z)+1e-9); keep = sorted(range(len(Z)), key=Z.__getitem__)[k:len(Z)-k]; N = len(keep); W1 = sum(E[i] for i in keep); W2 = sum(E[i]**2 for i in keep); Phi = sum(Z[i]**2 for i in keep)/N; return Phi, max(0.0, (N*Phi-(N-1))/(W1-W2/W1)) Standard library only; the four hospitals return 3.5537 and 0.0485. A zero ratio raises ValueError and a single retained provider raises ZeroDivisionError (checked here).

    Test (Article's four hospitals): With the four expected counts and ratios and no provider trimmed, TauSquared holds 0.0485 within 0.0005. Expected result TRUE. FALSE shows a Q centred on the pooled estimate, which gives 0.0350, residuals built without the logarithm, and a doubled (0.0970) or halved (0.0243) cell. Excel check =ABS(TauSquared-0.0485)<0.0005

    Test (Over-dispersion factor on four hospitals): OverdispersionFactor holds 3.5537 within 0.0005, the mean of the squared residuals. Expected result TRUE. FALSE shows a sum in place of the mean, which gives 14.2146, and a doubled (7.1073) or halved (1.7768) cell. Excel check =ABS(OverdispersionFactor-3.5537)<0.0005

    Common error (No trim): On the ten illustrative providers, leaving the extreme residuals in gives tau2 of 0.0197 in place of 0.0102, so one or two outliers widen everyone's limits, including their own.

    Common error (Mixing scales): tau2 is a variance on the log ratio scale, so a value estimated on the ratio scale cannot be fed to HE-FM-BENC-002 without conversion.

    Source: Health and Social Care Information Centre. Indicator Specification: Summary Hospital-level Mortality Indicator. Version 1.19, issued 10 June 2015. Section SHMI Upper and Lower Control Limits, page 18, for Z, Phi, the 10% trim and the expression for tau squared. Spiegelhalter DJ. Handling over-dispersion of performance indicators. Quality and Safety in Health Care. 2005;14(5):347-351. Abstract, on the additive random effects approach.

    Z_1 = sqrt(E_1) * log(R_1); Z_2 = sqrt(E_2) * log(R_2); Z_3 = sqrt(E_3) * log(R_3); Z_4 = sqrt(E_4) * log(R_4); Phi = (Z_1^2 + Z_2^2 + Z_3^2 + Z_4^2) / 4; W_1 = E_1 + E_2 + E_3 + E_4; W_2 = E_1^2 + E_2^2 + E_3^2 + E_4^2; tau2 = max(0, (4 * Phi - 3) / (W_1 - W_2 / W_1))

Try this function

Implementations

  • Excel

    Over-dispersed funnel limits and band from named cells

    With inputs in cells named ObservedEvents, ExpectedEvents, ZCritical and TauSquared, the formulas return the total variance in OverdispersedVariance, then OverdispersedLower, OverdispersedUpper and OverdispersedBand. A blank TauSquared cell counts as 0 and gives the limits without over-dispersion, so a missing estimate passes silently. A blank ExpectedEvents cell returns #DIV/0!.

    =1/ExpectedEvents+TauSquared; =EXP(-ZCritical*SQRT(OverdispersedVariance)); =EXP(ZCritical*SQRT(OverdispersedVariance)); =2-(ObservedEvents/ExpectedEvents>OverdispersedUpper)+(ObservedEvents/ExpectedEvents<OverdispersedLower)

Assumptions

  • Log ratio with standard error set by the expected count

    The specification derives its residuals by assuming that the standard error of the log ratio is 1 over the square root of the expected count. Risk model uncertainty in E_h is outside this variance.

  • Between-provider variance estimated from the same comparison

    tau2 comes from the same set of providers, after trimming the extreme residuals, so one outlier does not inflate its own limits. Unmeasured risk factors are one reason for over-dispersion (Spiegelhalter, Statistics in Medicine, HE-SR-BENC-002), and tau2 cannot separate them from real differences in care, so wider limits also reduce the power to detect real differences (derived).

  • Ratio above zero when residuals are computed

    The limits themselves need no logarithm of the ratio, so a provider with no events can be banded, but its residual sqrt(E_h) log(R_h) is undefined and HE-CF-BENC-002 rejects it (derived).

Worked examples

  • Article Hospital B inside after allowing for over-dispersion

    With the tau2 of 0.0485 that HE-CF-BENC-002 estimates from the article's four illustrative hospitals, Hospital B's 95% limits widen to about 0.63 and 1.58, so its ratio of 1.25 falls within them and it takes band 2.

    O_h = 225; E_h = 180; z = 1.96; tau2 = 0.0485; R_h = 1.25; v = 0.054056; L_OD = 0.634; U_OD = 1.5773; band = 2
  • No over-dispersion leaves Hospital B above the limit

    With tau2 at zero, a limiting case that checks an implementation, the 95% limits for Hospital B are about 0.86 and 1.16, so the same ratio takes band 1, above the upper limit. The inputs are illustrative.

    O_h = 225; E_h = 180; z = 1.96; tau2 = 0; R_h = 1.25; v = 0.005556; L_OD = 0.8641; U_OD = 1.1573; band = 1
  • Low ratio below the over-dispersed limit

    An illustrative provider with 60 events against 100 expected and tau2 of 0.0485 has a ratio of 0.60 below its lower limit of about 0.62, so it takes band 3.

    O_h = 60; E_h = 100; z = 1.96; tau2 = 0.0485; R_h = 0.6; v = 0.0585; L_OD = 0.6225; U_OD = 1.6065; band = 3

Common errors

  • Applying the over-dispersion variance on the ratio scale

    Adding z times the square root of v to 1 gives limits of 0.5443 and 1.4557 for Hospital B in place of 0.6340 and 1.5773. tau2 here is defined on the log ratio scale, so the limits take the exponential.

  • Using a DerSimonian and Laird tau2 from HE-FM-ADMA-004 unchanged

    Cochran's Q in HE-VR-ADMA-006 measures deviation from the pooled estimate, whereas this specification measures deviation from the target. On the article's four hospitals the estimates are 0.0350 and 0.0485. The sum of squared residuals around the target equals Q plus the total expected count times the squared pooled log ratio (derived, and checked here on 100,000 random cases).

  • Reading a wider funnel as evidence of good care

    Hospital B is in band 1 at tau2 of zero and in band 2 at 0.0485 with no change in its deaths. Allowing for over-dispersion changes what counts as unusual, and a trust within the limits may still have a real excess. Spiegelhalter reports that the method chosen changes the banding a trust receives.

Sources

  • SHMI specification on random effects control limits

    Health and Social Care Information Centre. Indicator Specification: Summary Hospital-level Mortality Indicator. Version 1.19, issued 10 June 2015. Section SHMI Upper and Lower Control Limits, page 18, for the standard error of the log ratio, the limits as an exponential with z and the square root of 1 over expected plus tau squared, and the 10% trim. Section SHMI Banding, page 17, for the three bands. The specification prints the limit with a signed z, z at 0.025 and at 0.975, and the record writes the same limits with a positive z and a sign.

    View source →

  • Spiegelhalter on handling over-dispersion

    Spiegelhalter DJ. Handling over-dispersion of performance indicators. Quality and Safety in Health Care. 2005;14(5):347-351. Abstract, which reports that ignoring over-dispersion could lead to many institutions being inappropriately classified as abnormal, that funnel plots show the influence of the method on the banding, that the additive random effects formulation appears to have a stronger conceptual foundation, and that the UK Healthcare Commission adopted the method for star ratings.

    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/random-effects-funnel-limits-for-an-over-dispersed-observed-to-expected-ratio