Functions & Formulae

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

Quality-adjusted survival function

Q(u_t,d_t) = QALY

Maps a profile of health-state utility over time to quality-adjusted life years, the area under the utility-over-time curve.

  • QALYs from periods of constant utility

    QALY = sum_(t=1)^T [u_t * d_t]

    Multiplies the utility of each period by the time spent in it, in years, and adds the products across periods. This is the calculation NICE describes for the health states experienced within the time horizon.

  • QALYs by linear interpolation between observations

    QALY_AUC = sum_(t=1)^T [(u_start_t + u_end_t) / 2 * d_t]

    Estimates the area under the utility curve when utility is observed at time points and assumed to change in a straight line between them, the trapezoidal method used with repeated utility measurements in trials.