Functions & Formulae

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

0-1 integer programming function for funding indivisible health programmes within a fixed budget

p(c_i, q_i, B) = (x_i, H_star)

Takes the QALY gain q_i and the budget cost c_i of each of n candidate programmes or medicines, each funded in full or not at all, and a fixed budget B, and returns the package of funding decisions x_i, each 0 or 1, that gives the most QALYs with the cost of the package at most B, together with the QALYs H_star it buys. The league-table rule for whole programmes, HE-FM-CELT-003, funds in ascending order of ICER and passes over a programme that no longer fits, so it returns a package that fits the budget but not always the best one, and the divisible fill of HE-FM-CELT-001, filled for a whole table by HE-CF-CELT-001, part-funds the marginal programme and so gives health that whole programmes may not be able to deliver. Neither record searches the packages, and HE-FM-CELT-003 leaves the best choice of whole programmes to this article. HE-FM-IPH-001 gives H_star for four programmes by checking every package, with its gap to the health of a funding rule and its distance below the divisible fill, and HE-CF-IPH-001 enumerates the packages for any number of programmes and adds programmes that a rule requires to be funded. The critical ratio of a league table is HE-FM-CELT-002 and the budget implied by a threshold is HE-FM-CELT-004; shadow prices and Lagrangian conditions belong to the Constrained Optimisation article. The article's set-up cost form, a fixed cost switched on by a binary set-up variable plus a cost per person covered, is a model-building device for mixed-integer programmes and is not drafted here. Notation follows the Integer Programming article.

  • Integer optimum of the 0-1 funding problem for four indivisible programmes with its gaps to a funding rule and to the divisible fill

    H_star = max(max(max(max(max(max(max(max(max(max(max(max(max(max((c_1 <= B) * q_1, (c_2 <= B) * q_2), (c_3 <= B) * q_3), (c_4 <= B) * q_4), (c_1 + c_2 <= B) * (q_1 + q_2)), (c_1 + c_3 <= B) * (q_1 + q_3)), (c_1 + c_4 <= B) * (q_1 + q_4)), (c_2 + c_3 <= B) * (q_2 + q_3)), (c_2 + c_4 <= B) * (q_2 + q_4)), (c_3 + c_4 <= B) * (q_3 + q_4)), (c_1 + c_2 + c_3 <= B) * (q_1 + q_2 + q_3)), (c_1 + c_2 + c_4 <= B) * (q_1 + q_2 + q_4)), (c_1 + c_3 + c_4 <= B) * (q_1 + q_3 + q_4)), (c_2 + c_3 + c_4 <= B) * (q_2 + q_3 + q_4)), (c_1 + c_2 + c_3 + c_4 <= B) * (q_1 + q_2 + q_3 + q_4)); G_rule = H_star - H_rule; L_ind = H_div - H_star

    Each of the 15 packages that fund at least one of four programmes contributes its total QALYs when its total cost is at most the budget and zero when it is not, and H_star is the largest contribution, the optimum of the article's binary problem of maximising the sum of q_i x_i subject to the sum of c_i x_i at most B with each x_i equal to 0 or 1. Funding nothing gives zero, so H_star is zero when no programme fits. G_rule is the health that a funding rule's package, with health H_rule, leaves unbought at the same budget, the loss of benefit that Crown and colleagues say optimisation shows for the choice finally made, and with H_rule taken from HE-FM-CELT-003 it is the gain of the optimum over the league table. L_ind is the health the divisible fill of HE-FM-CELT-001, H_div, buys above the optimum, the health lost purely because programmes cannot be split (derived). The formula is written out for four programmes so that it runs as calculator text, and HE-CF-IPH-001 does the same search for any number.