11 Comments

So if I want to calculate life expectancy for 2022, I would

- create a newborn cohort (excact size doesn't matter here I suppose)

- calculate the risk of death for each age group, using "deaths per capita in 2022"

- then I just go through the risk array, remove a proportion of individuals from the cohort each year (risk=proportion removed?) until they're all gone.

- for each age I use the number of individuals that were removed as my weight for the respective age

- add all elements (weights applied) up

- divide by the sum of all weights

Right? I always wanted to know how this works.

Expand full comment