This GitHub repository provides the code of the method and exemplary cohort state-tranistion model (cSTM) explained in the following manuscript:
- Krijkamp EM*, Alarid-Escudero F*, Enns EA, Pechlivanoglou P, Hunink MGM, Yang A, Jalal HJ. A multidimensional array representation of state-transition model dynamics. Medical Decision Making, 2020. Volume: 40 issue: 2, page(s): 242-248. (Link to article).
We recommend to first read the manuscript before using the code. The "Supplementary material_array_appraoch_R code of the stylistic 3-state model.R" file has the same code included in the appendix of the paper. The Markdown folder contains a more detailed description of the cSTM and the link between the code and the equations in the manuscript.
In addition to that we provide code showing who to incorporate transition rewards using the cohort trace approach. This code can be found in the "Supplementary material_cohort_trace_approach_R code of the stylistic 3-state model.R" file. We compare the cohort trace approach and the array approach in the "Supplementarty material_compare appraoches.R" code.
Besides a comparison of the cohort trace approach and the array approach we also performed a sensitivity analysis to see how the number of cycles and the number of health states are influencing the performance of the different appraoched.
All code is explained in more detail in the markdown PDF (link to PDF).
-
Myriam Hunink
-
*Equal contribution to this paper