基于文章的连续时间三状态马尔科夫模型示例(简化版)在发表于柳叶刀公共卫生的文章《The effect of healthy lifestyles and social determinants on independent life expectancy and sex differences in China:evidence from a 13-year cohort study》中,作者使用连续时间三状态马尔科夫模型对每个老年人的状态变化进行建模,并由此计算出独立预期寿命。本文将用简化版的代码粗略复刻文章使用的研究方法。