
Capturing Sequences of Multimorbidity
Think of observing 1,000 patients over time. Some develop a disease, others experience more medical conditions. Multi-Channel Sequence Analysis captures how they evolve, when shifts occur, and how long each lasts.

Code
This R code simulates patients' disease progression, generating varied sequences with transitions across several predefined medical conditions, such as diabetes, CVD, cancer.

Data
A simulated dataset of 1,000 individuals records monthly medical conditions, showing disease progression, for example, ID #1 goes from no disease to comorbidity (diabetes and CVD).

Figure
Five clusters were identified (demo purpose), each with distinct sequence patterns. For example, Cluster 1 is first dominated by a single disease, then later by diabetes and CVD.
This exercise refers to Cezard, Sullivan, & Keenan (2022); more information can be found in their paper.
