Skip to content

Commit

Permalink
Minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
feralaes committed Aug 30, 2021
1 parent 4642222 commit d33059a
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions manuscript/cSTM_Tutorial_TimeDep.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ This tutorial expands the cSTM framework described in the introductory time-inde

We distinguish between two types of time-dependency that require different approaches: (1) Simulation time-dependency, which represents the time since the start of the simulation, and (2) state residence time-dependency, representing time spent in a health state. Simulation time-dependency affects parameters that vary with time for the entire cohort in the same way. The most common example of simulation time-dependency is age-specific background mortality over time as the cohort ages. Since all members of the cohort age at the same rate, we can implement this dependency by changing the mortality parameters as the simulation progresses.[@Snowsill2019] Similarly, in a model simulating a cohort starting from disease diagnosis, any dependence on time since diagnosis can be implemented as a dependence on the time since simulation start. Seasonal or temporal variation in disease incidence can also be reflected through simulation-time dependency, where the risk of developing a disease can vary based on the current season or year in the simulation.

State-residence time-dependency captures time-dependence on events that members of the cohort could experience at different times. For example, in a model simulating a cohort of healthy individuals, they may experience disease onset at different times. Thus, parameters that depend on the time since disease onset cannot be implemented based on simulation time; instead, we need to track cohort members *from their disease onset time*. We implement this type of time-dependency by expanding the model state space to include disease states that encode the time since an event. For example, instead of a single "Sick" state, individuals would transition first to the "Sick - cycle 1" state at disease onset, then "Sick - cycle 2" at the next cycle, and so on. In this way, each replicate of the "Sick" state can have different transition probabilities (e.g., mortality, risk of complications, etc.), costs, or utilities. We should note that we can also use the state-space expansion approach to time-dependency to model simulation-time dependency. However, as we see below, substantial state-space expansion can be cumbersome and potentially computationally burdensome. For simplicity, modelers should always consider simulation time-dependency first.
State-residence time-dependency captures time dependence on events that members of the cohort could experience at different times. For example, in a model simulating a cohort of healthy individuals, they may experience disease onset at different times. Thus, parameters that depend on the time since disease onset cannot be implemented based on simulation time; instead, we need to track cohort members *from their disease onset time*. We implement this type of time-dependency by expanding the model state space to include disease states that encode the time since an event has occurred. For example, instead of a single "Sick" state, individuals would transition first to the "Sick - cycle 1" state at disease onset, then "Sick - cycle 2" at the next cycle, and so on. In this way, each replicate of the "Sick" state can have different transition probabilities (e.g., mortality, risk of complications, etc.), costs, or utilities. We should note that we can also use this state expansion approach to time-dependency to model simulation-time dependency. However, as we see below, substantial state expansion can be cumbersome and potentially computationally burdensome. For simplicity, modelers should always consider simulation time-dependency first.


Besides describing the two forms of time-dependency, we also illustrate the concept and implementation of transition rewards, such as one-time costs or utilities applied when individuals experience events when transitioning between certain states. These transition rewards reflect event-driven outcome impacts, such as a higher cost for the first cycle of disease onset due to increased diagnostic and management costs or the increased cost of transition to the dead state incurred from end-of-life interventions or management.[@Krijkamp2019]
Expand Down Expand Up @@ -570,7 +570,7 @@ v_r_S1S2_tunnels <- (v_cycles_tunnel*p_S1S2_scale)^p_S1S2_shape -
v_p_S1S2_tunnels <- 1 - exp(-v_r_S1S2_tunnels*cycle_length)
```

To adapt the 3-dimensional transition probability array to incorporate both age and state-residence dependence in the Sick-Sicker model under SoC, we first create an expanded 3-dimensional array accounting for tunnels, `a_P_tunnels_SoC`. The dimensions of this array are $n_{S_{\text{tunnels}}} \times n_{S_{\text{tunnels}}} \times n_T$. A visual representation of `a_P_tunnels_SoC` of the Sick-Sicker model with tunnel states expanding the Sick state is shown in Figure \@ref(fig:Array-Time-Dependent-Tunnels).
To adapt the 3-dimensional transition probability array to incorporate both age and state-residence dependency in the Sick-Sicker model under SoC, we first create an expanded 3-dimensional array accounting for tunnels, `a_P_tunnels_SoC`. The dimensions of this array are $n_{S_{\text{tunnels}}} \times n_{S_{\text{tunnels}}} \times n_T$. A visual representation of `a_P_tunnels_SoC` of the Sick-Sicker model with tunnel states expanding the Sick state is shown in Figure \@ref(fig:Array-Time-Dependent-Tunnels).

```{r Init-Sick-Sicker-TimeDep-P-tunnels}
# Initialize array
Expand Down Expand Up @@ -1229,7 +1229,7 @@ plot(elc_obj, log_y = FALSE, txtsize = 16, xlim = c(0, NA), n_x_ticks = 14,
# Discussion
In this tutorial, we conceptualize time-dependent cSTMs with their mathematical description and a walk-through of their implementation for a CEA in R using the Sick-Sicker example. We described two types of time-dependency: dependence on the time since the start of the simulation (simulation-time dependency) or on time spent in a health state (state-residence time dependency). We also illustrate how to generate various epidemiological measures from the model, incorporate transition rewards in CEAs, and conduct a PSA.

We implemented simulation-time dependence by expanding the transition probability matrix into a transition probability array, where the third dimension captures time. However, there are alternative implementations of simulation-time dependence in cSTMs. For example, the model could be coded such that the time-varying elements of the transition probability matrix $P_t$ are updated at each time point $t$ as the simulation is run. This would eliminate the need for the transition probability array `a_P`, reducing computer memory requirements. But this comes at the expense of increasing the number of operations at every cycle, potentially slowing down the simulation.
We implemented simulation-time dependency by expanding the transition probability matrix into a transition probability array, where the third dimension captures time. However, there are alternative implementations of simulation-time dependency in cSTMs. For example, the model could be coded such that the time-varying elements of the transition probability matrix $P_t$ are updated at each time point $t$ as the simulation is run. This would eliminate the need for the transition probability array `a_P`, reducing computer memory requirements. But this comes at the expense of increasing the number of operations at every cycle, potentially slowing down the simulation.

We incorporated state-residence time dependency using tunnel states by expanding the corresponding health states on the first and second dimensions of the 3-dimensional array to account for time spent in the current state in addition to simulation-time dependence. Another approach to account for state-residence time dependency is to use a 3-dimensional transition probability array with dimensions for the current state, future state, and time in the current state.[@Hawkins2005] However, in examples combining simulation-time and state-residence time dependencies, this would necessitate a 4-dimensional array, which may be challenging to index.

Expand Down
Binary file modified manuscript/cSTM_Tutorial_TimeDep.pdf
Binary file not shown.
8 changes: 4 additions & 4 deletions manuscript/cSTM_Tutorial_TimeDep.tex
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@

\title{A Tutorial on Time-Dependent Cohort State-Transition Models in R using a Cost-Effectiveness Analysis Example}
\author{Fernando Alarid-Escudero, PhD\footnote{Division of Public Administration, Center for Research and Teaching in Economics (CIDE), Aguascalientes, AGS, Mexico} \and Eline Krijkamp, MSc\footnote{Department of Epidemiology, Erasmus University Medical Center, Rotterdam, The Netherlands} \and Eva A. Enns, PhD\footnote{Division of Health Policy and Management, University of Minnesota School of Public Health, Minneapolis, MN, USA} \and Alan Yang, MSc\footnote{The Hospital for Sick Children, Toronto} \and Myriam G.M. Hunink, PhD\(^\dagger\)\footnote{Center for Health Decision Sciences, Harvard T.H. Chan School of Public Health, Boston, USA} \and Petros Pechlivanoglou, PhD\footnote{The Hospital for Sick Children, Toronto and University of Toronto, Toronto, Ontario, Canada} \and Hawre Jalal, MD, PhD\footnote{University of Pittsburgh, Pittsburgh, PA, USA}}
\date{2021-08-27}
\date{2021-08-30}

\begin{document}
\maketitle
Expand All @@ -175,7 +175,7 @@ \section{Introduction}\label{introduction}}

We distinguish between two types of time-dependency that require different approaches: (1) Simulation time-dependency, which represents the time since the start of the simulation, and (2) state residence time-dependency, representing time spent in a health state. Simulation time-dependency affects parameters that vary with time for the entire cohort in the same way. The most common example of simulation time-dependency is age-specific background mortality over time as the cohort ages. Since all members of the cohort age at the same rate, we can implement this dependency by changing the mortality parameters as the simulation progresses.\textsuperscript{\protect\hyperlink{ref-Snowsill2019}{8}} Similarly, in a model simulating a cohort starting from disease diagnosis, any dependence on time since diagnosis can be implemented as a dependence on the time since simulation start. Seasonal or temporal variation in disease incidence can also be reflected through simulation-time dependency, where the risk of developing a disease can vary based on the current season or year in the simulation.

State-residence time-dependency captures time-dependence on events that members of the cohort could experience at different times. For example, in a model simulating a cohort of healthy individuals, they may experience disease onset at different times. Thus, parameters that depend on the time since disease onset cannot be implemented based on simulation time; instead, we need to track cohort members \emph{from their disease onset time}. We implement this type of time-dependency by expanding the model state space to include disease states that encode the time since an event. For example, instead of a single ``Sick'' state, individuals would transition first to the ``Sick - cycle 1'' state at disease onset, then ``Sick - cycle 2'' at the next cycle, and so on. In this way, each replicate of the ``Sick'' state can have different transition probabilities (e.g., mortality, risk of complications, etc.), costs, or utilities. We should note that we can also use the state-space expansion approach to time-dependency to model simulation-time dependency. However, as we see below, substantial state-space expansion can be cumbersome and potentially computationally burdensome. For simplicity, modelers should always consider simulation time-dependency first.
State-residence time-dependency captures time dependence on events that members of the cohort could experience at different times. For example, in a model simulating a cohort of healthy individuals, they may experience disease onset at different times. Thus, parameters that depend on the time since disease onset cannot be implemented based on simulation time; instead, we need to track cohort members \emph{from their disease onset time}. We implement this type of time-dependency by expanding the model state space to include disease states that encode the time since an event has occurred. For example, instead of a single ``Sick'' state, individuals would transition first to the ``Sick - cycle 1'' state at disease onset, then ``Sick - cycle 2'' at the next cycle, and so on. In this way, each replicate of the ``Sick'' state can have different transition probabilities (e.g., mortality, risk of complications, etc.), costs, or utilities. We should note that we can also use this state expansion approach to time-dependency to model simulation-time dependency. However, as we see below, substantial state expansion can be cumbersome and potentially computationally burdensome. For simplicity, modelers should always consider simulation time-dependency first.

Besides describing the two forms of time-dependency, we also illustrate the concept and implementation of transition rewards, such as one-time costs or utilities applied when individuals experience events when transitioning between certain states. These transition rewards reflect event-driven outcome impacts, such as a higher cost for the first cycle of disease onset due to increased diagnostic and management costs or the increased cost of transition to the dead state incurred from end-of-life interventions or management.\textsuperscript{\protect\hyperlink{ref-Krijkamp2019}{9}}

Expand Down Expand Up @@ -655,7 +655,7 @@ \subsection{Incorporating time dependency on state residence}\label{incorporatin
\end{Highlighting}
\end{Shaded}

To adapt the 3-dimensional transition probability array to incorporate both age and state-residence dependence in the Sick-Sicker model under SoC, we first create an expanded 3-dimensional array accounting for tunnels, \texttt{a\_P\_tunnels\_SoC}. The dimensions of this array are \(n_{S_{\text{tunnels}}} \times n_{S_{\text{tunnels}}} \times n_T\). A visual representation of \texttt{a\_P\_tunnels\_SoC} of the Sick-Sicker model with tunnel states expanding the Sick state is shown in Figure \ref{fig:Array-Time-Dependent-Tunnels}.
To adapt the 3-dimensional transition probability array to incorporate both age and state-residence dependency in the Sick-Sicker model under SoC, we first create an expanded 3-dimensional array accounting for tunnels, \texttt{a\_P\_tunnels\_SoC}. The dimensions of this array are \(n_{S_{\text{tunnels}}} \times n_{S_{\text{tunnels}}} \times n_T\). A visual representation of \texttt{a\_P\_tunnels\_SoC} of the Sick-Sicker model with tunnel states expanding the Sick state is shown in Figure \ref{fig:Array-Time-Dependent-Tunnels}.

\begin{Shaded}
\begin{Highlighting}[]
Expand Down Expand Up @@ -1311,7 +1311,7 @@ \section{Discussion}\label{discussion}}

In this tutorial, we conceptualize time-dependent cSTMs with their mathematical description and a walk-through of their implementation for a CEA in R using the Sick-Sicker example. We described two types of time-dependency: dependence on the time since the start of the simulation (simulation-time dependency) or on time spent in a health state (state-residence time dependency). We also illustrate how to generate various epidemiological measures from the model, incorporate transition rewards in CEAs, and conduct a PSA.

We implemented simulation-time dependence by expanding the transition probability matrix into a transition probability array, where the third dimension captures time. However, there are alternative implementations of simulation-time dependence in cSTMs. For example, the model could be coded such that the time-varying elements of the transition probability matrix \(P_t\) are updated at each time point \(t\) as the simulation is run. This would eliminate the need for the transition probability array \texttt{a\_P}, reducing computer memory requirements. But this comes at the expense of increasing the number of operations at every cycle, potentially slowing down the simulation.
We implemented simulation-time dependency by expanding the transition probability matrix into a transition probability array, where the third dimension captures time. However, there are alternative implementations of simulation-time dependency in cSTMs. For example, the model could be coded such that the time-varying elements of the transition probability matrix \(P_t\) are updated at each time point \(t\) as the simulation is run. This would eliminate the need for the transition probability array \texttt{a\_P}, reducing computer memory requirements. But this comes at the expense of increasing the number of operations at every cycle, potentially slowing down the simulation.

We incorporated state-residence time dependency using tunnel states by expanding the corresponding health states on the first and second dimensions of the 3-dimensional array to account for time spent in the current state in addition to simulation-time dependence. Another approach to account for state-residence time dependency is to use a 3-dimensional transition probability array with dimensions for the current state, future state, and time in the current state.\textsuperscript{\protect\hyperlink{ref-Hawkins2005}{27}} However, in examples combining simulation-time and state-residence time dependencies, this would necessitate a 4-dimensional array, which may be challenging to index.

Expand Down
Binary file modified manuscript/figs/CE-scatter-TimeDep-1.pdf
Binary file not shown.
Binary file modified manuscript/figs/CEAC-AgeDep-1.pdf
Binary file not shown.
Binary file modified manuscript/figs/ELC-AgeDep-1.pdf
Binary file not shown.
Binary file modified manuscript/figs/Sick-Sicker-CEA-AgeDep-1.pdf
Binary file not shown.
Binary file modified manuscript/figs/Sick-Sicker-Prev-AgeDep-1.pdf
Binary file not shown.
Binary file modified manuscript/figs/Sick-Sicker-Surv-AgeDep-1.pdf
Binary file not shown.
Binary file modified manuscript/figs/Sick-Sicker-Trace-AgeDep-1.pdf
Binary file not shown.
Binary file modified manuscript/figs/Sick-Sicker-Trace-HistDep-1.pdf
Binary file not shown.

0 comments on commit d33059a

Please sign in to comment.