Functions & Formulae

Each applied formula has its own function page, with a signature, implementations, and tests.

League-table allocation of a fixed budget across independent programmes ranked by ICER

L(Delta_C_i, Delta_E_i, B, lambda) = (x_i, H, lambda_c, B_lambda)

Takes the incremental cost Delta_C_i and incremental health gain Delta_E_i of each of a set of independent programmes, each measured against its own comparator, and a fixed budget B. It returns the share of each programme funded when programmes are funded in ascending order of ICER until the budget is exhausted, the health the budget buys, the critical ratio of the last programme funded and, under the alternative fixed ratio rule, the budget that a stated threshold implies. Each programme's ratio is the two-option ICER of HE-FM-ICER-001, or the ratio against doing nothing of HE-FM-ACER-002 when doing nothing is the comparator, and is not restated here. A league table ranks independent programmes competing for one budget, while mutually exclusive options for the same patients are ranked on the cost-effectiveness frontier (HE-FN-CEF-001, HE-CF-CEF-001), and the table takes such a set at its sequential ratios along the frontier (HE-FM-CEA-001). Ties and cost-saving programmes follow the dominance rule HE-FM-DOM-001, the threshold as marginal spending over marginal health is HE-FM-CET-001, and the health a new programme displaces at a threshold, Delta_C divided by k, and its incremental net health benefit are HE-FM-CET-002. This package adds the funded share of each programme, the critical ratio, the fill for programmes that must be funded whole and the budget implied by a fixed ratio, with a computational function that fills the table for any number of programmes. Notation follows the Cost-Effectiveness League Table article.

  • Funded share of a league-table programme from the budget left after the programmes ranked above it

    x_i = min(1, max(0, (B - S_prev) / Delta_C_i)); h_i = x_i * Delta_E_i; S_i = S_prev + Delta_C_i

    Funds programme i, the i-th in ascending order of ICER, in full when the budget left after the programmes ranked above it covers its incremental cost, in part when it covers some of that cost, and not at all when nothing is left. The share x_i is the budget left, B less the cumulative cost S_prev of the programmes above, divided by Delta_C_i and held at least 0 and at most 1, and the health it buys is x_i times Delta_E_i. Applied down the table this is the league-table rule of Marseille and colleagues, which Sacristán and colleagues call the fixed budget rule and Dakin and Tsiachristas identify as the greedy algorithm for the knapsack problem, with the marginal programme part-funded as in the article's worked example. S_i carries the cumulative cost to the next row, and HE-CF-CELT-001 fills the whole table.

  • Critical ratio of the fixed budget rule as the highest ICER among four funded programmes

    lambda_c = max(max(max(f_1 * r_1, f_2 * r_2), f_3 * r_3), f_4 * r_4)

    Reads the critical ratio lambda_c, which Sacristán and colleagues define as the ICER of the least cost-effective intervention adopted, from four programmes in ascending ICER order. Each f_i is 1 when programme i receives a share above zero in HE-FM-CELT-001, in full or in part, and 0 otherwise, and each r_i is that programme's ICER from HE-FM-ICER-001, so the largest product is the ratio of the last programme funded. Sacristán and colleagues describe this ratio as the cost-effectiveness threshold that represents the opportunity cost of funding new programmes. While the marginal programme still has an unfunded part, one more unit of budget buys 1 divided by lambda_c units of health, the shadow price of the budget in the sense Dakin and Tsiachristas give, and lambda_c is then the threshold k of HE-FM-CET-001 for a small change in budget (derived).

  • League-table fill of three indivisible programmes funded whole or not at all

    y_1 = (Delta_C_1 <= B); y_2 = (y_1 * Delta_C_1 + Delta_C_2 <= B); y_3 = (y_1 * Delta_C_1 + y_2 * Delta_C_2 + Delta_C_3 <= B); H_w = y_1 * Delta_E_1 + y_2 * Delta_E_2 + y_3 * Delta_E_3; U_w = B - (y_1 * Delta_C_1 + y_2 * Delta_C_2 + y_3 * Delta_C_3)

    Funds whole programmes in ascending order of ICER, each only if its full incremental cost fits in the budget left after the programmes already funded, and otherwise passes over it to the next. Each y_i is 1 when programme i is funded and 0 otherwise, H_w is the health bought and U_w the budget left unspent. Dakin and Tsiachristas frame the allocation of healthcare resources as a 0-1 knapsack problem, in which each item is packed whole or not at all, and the league table as the greedy algorithm for it, and Stinnett and Paltiel show that mathematical programming handles partial and complete indivisibility. Following the order need not give the most health that whole programmes can buy (HE-ER-CELT-005). The best choice of whole programmes belongs to the Integer Programming article.

  • Budget implied by a fixed cost-effectiveness ratio across four independent programmes

    a_1 = (Delta_C_1 <= lambda * Delta_E_1); a_2 = (Delta_C_2 <= lambda * Delta_E_2); a_3 = (Delta_C_3 <= lambda * Delta_E_3); a_4 = (Delta_C_4 <= lambda * Delta_E_4); B_lambda = a_1 * Delta_C_1 + a_2 * Delta_C_2 + a_3 * Delta_C_3 + a_4 * Delta_C_4

    Under the fixed ratio rule a programme is adopted when its ICER does not exceed a threshold lambda, tested here as Delta_C_i at most lambda times Delta_E_i, which is an incremental net monetary benefit of HE-FM-NMB-002 of zero or above. Each a_i is 1 for an adopted programme and 0 otherwise, and B_lambda adds up the incremental costs of the adopted programmes, the budget the threshold implies. Sacristán and colleagues state that the fixed ratio rule and the fixed budget rule coincide if this implied budget is the same as the budget constraint of the fixed budget rule. A B_lambda above the budget means the threshold adopts more than the budget pays for, and one below it leaves money that could buy more health.