This post elaborates on the example given in the msm package documentation that builds a survival model for a disease where patients progress through multiple disease states that may end in death. The model is based on the theory of continuous-time Markov chains and allows for the realistic assumption that although the exact time of death may be known, patients are observed at irregular intervals to be in various intermediate states for which the exact times of transitions between states are ...