Stata codes for "Healthy lifestyle and life expectancy free of major chronic diseases at age 40 in China"
This repository contains the code of the paper: Healthy lifestyle and life expectancy free of major chronic diseases at age 40 in China, by Qiufen Sun, which is being Accepted in Principle in Nat Hum Behav.
Details are:
- transition rate: calculate the overall transition rates for each transition under different definitions of disease.
- risk factor proportion: calculate the sex- and age-specific risk factor prevalence for each transition.
- cox combined: estimate the association between lifestyle factors and each transition by using cox regression.
- LE calculation: calculate the disease-free life expectancy by integrating the foregoing results.