Wanying Ling
This is a code note for the decomposition approach to healthy life expectancy based on multistate life tables (Shen et.al, 2023).
It contains seven functions:
l0_func : Function for obtaining baseline population health structure.
lx_func : Function for obtaining
P_func : Function for obtaining the matrix of transition probabilities.
All_P_func : Function for obtaining $ \prod_{k=x}^{\beta-1} \mathbf{P}_k}$.
SUM_func : Function for obtaining
HLE_func : Function for obtaining
Decom_func : Function for obtaining component from the initial population $\dot{\mathbf{l}}\alpha \cdot{ }{\beta-\alpha} \mathbb{e}_\alpha$.
DecomByTrans_func : Function for decomposition of differences in transition probabilities.
The dataset BASELINE.csv includes the initial health structure of the population. It contains four variables:
-
state: health state (with 1 and 2, healthy and unhealthy respectively)
-
ragender: gender
-
pro: proportion of the population in that health state (they are rescaled to 1 by sex and iteration to calculated the HLE for male and female separately)
-
iter: bootstrap iteration number
The dataset PROB.csv includes the transition probabilities by age. It contains seven variables:
-
pre_state: the initial state
-
ragender: gender
-
age: age
-
iter: bootstrap iteration number
-
A: probability to "Healthy" given the initial state
-
L: probability to "Unhealthy" given the initial state
-
H: probability to "Death" given the initial state
For other enquiries related to the note and codes, please email [email protected]