Skip to main content
QUICK REVIEW

[Paper Review] A Tutorial on Time-Dependent Cohort State-Transition Models in R using a Cost-Effectiveness Analysis Example

Fernando Alarid‐Escudero, Eline Krijkamp|arXiv (Cornell University)|Aug 30, 2021
Advanced Causal Inference Techniques33 references24 citations
TL;DR

This tutorial presents a comprehensive guide to implementing time-dependent cohort state-transition models (cSTMs) in R for cost-effectiveness analysis, focusing on simulation-time dependence and state-residence time dependence. It demonstrates how to model time-varying transition probabilities, costs, and utilities using R code, and applies the framework to generate epidemiological and economic outcomes, including survival, prevalence, and cost-effectiveness ratios, with full reproducibility via a public GitHub repository.

ABSTRACT

In an introductory tutorial, we illustrated building cohort state-transition models (cSTMs) in R, where the state transitions probabilities were constant over time. However, in practice, many cSTMs require transitions, rewards, or both to vary over time (time-dependent). This tutorial illustrates adding two types of time-dependency using a previously published cost-effectiveness analysis of multiple strategies as an example. The first is simulation-time dependence, which allows for the transition probabilities to vary as a function of time as measured since the start of the simulation (e.g., varying probability of death as the cohort ages). The second is state-residence time dependence, allowing for history by tracking the time spent in any particular health state using tunnel states. We use these time-dependent cSTMs to conduct cost-effectiveness and probabilistic sensitivity analyses. We also obtain various epidemiological outcomes of interest from the outputs generated from the cSTM, such as survival probability and disease prevalence, often used for model calibration and validation. We present the mathematical notation first, followed by the R code to execute the calculations. The full R code is provided in a public code repository for broader implementation.

Motivation & Objective

  • To extend traditional time-independent cohort state-transition models (cSTMs) to incorporate time-dependent transition probabilities, costs, and utilities.
  • To demonstrate two forms of time dependence: simulation-time dependence (based on time since simulation start) and state-residence time dependence (based on time spent in a health state).
  • To provide a step-by-step implementation in R using a real-world cost-effectiveness analysis example, enhancing model realism and transparency.
  • To enable researchers to compute key epidemiological outcomes (e.g., survival, prevalence) and conduct cost-effectiveness and probabilistic sensitivity analyses.
  • To promote reproducibility and transparency in health economic modeling through publicly available R code and methodological clarity.

Proposed method

  • Model time dependence using a three-dimensional transition probability array (P) where the third dimension represents time since simulation start, enabling simulation-time dependence.
  • Implement state-residence time dependence by expanding the state space into 'tunnel states' (e.g., Sick - cycle 1, Sick - cycle 2) to track duration in a health state.
  • Use matrix multiplication to iteratively compute cohort distribution across states: mt+1 = mt × Pt, where mt is the state vector at cycle t.
  • Track transitions using a cohort state-transition array to calculate one-time transition rewards (e.g., costs at disease onset or end-of-life interventions).
  • Conduct cost-effectiveness analysis (CEA) and probabilistic sensitivity analysis (PSA) using the model outputs.
  • Use base R for full transparency and customizability, with reference to high-performance packages like hesim and heemod for scalable implementations.

Experimental results

Research questions

  • RQ1How can simulation-time dependence be implemented in cohort state-transition models to reflect time-varying parameters such as age-specific mortality?
  • RQ2What is the most effective way to model state-residence time dependence when transition risks depend on time since disease onset?
  • RQ3How can transition rewards—such as one-time costs at diagnosis or end-of-life—be incorporated without expanding the state space?
  • RQ4What are the implications of state-space expansion for computational efficiency and model scalability?
  • RQ5How can time-dependent cSTMs be used to generate reliable epidemiological outcomes like survival probability and disease prevalence for model calibration and validation?

Key findings

  • The tutorial successfully implements simulation-time dependence using a three-dimensional transition probability array in R, allowing time-varying transition probabilities based on simulation time.
  • State-residence time dependence is effectively modeled using tunnel states, enabling accurate tracking of time-dependent risks and costs based on duration in a health state.
  • Transition rewards are efficiently captured via a cohort state-transition array, avoiding the need for additional state expansions and improving model efficiency.
  • The model generates key epidemiological outcomes such as survival probability and disease prevalence, which are essential for model calibration and validation.
  • The full R implementation is publicly available on GitHub, ensuring reproducibility and enabling broader adoption in health economic evaluations.
  • The approach enhances transparency and flexibility in health decision science, particularly for complex, time-varying health interventions.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.