Functions & Formulae

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

Years of life lost from deaths weighted by a loss function of age at death

YLL_c = sum_(a) [N_a * e_a]

Converts deaths from a cause into years of life lost by multiplying the deaths at each age by the years that a loss function assigns to a death at that age, then summing over ages. In the Global Burden of Disease (GBD) study from 2010 onwards and in WHO's Global Health Estimates (GHE) the loss function is the remaining life expectancy at the age of death in a normative standard life table (HE-FM-YLL-001). Potential years of life lost replace it with the years from the age at death to a fixed cut-off age (HE-FM-YLL-002), and the original DALY discounted the standard years (HE-FM-YLL-003). YLLs added to years lived with disability (HE-FN-YLD-001, HE-FM-DWT-001) give DALYs. Notation follows the Years of Life Lost article.

  • Years of life lost from deaths in one age group under a standard life table

    YLL_a = N_a * e_a

    Multiplies the deaths from a cause in one age group by the standard remaining life expectancy for that age group, the years of life lost per death in the standard life table. Summing the products over age groups gives the cause's total, as in the computational function below. GBD 2021 calculated YLLs this way for each cause, age, sex, location and year; GBD 2010 dropped discounting and age weighting.

  • Potential years of life lost before a cut-off age for deaths in one age group

    PYLL_a = N_a * max(C - m_a, 0)

    Counts, for each death before a cut-off age, the years between the midpoint of its age group and the cut-off, and nothing for deaths at or above the cut-off, following the method described by the US Centers for Disease Control (CDC). Unlike HE-FM-YLL-001 it uses no life table, so deaths in old age drop out of the total. The function max returns the larger of its arguments.

  • Continuously discounted years of life lost per death and for a group of deaths

    YLL_death = (1 - exp(-r * L)) / r; YLL_d = N * YLL_death

    Before GBD 2010 the standard DALY discounted future years at 3 per cent a year. With continuous discounting from the time of death and no age weighting, the L standard years remaining at the age of death are worth (1 minus e to the minus rL) over r present years, so discounting reduces the loss from a young death much more than from an old one. The function exp is the exponential function.