The health model calculates the mortality distribution by country/region, age category, sex, and cause of death (modmordstdet). This distribution allows the specification of key variables in the population model, including life expectancy (LIFEXP) and infant mortality (INFMOR). Life Expectancy is computed as a mean average number of years of life given the survival rates in each age group. First we find total mortality by country/region (r), age (c) and gender (p) by adding all 15 types of mortality (d) using modmordstdet (c,a,g,t). (Note with respect to model code: we actually combine the gender and mortality type subscript into one, with the odd type values representing males and the even type values for females).
Second we find the average years lived (nax), within the age group, by those who die (per Coale and Demeny 1983, using parameters that came from the arithmetic mean of the separate male and female parameters shown in Preston, Heuveline, and Guillot 2001):
Infants with mortality >= 0.107 = 0.34 years
Infants with mortality < 0.107 = 0.049 + 2.742 * (mortality)
Children 1-4 where infant mortality >= 0.107 = 1.356 years
Children 1-4 where infant mortality < 0.107 = 1.587 - 2.167 * (infant mortality)
Everybody else lives 2.5 years (out of 5 possible years).
Third we compute the probability of death (nqx) for each country (c), group age (a), and gender (g) (this is the probability of dying between ages x and x + N, which is period a):
where N is the number of years in the age category (1 for infants, 4 for children 1-4, and 5 for everybody else), and nax is the number of years lived by those who died, described in the previous step. We're assuming nqx = 1 when we reach our maximum age category (100+ in general).
Fourth we start adding years for each age category (a) in the following way:
Where the first term added to life expectancy is the total number of years (N) lived by those who survive this age category (1 - nqx) given they have survived all previous ages (lx). The second term is the number of years (nax) lived by those who die in this age category (nqx) given they have survived all previous ages (lx).
The probability of surviving until age a is computed as:
where lx at birth is 1.
Infant Mortality is simply calculated as the sum of all our 15 mortality types from internal variable modmordstdet but only for age 0 (infants).