Crude-versus-adjusted ranking reversal condition for two providers' costs

Compares two providers on crude cost per case and on the indirectly standardised cost index. The crude cost ratio rho is the product of the index ratio RI and the ratio mu of expected cost per case, the part of the crude gap that the case mix accounts for, so RI is rho divided by mu and equals I_1 / I_2 for the indices 100 A_h / E_h, which are 100 times R_h of HE-FM-CWT-003. The adjusted ranking reverses the crude one when rho minus 1 and RI minus 1 have opposite signs, which holds exactly when rho lies strictly between mu and 1 (derived here and checked numerically on 200,000 random inputs). A crude cost advantage therefore survives adjustment only when it is larger than the advantage in expected cost per case, and two providers with the same mix, mu equal to 1, cannot reverse. A tie in either ranking is not counted as a reversal.

Signature

rho = (A_1 / n_1) / (A_2 / n_2); mu = (E_1 / n_1) / (E_2 / n_2); RI = rho / mu; rev = (rho - 1) * (RI - 1) < 0
Inputs
InputsDefinitionUnit
A_1Actual total cost of the first provider's cases in the comparison, on the same cost basis as its expected costcurrency
n_1Number of cases of the first provider in the comparisoncount
A_2Actual total cost of the second provider's cases in the comparison, on the same cost basis as its expected costcurrency
n_2Number of cases of the second provider in the comparisoncount
E_1Expected cost of the first provider, its cases in each group priced at the national mean unit cost of the group and summedcurrency
E_2Expected cost of the second provider, priced at the same national mean unit costs as E_1currency
Output
rhoCrude cost per case of the first provider divided by that of the secondratio
muExpected cost per case of the first provider divided by that of the second, the part of the crude ratio due to case mixratio
RICost index of the first provider divided by that of the secondratio, 1 meaning equal indices
revFlag equal to 1 when the crude and the index rankings of the two providers point in opposite directions and 0 otherwiseindicator

Function

Case-mix adjusted provider cost comparison with a ranking reversal rule

Maps the actual costs, case numbers and expected costs at national mean unit costs of two providers to the ratio of their crude costs per case, the ratio of their expected costs per case, the ratio of their indirectly standardised cost indices and a flag for a crude ranking that the adjustment reverses. The article's three methods are live and are cited, not restated. Cost per weighted case, C_h divided by the sum of the case weights, is C_h / CM_h with CM_h = sum n_hg w_g of HE-FM-CWT-003, equal to c_bar times R_h, and the case mix index CMI_h = CM_h / n_h is an output of HE-CF-CWT-001, so the article's (C_h / n_h) / CMI_h is the same quantity. With the weights w_g = c_bar_g / c_bar of HE-FM-CWT-001 the expected cost E_h = sum n_hg c_bar_g equals CM_h times c_bar, so the cost index I_h = 100 A_h / E_h is 100 times R_h of HE-FM-CWT-003, and HE-FM-ALOS-004 applies the same indirect standardisation to bed-days. The PROMs adjusted score Adj_j is the mean over a provider's patients of the need-standardised value of HE-FM-HEQ-002, y_i minus yX_i plus y_bar, with the case-mix prediction in place of yX_i. Direct standardisation on a common mix is the weighted sum of HE-FM-INEQ-001, with case groups in place of age groups, unit costs in place of rates and the pooled case shares as the standard. HE-ER-CWT-004 and HE-ER-ALOS-006 show in numbers a crude ranking that adjustment reverses, and this package adds the condition under which the reversal happens. HE-AS-CWT-006 states that up-coding raises CM_h and lowers R_h with no change in efficiency. The article's upcoding step is HE-FM-CWT-003 recomputed on the recoded counts, an expected cost of E_h plus the number of cases moved times the gap between the two groups' national mean unit costs, so it is cited, not restated. The case mix index and the observed-to-expected benchmark comparison have their own pages. Notation follows the Case-Mix Adjustment article.

Computational function

  • Computational function: provider cost indices, direct standardisation check and reversed pairs from group tables

    Takes the national mean unit cost of each case group and, for each provider, its cases and its unit cost in each group, and returns each provider's actual cost, expected cost, crude cost per case, cost index and directly standardised cost per case on the pooled mix of all providers, with the number of provider pairs whose crude ranking the index reverses and the number the direct standardisation reverses. It carries out steps 1 to 4 of the article's worked example. With the weights of HE-FM-CWT-001 the expected cost and index follow HE-FM-CWT-003 multiplied by 100, the direct standardisation is the weighted sum of HE-FM-INEQ-001 with the pooled case shares as the standard, and each pair is classified with the reversal rule of HE-FM-CMAD-001. The calculator line writes out two providers and two groups; the Excel, R and Python code take any number of each, so the inputs differ from the formula's symbols.

    Inputs and outputs: cbar_1 and cbar_2 are the national mean unit costs of the two groups, n_A1, n_A2, n_B1 and n_B2 the cases of providers A and B in each group, and u_A1, u_A2, u_B1 and u_B2 their unit costs in each group. A_A and A_B are actual costs, E_A and E_B expected costs, crude_A and crude_B crude costs per case, I_A and I_B cost indices, s_1 the pooled share of the first group, D_A and D_B the directly standardised costs per case, and rev_I and rev_D equal 1 when the index or the direct standardisation reverses the crude ranking. In the code n and u are provider by group tables, cbar the national costs, and rev_I and rev_D count the reversed pairs.

    Assumption: Every provider's cases are grouped on the same classification, the national mean unit costs come from one collection on the same cost basis as the providers' unit costs, and ties are not counted as reversals.

    Worked example (Article's Hospitals A and B): The indices are 105 and 95 and the directly standardised costs 4,935 GBP and 4,465 GBP, so both methods reverse the crude ranking, as in the article. cbar_1 = 2000; cbar_2 = 8000; n_A1 = 800; n_A2 = 200; u_A1 = 2100; u_A2 = 8400; n_B1 = 300; n_B2 = 700; u_B1 = 1900; u_B2 = 7600; A_A = 3360000; A_B = 5890000; E_A = 3200000; E_B = 6200000; crude_A = 3360; crude_B = 5890; I_A = 105; I_B = 95; s_1 = 0.55; D_A = 4935; D_B = 4465; rev_I = 1; rev_D = 1

    Worked example (Identical unit costs in every group): With illustrative unit costs of 2,200 GBP and 8,000 GBP at both hospitals the indices are 105 and about 100.97 and reverse the crude ranking, while the directly standardised costs are equal at 4,810 GBP, so the reversal comes from the mix weighting alone (computed here for illustration). cbar_1 = 2000; cbar_2 = 8000; n_A1 = 800; n_A2 = 200; u_A1 = 2200; u_A2 = 8000; n_B1 = 300; n_B2 = 700; u_B1 = 2200; u_B2 = 8000; A_A = 3360000; A_B = 6260000; E_A = 3200000; E_B = 6200000; crude_A = 3360; crude_B = 6260; I_A = 105; I_B = 100.9677; s_1 = 0.55; D_A = 4810; D_B = 4810; rev_I = 1; rev_D = 0

    Excel: With one provider per row from row 2, here rows 2 to 11 for ten providers, its cases in the two groups in columns B and C, its unit costs in D and E, and the national mean unit costs in B13:C13 (named NationalUnitCost), row 2 holds =SUMPRODUCT(B2:C2,D2:E2) for the actual cost in F2, =SUMPRODUCT(B2:C2,NationalUnitCost) for the expected cost in G2, =F2/SUM(B2:C2) for the crude cost per case in H2 and =100*F2/G2 for the index in I2, each filled down. The pooled shares are =SUM(B$2:B$11)/SUM($B$2:$C$11) in B14, filled right into C14 (named PooledShare), and =SUMPRODUCT(D2:E2,PooledShare) in J2, filled down, gives the directly standardised cost per case, with J2 and J3 named DirectCostFirst and DirectCostSecond. =SUMPRODUCT(--(($H$2:$H$11-H2)*($I$2:$I$11-I2)<0)) in K2 and =SUMPRODUCT(--(($H$2:$H$11-H2)*($J$2:$J$11-J2)<0)) in L2, filled down, count the providers whose order against row 2 differs, and =SUM(K2:K11)/2 and =SUM(L2:L11)/2 in cells named ReversedPairsIndex and ReversedPairsDirect count each reversed pair once. The ranges cover exactly the providers compared, and more groups add columns.

    R: case_mix_compare <- function(n, u, cbar) { A <- rowSums(n*u); E <- as.vector(n %*% cbar); crude <- A/rowSums(n); I <- 100*A/E; s <- colSums(n)/sum(n); D <- as.vector(u %*% s); pr <- combn(nrow(n), 2); rev_I <- sum((crude[pr[1, ]]-crude[pr[2, ]])*(I[pr[1, ]]-I[pr[2, ]]) < 0); rev_D <- sum((crude[pr[1, ]]-crude[pr[2, ]])*(D[pr[1, ]]-D[pr[2, ]]) < 0); list(A = A, E = E, crude = crude, I = I, D = D, rev_I = rev_I, rev_D = rev_D) } Base R only; case_mix_compare(rbind(c(800, 200), c(300, 700)), rbind(c(2100, 8400), c(1900, 7600)), c(2000, 8000)) returns indices of 105 and 95, direct costs of 4935 and 4465 and one reversed pair for each method.

    Python: def case_mix_compare(n, u, cbar): P = len(n); G = len(cbar); A = [sum(n[h][g]*u[h][g] for g in range(G)) for h in range(P)]; E = [sum(n[h][g]*cbar[g] for g in range(G)) for h in range(P)]; crude = [A[h]/sum(n[h]) for h in range(P)]; I = [100*A[h]/E[h] for h in range(P)]; tot = sum(sum(r) for r in n); s = [sum(n[h][g] for h in range(P))/tot for g in range(G)]; D = [sum(s[g]*u[h][g] for g in range(G)) for h in range(P)]; pairs = [(i, j) for i in range(P) for j in range(i+1, P)]; rev_I = sum((crude[i]-crude[j])*(I[i]-I[j]) < 0 for i, j in pairs); rev_D = sum((crude[i]-crude[j])*(D[i]-D[j]) < 0 for i, j in pairs); return {"A": A, "E": E, "crude": crude, "I": I, "D": D, "rev_I": rev_I, "rev_D": rev_D} Plain Python with no imports, taking lists of lists in the same group order; the article's inputs return the same values as the R code.

    Test (Article's hospitals reverse under both methods): With the article's inputs ReversedPairsIndex and ReversedPairsDirect are both 1. Expected result TRUE. Expected costs priced at each provider's own unit costs instead of NationalUnitCost give both indices 100, a tie that is not counted, and FALSE. Excel check =AND(ReversedPairsIndex=1,ReversedPairsDirect=1)

    Test (Identical unit costs give identical direct costs): With the identical unit costs of the second worked example DirectCostFirst equals DirectCostSecond while ReversedPairsIndex is 1. Expected result TRUE. A direct standardisation taken on each provider's own mix returns the crude costs, 3,360 GBP and 6,260 GBP, and FALSE. Excel check =AND(ABS(DirectCostFirst-DirectCostSecond)<1E-9,ReversedPairsIndex=1)

    Common error (Standardising each provider to its own mix): Weighting each provider's unit costs by its own case shares returns its crude cost per case, 3,360 GBP and 5,890 GBP in the article, so the check repeats the crude comparison it was meant to correct; the standard is the pooled mix, 55% simple and 45% complex.

    Source: NHS England and NHS Improvement. User guide: National Cost Collection 2018/19. A guide to using the data. 2020. Chapter 3, Table 9 (p. 23), expected cost as activity multiplied by the national mean unit cost, and Chapter 2, Table 7 (p. 15), the index as actual over expected cost multiplied by 100. Shahian DM, Normand SL. Comparison of "risk-adjusted" hospital outcomes. Circulation. 2008;117(15):1955-1963. Abstract, Conclusions, on indirectly standardised outcomes not being used to compare one institution directly with another without reasonable case-mix overlap.

    A_A = n_A1 * u_A1 + n_A2 * u_A2; A_B = n_B1 * u_B1 + n_B2 * u_B2; E_A = n_A1 * cbar_1 + n_A2 * cbar_2; E_B = n_B1 * cbar_1 + n_B2 * cbar_2; crude_A = A_A / (n_A1 + n_A2); crude_B = A_B / (n_B1 + n_B2); I_A = 100 * A_A / E_A; I_B = 100 * A_B / E_B; s_1 = (n_A1 + n_B1) / (n_A1 + n_A2 + n_B1 + n_B2); D_A = s_1 * u_A1 + (1 - s_1) * u_A2; D_B = s_1 * u_B1 + (1 - s_1) * u_B2; rev_I = (crude_A - crude_B) * (I_A - I_B) < 0; rev_D = (crude_A - crude_B) * (D_A - D_B) < 0

Try this function

Implementations

  • Excel

    Crude, mix and index ratios with a reversal flag from named cells

    With each provider's actual cost, cases and expected cost in cells named ActualCostFirst, CasesFirst, ExpectedCostFirst, ActualCostSecond, CasesSecond and ExpectedCostSecond, the four formulas return rho in a cell named CrudeCostRatio, mu in MixRatio, RI in IndexRatio and the flag, TRUE for a reversal, in RankReversal.

    =(ActualCostFirst/CasesFirst)/(ActualCostSecond/CasesSecond); =(ExpectedCostFirst/CasesFirst)/(ExpectedCostSecond/CasesSecond); =CrudeCostRatio/MixRatio; =(CrudeCostRatio-1)*(IndexRatio-1)<0

Assumptions

  • Same national unit costs and cost basis for both providers' indices

    Both expected costs price the same case groups at the same national mean unit costs, and each actual cost is on the same basis as its expected cost. In the National Cost Collection the expected cost is the organisation's activity multiplied by the national mean unit cost and the index queries run on data adjusted by the market forces factor, so a crude cost set against that index is taken on the same adjusted basis.

  • Index ratio read as like for like only under proportional cost deviations

    RI compares two indices, each standardised to its own provider's mix. When each provider's unit cost is the same multiple of the national cost in every group, its index is 100 times that multiple and RI equals the ratio of directly standardised costs for any common mix (derived here), as in the article, where both give 1.105. Otherwise the two ratios can differ. Shahian and Normand state that indirectly standardised outcomes should not be used to compare one institution directly with another unless the case-mix distributions overlap reasonably, so the direct standardisation of HE-FM-INEQ-001 on the pooled mix is the check.

  • Ties in the crude or the adjusted cost ranking

    rev is 1 only when the product of rho minus 1 and RI minus 1 is negative. Equal crude costs per case, rho equal to 1, or equal indices, RI equal to 1, give a product of 0 and are not counted as a reversal, a convention of this formula.

Worked examples

  • Article's two hospitals reverse after indirect standardisation

    In the article's illustrative example Hospital A costs 3,360,000 GBP for 1,000 cases against an expected 3,200,000 GBP, and Hospital B 5,890,000 GBP for 1,000 cases against an expected 6,200,000 GBP. A's crude cost per case is 57% of B's, but its expected cost per case is only 52% of B's, so rho lies between mu and 1 and the ranking reverses. The index ratio is 105 / 95, about 1.105, as in the article.

    A_1 = 3360000; n_1 = 1000; E_1 = 3200000; A_2 = 5890000; n_2 = 1000; E_2 = 6200000; rho = 0.570458; mu = 0.516129; RI = 1.105263; rev = 1
  • Crude cost advantage larger than the case-mix advantage survives adjustment

    An illustrative Hospital C has B's mix and costs 20% above the national mean in both groups, 7,440,000 GBP for 1,000 cases against an expected 6,200,000 GBP. A's crude cost per case is 45% of C's, below the mix ratio of 52%, so A stays the cheaper provider after adjustment, with indices of 105 and 120 (computed here for illustration).

    A_1 = 3360000; n_1 = 1000; E_1 = 3200000; A_2 = 7440000; n_2 = 1000; E_2 = 6200000; rho = 0.451613; mu = 0.516129; RI = 0.875; rev = 0
  • Same case mix cannot reverse a crude cost ranking

    An illustrative second hospital has A's mix and costs 5% below the national mean in both groups, 3,040,000 GBP against an expected 3,200,000 GBP. Then mu is 1, the index ratio equals the crude ratio and no reversal is possible, a limiting case that checks an implementation.

    A_1 = 3360000; n_1 = 1000; E_1 = 3200000; A_2 = 3040000; n_2 = 1000; E_2 = 3200000; rho = 1.105263; mu = 1; RI = 1.105263; rev = 0

Common errors

  • Reading two providers' crude cost ratio as relative efficiency

    In the article's example B's crude cost per case is 75% above A's (5,890 / 3,360 = 1.753), while A's index is 10.5% above B's (105 / 95 = 1.105). The crude gap reflects B's larger share of complex cases, a mix ratio of 0.516, and points the wrong way.

  • Reading a reversal of indirectly standardised indices as a like-for-like cost difference

    Two illustrative hospitals with A's and B's mixes and identical unit costs in every group, 2,200 GBP for simple and 8,000 GBP for complex cases, score indices of 105.0 and about 100.97, so A looks about 4% dearer and the crude ranking reverses, yet direct standardisation on the pooled mix (HE-FM-INEQ-001) gives both 4,810 GBP per case (computed here for illustration). The 10% excess on simple cases weighs more in A's simple-heavy mix, so an index ratio is checked against direct standardisation before it is read as a cost difference for the same patients.

  • Mixing per-case crude costs with total expected costs in the mix ratio

    If Hospital A treated half as many cases with the same mix and unit costs, its crude cost per case would stay 3,360 GBP, but a mix ratio taken on total expected costs, 1,600,000 / 6,200,000 = 0.258, in place of expected cost per case gives an index ratio of about 2.21 instead of 1.105 (computed here for illustration). The case numbers cancel only when both ratios are taken per case or both on totals.

  • Reading an index ratio widened by recoding as a cost difference

    In step 5 of the article's illustrative example Hospital B records 100 of its simple cases as complex, with the same care and the same 5,890,000 GBP of cost. Its expected cost rises by 100 × 6,000 = 600,000 GBP to 6,800,000 GBP, so mu falls from about 0.516 to about 0.471 and the index ratio rises from about 1.105 to about 1.212, while rho stays at about 0.570. B's index falls from 95 to about 86.6, a change equal to the old index times the added expected cost over the new one, 95 × 600,000 / 6,800,000 = 8.38 points (derived here). The recoded index is HE-FM-CWT-003 recomputed on the new counts, the effect HE-AS-CWT-006 warns of, so an index ratio is read against coding audits before it is credited to efficiency.

  • Reading a ratio inflated by under-coding as worse performance

    Mohammed and colleagues give a hypothetical pair of hospitals that are identical in case mix, care and deaths, 1,500 each, where hospital B under-records comorbidities. B's expected deaths fall to 743 and its standardised mortality ratio rises to 202 against 100 for A, a ratio of about 2.02 between the two hospitals with no difference in care. A ratio of cost indices moves the same way when one provider records its cases in lighter groups than the other, so RI between providers with different coding depth is checked against coding audits before it is read as a cost difference.

Sources

  • National Cost Collection user guide on expected cost and the cost index

    NHS England and NHS Improvement. User guide: National Cost Collection 2018/19. A guide to using the data. 2020. Chapter 3, Table 9, expected cost row (p. 23), which defines expected cost as the organisation's activity multiplied by the national mean unit cost; Chapter 2, Table 7 (p. 15), whose index queries compute the index as summed actual cost divided by summed expected cost, multiplied by 100; and p. 9, which states that the data adjusted by the market forces factor is used for the index queries. The reversal condition is derived here and is not in the guide.

    View source →

  • Shahian and Normand on comparing indirectly standardised hospital outcomes

    Shahian DM, Normand SL. Comparison of "risk-adjusted" hospital outcomes. Circulation. 2008;117(15):1955-1963. Abstract, Conclusions, which state that with indirect standardisation the outcomes reflect a provider's performance for its specific case mix relative to the expected performance of an average provider for that same case mix, and that unless the case-mix distributions overlap reasonably such outcomes should not be used to compare one institution directly with another.

    View source →

  • Mohammed and colleagues on coding depth and standardised mortality ratios

    Mohammed MA, Deeks JJ, Girling A, Rudge G, Carmalt M, Stevens AJ, Lilford RJ. Evidence of methodological bias in hospital standardised mortality ratios: retrospective database study of English hospitals. BMJ. 2009;338:b780. Introduction, box Example of differential measurement error, in which under-recording of comorbidities cuts hospital B's expected deaths to 743 against 1,500 and gives a standardised mortality ratio of 202 for identical hospitals; Discussion, which states that hospitals with a lower depth of coding had a lower Charlson index, which underestimated the expected mortality and inflated the standardised mortality ratio.

    View source →

Canonical Identity