Functions & Formulae

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

Absolute risk reduction function

a(p_C,p_I) = ARR

Maps the risks of an adverse event with the comparator and with the intervention, over the same period, to their difference, oriented so that a benefit is positive. The difference converts a relative treatment effect into events avoided per person treated, the quantity that costs and QALYs in an economic evaluation are built from.

  • Absolute risk reduction from two arm risks

    ARR = p_C - p_I

    Subtracts the intervention-arm risk from the comparator-arm risk of an adverse event. A negative value is an absolute risk increase. The Cochrane Handbook computes the risk difference as intervention minus comparator, so for an adverse outcome ARR equals minus that risk difference.

  • Absolute and relative risk reduction from a relative risk and baseline risk

    ARR = p_C * (1 - RR); RRR = 1 - RR

    Applies a relative risk, for example a pooled estimate from a meta-analysis, to an assumed comparator risk for the population of interest. The intervention risk is p_C times RR, so the ARR is p_C times the relative risk reduction 1 minus RR. For a fixed relative risk, the ARR rises in direct proportion to baseline risk: at a relative risk of 0.75 a baseline risk of 0.04 gives an ARR of 0.01, a fifth of the value at 0.20.

  • Number needed to treat and its confidence limits from the ARR

    NNT = 1 / ARR; NNT_L = 1 / ARR_U; NNT_U = 1 / ARR_L

    Takes the reciprocal of the ARR and of its confidence limits, which reverses their order. The NNT is the expected number of people who must receive the intervention rather than the comparator, over the stated period, for one additional person to avoid the event. By convention it is rounded up to the next whole number when reported.