# Generalizations of the ‘Linear Chain Trick’: incorporating more flexible dwell time distributions into mean field ODE models

- 91 Downloads

## Abstract

In this paper we generalize the Linear Chain Trick (LCT; aka the Gamma Chain Trick) to help provide modelers more flexibility to incorporate appropriate dwell time assumptions into mean field ODEs, and help clarify connections between individual-level stochastic model assumptions and the structure of corresponding mean field ODEs. The LCT is a technique used to construct mean field ODE models from continuous-time stochastic state transition models where the time an individual spends in a given state (i.e., the dwell time) is Erlang distributed (i.e., gamma distributed with integer shape parameter). Despite the LCT’s widespread use, we lack general theory to facilitate the easy application of this technique, especially for complex models. Modelers must therefore choose between constructing ODE models using heuristics with oversimplified dwell time assumptions, using time consuming derivations from first principles, or to instead use non-ODE models (like integro-differential or delay differential equations) which can be cumbersome to derive and analyze. Here, we provide analytical results that enable modelers to more efficiently construct ODE models using the LCT or related extensions. Specifically, we provide (1) novel LCT extensions for various scenarios found in applications, including conditional dwell time distributions; (2) formulations of these LCT extensions that bypass the need to derive ODEs from integral equations; and (3) a novel Generalized Linear Chain Trick (GLCT) framework that extends the LCT to a much broader set of possible dwell time distribution assumptions, including the flexible *phase-type* distributions which can approximate distributions on \({\mathbb {R}}^+\) and can be fit to data.

## Keywords

Gamma chain trick Linear Chain Trick Distributed delay Mean field model Phase-type distributions Time lag## Mathematics Subject Classification

37N25 92B05 92D25 92D30 92D40 45D05 60J28## 1 Introduction

Despite their widespread use, one shortcoming of ODE models is their inflexibility when it comes to specifying probability distributions that describe the duration of time individuals spend in a given state. The basic options available for assuming specific dwell time distributions within an ODE framework can really be considered as a single option: the 1st event time distribution for a (nonhomogeneous) Poisson process, which includes the exponential distribution as a special case.

*S*(

*t*),

*I*(

*t*), and

*R*(

*t*) correspond to the number of susceptible, infected, and recovered individuals in a closed population at time

*t*and \(\lambda (t)\equiv \beta \,I(t)\) is the per-capita infection rate (also called the

*force of infection*by Anderson and May (1992) and others). This model can be thought of as the mean field model for some underlying stochastic state transition model where a large but finite number of individuals transition from state S to I to R [see the Appendix, Kermack and McKendrick (1927) for a derivation, and see Armbruster and Beck (2017), Banks et al. (2013), and references therein for examples of the convergence of stochastic models to mean field ODEs].

Although multiple stochastic models can yield the same mean field deterministic model, it is common to consider a stochastic model based on Poisson processes. For the SIR model above, for example, this stochastic analog would assume that, over the time interval \([t,t+{\varDelta } t]\) (for very small \({\varDelta } t\)), an individual in state S or I at time *t* is assumed to transition from S to I with probability \(\lambda (t)\,{\varDelta } t\), or from I to R with probability \(\gamma \,{\varDelta } t\), respectively. Taking \({\varDelta } t \rightarrow 0\) yields the desired continuous time stochastic model. Here, the linear rate of transitions from I to R (\(\gamma \,I(t)\)) arises from assuming the dwell time for an individual in the infected state (I) follows an exponential distribution with rate \(\gamma \) (i.e., the 1st event time distribution for a homogeneous Poisson process with rate \(\gamma \)). Similarly, assuming the time spent in state S follows the 1st event time distribution under a nonhomogeneous (also called inhomogeneous) Poisson process with rate \(\lambda (t)\) yields a time-varying per capita transition rate \(\lambda (t)\). This association of a mean field ODE with a specific underlying stochastic model provides very valuable intuition in an applied context. For example, it allows modelers to ascribe application-specific (e.g., biological) interpretations to parameters and thus estimate parameter values (e.g., for \(\gamma \) above, the mean time spent infectious is \(1/\gamma \)), and it provides intuition and a clear mathematical foundation from which to construct and evaluate mean field ODE models based on individual-level, stochastic assumptions.

To construct similar models using other dwell time distributions, a standard approach is to formulate a continuous time stochastic model and from it derive mean field *distributed delay equations*, typically represented as integro-differential equations (IDEs) or integral equations (IEs) (e.g., see Kermack and McKendrick 1927; Hethcote and Tudor 1980; Feng et al. 2007, 2016, or see the example derivation in the Appendix). Readers unfamiliar with IEs and IDEs are referred to Burton (2005) or similar texts. IEs and IDEs have proven to be quite useful models in biology, e.g., they have been used to model chemical kinetics (Roussel 1996), gene expression (Smolen et al. 2000; Takashima et al. 2011; Guan and Ling 2018), physiological processes such as glucose-insulin regulation (Makroglou et al. 2006, and references therein), cell proliferation and differentiation (Özbay et al. 2008; Clapp and Levy 2015; Yates et al. 2017), cancer biology and treatment (Piotrowska and Bodnar 2018; Krzyzanski et al. 2018; Câmara De Souza et al. 2018), pathogen and immune response dynamics (Fenton et al. 2006), infectious disease transmission (Anderson and Watson 1980; Lloyd 2001a, b; Feng and Thieme 2000; Wearing et al. 2005; Lloyd 2009; Feng et al. 2007; Ciaravino et al. 2018), and population dynamics (MacDonald 1978a; Blythe et al. 1984; Metz and Diekmann 1986; Boese 1989; Nisbet et al. 1989; Cushing 1994; Wolkowicz et al. 1997; Gyllenberg 2007; Wang and Han 2016; Lin et al. 2018; Robertson et al. 2018). See also Campbell and Jessop (2009) and the applications reviewed therein.

There have been some efforts in the past to identify which categories of integral and integro-differential equations can be reduced to systems of ODEs (e.g., MacDonald 1989; Metz and Diekmann 1991; Ponosov et al. 2002; Jacquez and Simon 2002; Burton 2005; Goltser and Domoshnitsky 2013; Diekmann et al. 2017, and references therein), but in practice the most well known case is the reduction of IEs and IDEs that assume Erlang^{1} distributed dwell times. This is done using what has become known as the Linear Chain Trick (LCT, also referred to as the Gamma Chain Trick; MacDonald 1978b; Smith 2010) which dates at least back to Fargue (1973) and earlier work by Theodore Vogel (e.g., Vogel 1961, 1965, according to Câmara De Souza et al. 2018). However, for more complex models that exceed the level of complexity that can be handled by existing “rules of thumb” like the LCT, the current approach is to derive mean field ODEs from mean field integral equations that might themselves first need to be derived from system-specific stochastic state transition models (e.g., Kermack and McKendrick 1927; Feng et al. 2007; Banks et al. 2013; Feng et al. 2016, and see the Appendix for an example.). Unfortunately, modelers often avoid these extra (often laborious) steps in practice by assuming (sometimes only implicitly) very simplistic dwell time distributions based on Poisson process 1st event times as in the SIR example above.

In light of the widespread use of ODE models, these challenges and trade-offs underscore a need for a more rigorous theoretical foundation to more effectively and more efficiently construct mean field ODE models that include more flexible dwell time distribution assumptions (Wearing et al. 2005; Feng et al. 2016; Robertson et al. 2018). The goal of this paper is to address these needs by (1) providing a theoretical foundation for constructing the desired system of ODEs directly from “first principles” (i.e., stochastic model assumptions), without the need to derive ODEs from intermediate IDEs or explicit stochastic models, and by (2) providing similar analytical results for novel extensions of the LCT which allow more flexible dwell time distributions, and conditional relationships among dwell time distributions, to be incorporated into ODE models. We also aim to clarify how underlying (often implicit) stochastic model assumptions are reflected in the structure of corresponding mean field ODE model equations.

The remainder of this paper is organized as follows. An intuitive description of the Linear Chain Trick (LCT) is given in Sect. 1.1 as a foundation for the extensions that follow. In Sect. 2 we review key notation and properties of Poisson processes and certain probability distributions needed for the results that follow. In Sect. 3.1.1 we highlight the association between Poisson process intensity functions and per capita rates in mean field ODEs, and in Sect. 3.1.2 we introduce what we call the *weak memorylessness* property of (nonhomogeneous) Poisson process 1st event time distributions. In Sects. 3.2 and 3.3 we give a formal statement of the LCT and in Sect. 3.4 a generalization that allows time-varying rates in the underlying Poisson processes. We then provide similar LCT generalizations for more complex cases: In Sect. 3.5 we provide results for multiple ways to implement transitions from one state to multiple states (which arise from different stochastic model assumptions and lead to different systems of mean field ODEs), and we address dwell times that obey Erlang mixture distributions. In Sect. 3.6 we detail how to construct mean field ODEs in which a sub-state transition (e.g., from infected to quarantined) does or does not alter the overall dwell time distribution in that state (e.g., the duration of infection). Lastly, in Sect. 3.7 we present a Generalized Linear Chain Trick (GLCT) which describes how to construct mean field ODEs from first principles based on assuming a very flexible family of dwell time distributions that include the *phase-type* distributions, i.e., hitting time distributions for continuous time Markov chains (Reinecke et al. 2012a; Horváth et al. 2016) which we address more specifically in Sect. 3.7.1. Tools for fitting phase-type distributions to data, or using them to approximate other distributions, are also mentioned in Sect. 3.7.1.

### 1.1 Intuitive description of the Linear Chain Trick

To begin, an intuitive understanding of the Linear Chain Trick (LCT) based on properties of Poisson processes, is helpful for drawing connections between underlying stochastic model assumptions and the structure of corresponding mean field ODEs. Here we consider a very basic case (detailed in Sect. 3.2): the mean field ODE model for a stochastic process in which particles in state X remain there for an Erlang(*r*, *k*) distributed amount of time before exiting to some other state.

In short, the LCT exploits a natural stage structure within state X imposed by assuming an Erlang(*r*, *k*) distributed dwell time [i.e., a gamma(*r*, *k*) distribution with integer shape *k*]. Recall that the time to the *k*th event under a homogeneous Poisson process with rate \(r>0\) is Erlang(*r*, *k*) distributed. In that context, each event is preceded by a length of time that is exponentially distributed with rate *r*, and thus the time to the *k*th event is the sum of *k* independent and identically distributed exponential random variables [i.e., the sum of *k**iid* exponential random variables with rate *r* is Erlang(*r*, *k*) distributed]. Particles in state X at a given time can therefore be classified by which event they are awaiting next, i.e., a particle is in state X\(_i\) if it is waiting for the *i*th event to occur, and X\(_1\), \(\ldots \), X\(_k\) is a partition of X. The dwell time distribution for each sub-state X\(_i\) is exponential with rate *r*, and particles leave the last state X\(_k\) (and thus X) upon the occurrence of the *k*th event.

*t*, these mean field ODEs are

*t*is \(x(t)=\sum _{i=1}^k x_i(t)\), \(x_1(0)=x_0\) and \(x_i(0)=0\) for \(i=2,\ldots ,k\).

As we show below, this Poisson process based perspective allows us to generalize the LCT to other more complex scenarios where we partition a focal state X in a similar fashion. Those results are further extended from exponential dwell times to 1st event time distributions under a nonhomogeneous Poisson processes with time varying rate *r*(*t*), allowing for time-varying (or state-dependent) dwell time distributions to be used in extensions of LCT.

## 2 Model framework

The context in which we consider applications of the Linear Chain Trick (LCT) is the derivation of continuous time mean field model equations for stochastic state transition models with a distributed dwell time in a focal state, X. Such mean field models might otherwise be modeled as integral equations (IEs) or integro-differential equations (IDEs), and we seek to identify generalizations of the LCT that allow us to replace mean field integral equations with equivalent systems of 1st order ODEs.

### 2.1 Distributions and notation

Below we will extend the LCT from Erlang(*r*, *k*) distributions (i.e., *k*th event time distributions under homogeneous Poisson processes with rate *r*) to event time distributions under nonhomogeneous Poisson processes with time varying rate *r*(*t*), and related distributions like the minimum of multiple Erlang random variables. In this section we will first review some basic properties of these distributions.

Gamma distributions can be parameterized^{2} by two strictly positive quantities: *rate**r* and *shape**k* (sometimes denoted \(\alpha \) and \(\beta \), respectively). The Erlang family of distributions are the subset of gamma distributions with integer-valued shape parameters \(k\in \mathbb {Z_+}\), or equivalently, the distributions resulting from the sum of *k**iid* exponential distributions. That is, if a random variable \(T=\sum _{i=1}^k T_i\), where all \(T_i\) are independent exponential distributions with rate *r*, then *T* is Erlang(*r*, *k*) distributed. Since the inter-event times under a homogeneous Poisson process are exponentially distributed, the time to the *k*th event is thus Erlang(*r*, *k*). This construction is foundational to a proper intuitive understanding of the LCT and its extensions.

*T*is gamma(

*r*,

*k*) distributed, then its mean \(\mu \), variance \(\sigma ^2\), and coefficient of variation \(c_v\) are given by

*r*and shape

*k*using Eq. (5):

*k*is an integer) one must adjust the assumed variance up or down by rounding the value of

*k*in Eq. (6) down or up, respectively, to the nearest integer (see Appendix B for details, and alternatives).

*g*), CDF (

*G*), and survival

^{3}function (\(S=1-G\); also called the

*complementary CDF*) are given by

The results in Sect. 3 use (and generalize) the property of Erlang distributions detailed in Lemma 1 (eqs. 7.11 in Smith 2010, restated here without proof), which is the linchpin of the LCT.

### Lemma 1

*r*and shape

*j*, satisfy

Since homogeneous Poisson processes are a special case of nonhomogeneous Poisson processes^{4} from here on we will use “Poisson process” or “Poisson process with rate *r*(*t*)” to refer to cases that apply to both homogeneous [i.e., \(r(t)=r\) constant] and nonhomogeneous Poisson processes.

*k*th event time distribution under a Poisson process with rate

*r*(

*t*), starting from some time \(\tau < t\) has a density function (\(h_{r}^k\)), survival function (\({\mathcal {S}}_{r}^k\)), and CDF (\(H_{r}^k\equiv 1-{\mathcal {S}}_{r}^k\)) given by

For an arbitrary survival function starting at time \(\tau \) (i.e., over the period \([\tau ,t]\) where \(t\ge \tau \)) we use the notation \(S(t,\tau )\). In some instances, we also use the notation \(S(t)\equiv S(t,0)\).

Lastly, in the context of state transitions models, it is common to assume that, upon leaving a given state (e.g., state X) at time *t*, individuals are distributed across multiple recipient states according to a generalized Bernoulli distribution (also known as the *categorical distribution* or the multinomial distribution with 1 trials) defined on the integers 1 through *k* where the probability of a particle entering the *j*th of *k* recipient states (\(j\in {1,\ldots ,k}\)) is \(p_j(t)\), which define probability vector \({\mathbf {p}}(t) = [p_1(t),\ldots ,p_k(t)]^\text {T}\) and \(\sum _{j=1}^k p_j(t)=1\).

## 3 Results

The results below focus on one or more states, within a potentially larger state transition model, for which we would like to assume a particular dwell time distribution and derive a corresponding system of mean field ODEs using the LCT or a generalization of the LCT. In particular, the results below describe how to construct those mean field ODEs directly from stochastic model assumptions without needing to derive them from equivalent mean field integral equations (which themselves might need to be derived from an explicit continuous-time stochastic model).

### 3.1 Preliminaries

Before presenting extensions of the LCT, we first illustrate in Sect. 3.1.1 how mean field ODEs include terms that reflect underlying Poisson process rates. In Sect. 3.1.2, we highlight a key property of these Poisson process 1st event time distributions that we refer to as a *weak memorylessness property* since it is a generalization of the well known memorylessness property of the exponential and geometric distributions.

#### 3.1.1 Transition rates in ODEs reflect underlying Poisson process rates

To build upon the intuition spelled out in Sect. 1.1, where particles exit X following an exponentially distributed dwell time, we now assume that particles exit X following the 1st event time under nonhomogeneous Poisson processes with rate *r*(*t*) (recall the 1st event time distribution is exponential if \(r(t)=r\) is constant). As illustrated by the corresponding mean field equations given below, the rate function *r*(*t*) can be viewed as either the intensity function^{5} for the Poisson process governing when individuals leave state X, or as the (mean field) per-capita rate of loss from state X as shown in Eq. (11). This dual perspective provides valuable intuition for critically evaluating mean field ODEs.

### Example 1

*(Equivalence between Poisson process rates and per capita rates in mean field ODEs)*Consider the scenario described above. The survival function for the dwell time distribution for a particle entering X at time \(\tau \) is \(S(t,\tau )=\exp (-\int _{\tau }^{t} r(u)\,du)\), and it follows that the expected proportion of such particles remaining in X at time \(t>\tau \) is given by \(S(t,\tau )\). Let

*x*(

*t*) be the total amount in state X at time

*t*, \(x(0)=x_0\), and assume that \({\mathcal {I}}(t)\) and

*r*(

*t*) are integrable, non-negative functions of

*t*. Then the corresponding mean field integral equation for this scenario is

### Proof

#### 3.1.2 Weak memoryless property of Poisson process 1st event time distributions

The intuition behind the LCT, and the history-independent nature of ODEs, are related to the memorylessness property of exponential distributions. For example, when particles accumulate in a state with an exponentially distributed dwell time distribution, then at any given time all particles currently in that state have *iid* exponentially distributed amounts of time left before they leave that state regardless of the duration of time already spent in that state. Each of these can be viewed as a reflection of the history-independent nature of Poisson processes.

Accordingly, the familiar memorylessness property of exponential and geometric distributions can, in a sense, be generalized to (nonhomogeneous) Poisson process 1st event time distributions. Recall that if an exponentially distributed (rate *r*) random variable *T* represents the time until some event, then if the event has not occurred by time *s* the remaining duration of time until the event occurs is also exponential with rate *r*. The analogous *weak memorylessness* property of nonhomogeneous Poisson process 1st event time distributions is detailed in the following definition.

### Definition 1

**(Weak memorylessness property of Poisson process 1st event times)** Assume *T* is a Poisson process 1st event time starting at time \(\tau \), which has rate *r*(*t*) and CDF \(H_r^1(t,\tau )=1-\exp (-m(t,\tau ))\) [see Eqs. (9) and (9c)]. If the event has not occurred by time \(s>\tau \) the distribution of the remaining time \(T_s \equiv T-s\;|\;T>s\) follows a shifted but otherwise identical Poisson process 1st event time distribution with CDF \(P(T_s \le t)=H_r^1(t+s,s)\). If \(r(t)=r\) is a positive constant we recover the memorylessness property of the exponential distribution.

### Proof

In other words, Poisson process 1st event time distributions are memoryless up to a time shift in their rate functions. In the context of multiple particles entering a given state X at different times and leaving according to independent Poisson process 1st event times with identical rates *r*(*t*) (i.e., *t* is absolute time, not time since entry into X), then for all particles in state X at a given time the distribution of time remaining in state X is (1) independent of how much time each particle has already spent in X and (2) follows *iid* Poisson process 1st event time distributions with rate *r*(*t*).

### 3.2 Simple case of the LCT

To illustrate how the LCT follows from Lemma 1, consider the simple case of the LCT illustrated in Fig. 1, where a higher dimensional model includes a state transition into, then out of, a focal state X. Assume the time spent in that state (\(T_X\)) is Erlang(*r*, *k*) distributed [i.e., \(T_X \sim \) Erlang(*r*, *k*)]. Then the LCT provides a system of ODEs equivalent to the mean field integral equations for this process as detailed in the following theorem:

### Theorem 1

(Simple LCT) Consider a continuous time state transition model with inflow rate \({\mathcal {I}}(t)\ge 0\) (an integrable function of *t*) into state X which has an Erlang(*r*, *k*) distributed dwell time [with survival function \(S_r^k\) from Eq. (7c)]. Let *x*(*t*) be the (mean field) amount in state X at time *t* and assume \(x(0)=x_0\).

*k*sub-states X\(_i\), \(i=1,\ldots ,k\), where particles in X\(_i\) are those awaiting the

*i*th event as the next event under a homogeneous Poisson process with rate

*r*. Let \(x_i(t)\) be the amount in X\(_i\) at time

*t*, and \(x(t) = \sum _{j=1}^{k} x_j(t)\). Equation (14) is equivalent to the mean field ODEs

### Proof

*r*. To see why, let \(\chi _i\)(t) (where \(1\le i \le k\)) be the (mean field) number of particles in state X at time

*t*that have not reached the

*i*th event. Then

*j*th event. Thus, by properties of Poisson processes the dwell time in state X\(_j\) must exponential with rate

*r*.

### 3.3 Standard LCT

*S*, and include transitions into Y from other sources.

### Theorem 2

(Standard LCT) Consider a continuous time dynamical system model of mass transitioning among various states, with inflow rate \({\mathcal {I}}_X(t)\) to a state X and an Erlang(*r*, *k*) distributed delay before entering state Y. Let *x*(*t*) and *y*(*t*) be the amount in each state, respectively, at time *t*. Further assume an inflow rate \({\mathcal {I}}_Y(t)\) into state Y from other non-X states, and that the underlying stochastic model assumes that the duration of time spent in state Y is determined by survival function \(S_Y(t,\tau )\). Assume \({\mathcal {I}}_i(t)\) are integrable non-negative functions of *t*, and assume non-negative initial conditions \(x(0)=x_0\) and \(y(0)=y_0\).

### Proof

Eqs. (23a), (23b) and (24) follow from Theorem 1. Equation (23c) follows from substituting (24) into (22b). The definition of \(x_j\) and initial condition \(x(0)=x_0\) together imply \(x_1(0)=x_0\) and \(x_j(0)=0\) for the remaining \(j\ge 2\). \(\square \)

### Corollary 1

- 1.If particles leave Y after a Poisson process 1st event time distributed dwell time [i.e., the per-capita loss rate from Y is \(\mu (t)\)], then \(S_Y(t,\tau )=\exp (-\int _{\tau }^{t}\mu (u)\,du)\), and letting \({\mathcal {I}}(t)={\mathcal {I}}_Y(t)+rx_k(t)\), Theorem 2 yields$$\begin{aligned} \frac{d}{dt}{y}(t) =\; {\mathcal {I}}_Y(t) + r x_{k}(t) - \mu (t) y(t).\end{aligned}$$(25)
- 2.If particles leave Y after an Erlang(\(\mu ,\kappa \)) delay, then \(S_Y(t,\tau )=S_\mu ^\kappa (t-\tau )\) and letting \({\mathcal {I}}(t)={\mathcal {I}}_Y(t)+rx_k(t)\) Theorem 2 gives that \(y=\sum _{i=1}^\kappa y_i\) and$$\begin{aligned} \frac{d}{dt}{y_1}(t)&=\; {\mathcal {I}}_Y(t) + r x_{k}(t) -\mu \, y_1(t) \end{aligned}$$(26a)$$\begin{aligned} \frac{d}{dt}{y_i}(t)&=\; \mu \, y_{i-1}(t) - \mu \, y_i(t), \quad i=2,\ldots ,\kappa . \end{aligned}$$(26b)
- 3.As implied by 1 and 2 above, if the per-capita loss rate \(\mu (t)=\mu \) is constant or time spent in Y is otherwise exponentially distributed, then$$\begin{aligned} \frac{d}{dt}{y}(t) =\; {\mathcal {I}}_Y(t) + r x_{k}(t) - \mu \, y(t).\end{aligned}$$(27)
- 4.
Any of the more general cases considered in the sections below.

### Example 2

To illustrate how the Standard LCT can be used to substitute an implicit exponential dwell time distribution with an Erlang distribution, consider the SIR example discussed in the Introduction [Eqs. (2) and (3), see also Anderson and Watson 1980; Lloyd 2001a, b], but assume the dwell time distribution for the infected state I is Erlang (still with mean \(1/\gamma \)) with variance^{6}\(\sigma ^2\), i.e., by Eq. (6), Erlang with a rate \(r=\gamma k\) and shape \(k=\sigma ^2/\gamma ^2\).

Notice that if \(\sigma ^2=\gamma ^2\) (i.e., \(k=1\)), the dwell time in I is exponentially distributed with rate \(\gamma \), \(I(t)=I_1(t)\), and Eq. (28) reduce to Eq. (2).

This example nicely illustrates how using Theorem 2 to relax an exponential dwell time assumption implicit in a system of mean field ODEs is much more straightforward than constructing them after first deriving the integral equations, like Eq. (3), and then differentiating them using Lemma 1. In the sections below, we present similar theorems intended to be used for constructing mean field ODEs directly from stochastic model assumptions.

### 3.4 Extended LCT for Poisson process *k*th event time distributed dwell times

The Standard LCT assumes an Erlang(*r*, *k*) distributed dwell time, i.e., a *k*th event time distribution under a homogeneous Poisson process with rate *r*. Here we generalize the Standard LCT by assuming the X dwell time follows a more general *k*th event time distribution under a Poisson process with rate *r*(*t*).

### Lemma 2

*j*th event time distribution density functions \(h_{r}^j\) given by Eq. (9a). Specifically,

*t*\(r(t)=0\), this relationship can be written in terms of

### Proof

Lemma 2 allows us to generalize Erlang-based results like Theorem 2 to their time-varying counterparts with a time-dependent (or state-dependent) rate *r*(*t*), as in the following generalization of the Standard LCT (Theorem 2).

### Theorem 3

**event times)**Consider the Standard LCT in Theorem 2 but assume the X dwell time is a Poisson process

*k*th event time, rate

*r*(

*t*). The corresponding mean field integral equations, where \(h_r^j\) and \({\mathcal {S}}_r^j\) are given in Eq. (9), are

### Proof

*t*, Eq. (35) still hold, since Eqs. (36) and (37) can be rewritten using

*u*as in the proof of Lemma 2. \(\square \)

Having generalized the Standard LCT (Lemma 1 and Theorem 2) to include Poisson process *k*th event time distributed dwell times, we may now address more complex stochastic model assumptions and how they are reflected in the structure of corresponding mean field ODEs.

### 3.5 Transitions to multiple states

Modeling the transition from one state to multiple states following a distributed delay (as illustrated in Fig. 3) can be done under different sets of assumptions about the underlying stochastic processes, particularly with respect to the rules governing how individuals are distributed across multiple recipient states upon exiting X, and how those rules depend on the dwell time distribution(s) for individuals in that state. Importantly, those different sets of assumptions can yield very different mean field models (e.g., see Feng et al. 2016) and so care must be taken to make those assumptions appropriately for a given application.

While modelers have some flexibility to choose appropriate assumptions, in practice modelers sometimes make unintended and undesirable implicit assumptions, especially when constructing ODE models using “rules of thumb” instead of deriving them from first principles. In this section we present results aimed at helping guide (a) the process of picking appropriate dwell time distribution assumptions, and (b) directly constructing corresponding systems of ODEs without deriving them from explicit stochastic models or intermediate integral equations.

Each of the three cases detailed below yield different mean field ODE models for the scenario depicted in Fig. 3.

First, in Sect. 3.5.1, we consider the extension of Theorem 3 where upon leaving X particles are distributed across \(m\ge 1\) recipient states according to a generalized Bernoulli distribution with (potentially time varying) probabilities/proportions \(p_{j}(t)\), \(j=1,\ldots ,m\). Here the outcome of which state a particle transitions to is independent of the time spent in the first state.

Second, in Sects. 3.5.2 and 3.5.3, particles entering the first state (X) do not all follow the same dwell time distribution in X. Instead, upon entering X they are distributed across \(n\ge 2\) sub-states of X, X\(_i\), according to a generalized Bernoulli distribution, and each sub-state X\(_i\) has a dwell time given by a Poisson process \(k_i\)th event time distribution with rate \(r_i(t)\). That is, the X dwell time is a finite mixture of Poisson process event time distributions. Particles transition out of X into *m* subsequent states Y\(_j\) according to the probabilities/proportions \(p_{ij}(t)\), the probability of going to Y\(_j\) from X\(_i\), \(i=1,\ldots ,n\) and \(j=1,\ldots ,m\). Here the determination of which recipient state Y\(_\ell \) a particle transitions to depends on which sub-state of X the particle was assigned to upon entering X (see Fig. 5).

Third, in Sect. 3.5.4, the outcome of which recipient state a particle transitions to upon leaving X is determined by a “race” between multiple competing Poisson process *k*th event time distributions, and is therefore not independent of the time spent in the first state (as in Sect. 3.5.1), nor is it pre-determined upon entry into X (as in Sects. 3.5.2 and 3.5.3). This result is obtained using yet another novel extension of Lemma 1 in which the dwell time in state X is the minimum of \(n\ge 2\) independent Poisson process event time distributions.

Lastly (Sect. 3.5.5), we describe an equivalence between (1) the more complex case addressed in Sect. 3.5.4 assuming a dwell time that obeys the minimum of Poisson process 1st event times, before being distributed across *m* recipient states, and (2) the conceptually simpler case in Sect. 3.5.1 where the dwell time follows a single Poisson process 1st event time distribution before being distributed among *m* recipient states. This is key to understanding the scope of the Generalized Linear Chain Trick in Sect. 3.7.

#### 3.5.1 Transition to multiple states independent of the X dwell time distribution

Here we extend the case in the previous section and assume that, upon leaving state X, particles can transition to one of *m* states (call them \(Y_i\), \(i=1,\ldots ,m\)), and that a particle leaving X at time *t* enters state \(Y_i\) with probability \(p_i(t)\), where \(\sum _{i=1}^m p_i(t)=1\) [i.e., particles are distributed across all Y\(_i\) following a generalized Bernoulli distribution with parameter vector \({\mathbf {p}}(t)=(p_1(t),\ldots ,p_m(t))\)]. See Fig. 4 for a simple example with constant \({\mathbf {p}}\) and \(m=2\). An important assumption in this case is that the determination about which state a particle goes to after leaving X is made once it leaves X, and thus the state it transitions to upon exiting X is determined independent of the dwell time in X. Examples from the literature include Model II in Feng et al. (2016), where infected individuals (state X) either recovered (Y\(_0\)) or died (Y\(_1\)) after an Erlang distributed time delay.

### Theorem 4

*m*states (call them Y\(_j\)) with \(p_j(t)\) being the probability of going to Y\(_j\). Let \(S_j\) be the survival functions for the dwell times in Y\(_j\).

### Proof

Equations (39a), (39b) and (40) follow from Theorem 3. Equation (39c) follows from substitution of Eq. (40) into (38b). The derivation of Eq. (38b) is similar to the derivation in Appendix A.1 but accounts for the expected proportion entering each Y\(_j\) at time *t* being equal to \(p_j(t)\). \(\square \)

### Example 3

*r*,

*k*) and the dwell times in Y and Z follow 1st event times under nonhomogeneous Poisson processes with respective rates \(\mu _Y(t)\) and \(\mu _Z(t)\). By Theorem 4 the corresponding mean field ODEs are

#### 3.5.2 Transition from sub-states of X with differing dwell time distributions and differing output distributions across states Y\(_j\)

In this second case, particles in state X can be treated as belonging to a heterogeneous population, where each remains in that state according to one of *N* possible dwell time distributions, the *i*th of these being the \(k_i\)th event time distribution under a Poisson process with rate \(r_i(t)\). Each particle is assigned one of these *N* dwell time distributions (i.e., it is assigned to sub-state X\(_i\)) upon entry into X according to a generalized Bernoulli distribution with a (potentially time varying) probability vector \(\varvec{\rho }(t)=(\rho _1(t),\ldots ,\rho _N(t))\), \(\sum _{i=1}^N \rho _i(t) =1\). In contrast to the previous case, here the outcome of which recipient state a particle transitions to is not necessarily independent of the dwell time distribution.

*N*independent Poisson processes event time distributions. If a random variable

*T*is a mixture of Erlang distributions, or more generally a mixture of

*N*independent Poisson process event time distributions, then the corresponding density function (

*f*) and survival function (\({\varPhi }\)) are

*N*distributions that constitute the mixture distribution. Note that if all \(r_i(t)=r_i\) are constant, this is a mixture of Erlang distributions, or if also all \(k_i=1\), a mixture of exponentials.

### Theorem 5

(Extended LCT for dwell times given by mixtures of Poisson process event time distributions and outputs to multiple states) Consider a continuous time state transition model with inflow rate \({\mathcal {I}}_X(t)\) into state X. Assume that the duration of time spent in state X follows a finite mixture of *N* independent Poisson process event time distributions. That is, X can be partitioned into *N* sub-states X\(_i\), \(i=1,\ldots ,N\), each with dwell time distributions given by a Poisson process \(k_i\)th event time distributions with rates \(r_i(t)\). Suppose the inflow to state X at time *t* is distributed among this partition according to a generalized Bernoulli distribution with probabilities \(\rho _i(t)\), where \(\sum _{i=1}^{N} \rho _i(t) = 1\), so that the input rate to X\(_i\) is \(\rho _i(t){\mathcal {I}}_X(t)\). Assume that particles leaving sub-state X\(_i\) then transition to state Y\(_\ell \) with probability \(p_{i\ell }(t)\), \(\ell =1,\ldots ,m\), where the duration of time spent in state Y\(_\ell \) follows a delay distribution give by survival function \(S_j\). Then we can partition each X\(_i\) into X\(_{ij}\), \(j=1,\ldots ,k_i\), according to Theorem 3 and let *x*(*t*), \(x_i(t)\), \(x_{ij}(t)\), and \(y_\ell (t)\) be the amounts in states X, X\(_i\), X\(_{ij}\), and Y\(_\ell \) at time *t*, respectively. Assume non-negative initial conditions \(x(0)=x_0\), \(x_i(0)=\rho _i(0)x_0\), \(x_{i1}(0)=\rho _i(0)\,x_0\), \(x_{ij}(0)=0\) for \(j\ge 2\), and \(y_\ell (0)\ge 0\).

### Proof

Substituting Eq. (42b) into Eq. (43a) and then substituting Eq. (45) yields \(x(t) = \sum _{i=1}^{N} x_{i}(t)\). Applying Theorem 3 to each X\(_i\) [i.e., to each Eq. (45)] then yields Eqs. (46), (44a) and (44b). (Alternatively, one could prove this directly by differentiating Eq. (46) using Eq. (30) from Lemma 2). The \(y_\ell (t)\) equations (44c) are obtained from (43b) by substitution of Eq. (46). \(\square \)

### Example 4

#### 3.5.3 Extended LCT for dwell times given by finite mixtures of Poisson process event time distributions

It’s worth noting that in some applied contexts one may want to approximate a non-Erlang delay distribution with a mixture of Erlang distributions (see Sect. 3.7.1 and Appendix B for more details on making such approximations). Theorem 5 above details how assuming such a mixture distribution would be reflected in the structure of the corresponding mean field ODEs. This case can also be addressed in the more general context provided in Sect. 3.7.1.

#### 3.5.4 Transition to multiple states following “competing” Poisson processes

We now consider the case where *T*, the time a particle spends in a given state X, follows the distribution given by \(T=\min _i T_i\), the minimum of \(n\ge 2\) independent random variables \(T_i\), where \(T_i\) has either an Erlang(\(r_i,k_i\)) distribution or, more generally, a Poisson process \(k_i\)th event time distribution with rate \(r_i(t)\). Upon leaving state X, particles have the possibility of transitioning to any of *m* recipient states \(Y_\ell \), \(\ell =1,\ldots ,m\), where the probability of transitioning to state Y\(_\ell \) depends on which of the *n* random variables \(T_i\) was the minimum. That is, if a particle leaves X at time \(T=T_i=t\), then the probability of entering state Y\(_\ell \) is \(p_{i\ell (t)}\).

*T*is not itself an Erlang distribution or a Poisson process event time distribution, however its survival function is the product

^{7}of such survival functions, i.e.,

Before considering this case in general, it is helpful to first describe the sub-states of X imposed by assuming the dwell time distribution described above, particularly the case where the distribution for each \(T_i\) is based on 1st event times (i.e., all \(k_i=1\)). Recall that the minimum of *n* exponential random variables (which we may think of as 1st event times under a homogeneous Poisson process) is exponential with a rate that is the sum of the individual rates \(r=\sum _{i=1}^n r_i\). More generally, it is true that the minimum of *n* 1st event times under independent Poisson processes with rates \(r_i(t)\) is itself distributed as the 1st event time under a single Poisson processes with rate \(r(t)\equiv \sum _{i=1}^n r_i(t)\), thus in this case \({\mathscr {S}}(t,\tau )= \prod _{i=0}^{n}{\mathcal {S}}_{r_i}^{1}(t,\tau )={\mathcal {S}}_{r}^{1}(t,\tau )\). Additionally, if particles leaving state X are then distributed across the recipient states Y\(_\ell \) as described above, then this scenario is equivalent to the proportional outputs case described in Theorem 4 with a dwell time that follows a Poisson process 1st event time distribution with rate \(r(t)\equiv \sum _{i=1}^n r_i(t)\) and a probability vector \(p_\ell = \sum _{i=1}^n p_{i\ell }(t)r_i(t)/r(t)\), since \(P(T=T_i)=r_i(T)/r(T)\). (This mean field equivalence of these two cases is detailed in Sect. 3.5.5.) Thus, the natural partitioning of X in this case is into sub-states with dwell times that follow *iid* 1st event time distributions with rate \(r(t)\equiv \sum _{i=1}^{N} r_i(t)\).

*i*th Poisson process and its \(k_i\)th event time distribution which defines the distribution of \(T_i\). Let \(a_i\in \{1,\ldots ,k_i\}\) denote the event number a particle is awaiting under the

*i*th Poisson process. Then we can describe the particle’s progress through X according to its progress along each of these

*n*Poisson processes using the index vector \(\alpha \in {\mathcal {K}}\), where

*i*th Poisson process, and thus poised to transition out of state X).

*u*and \({\mathscr {S}}\) with the

*j*th element of each product (in

*u*) removed using the notation

This brings us to the following lemma, which generalizes Lemma 1 and Lemma 2 to distributions that are the minimum of *n* different (independent) Poisson process event times. As with the above lemmas, Lemma 3 will allow one to partition X into sub-states corresponding to each of the event indices in \({\mathcal {K}}\) describing the various stages of progress along each Poisson process prior to the first of them reaching the target event number.

### Lemma 3

*u*as defined in Eq. (50), differentiation with respect to

*t*yields

*j*th element of \(\alpha \), \(a_j\) [assuming \(a_j>1\); for example, \(\alpha _{2,-1}=(a_1,a_2-1,\ldots ,a_n)\)], and the indicator function \(\mathbb {1}_{[a_j>1]}(\alpha )\) is 1 if \(a_j>1\) and 0 otherwise.

### Proof

*u*in Eq. (50) above, it follows that

The next theorem details the LCT extension that follows from Lemma 3.

### Theorem 6

(Extended LCT for dwell times given by competing Poisson processes) Consider a continuous time dynamical system model of mass transitioning among multiple states, with inflow rate \({\mathcal {I}}_X(t)\) to a state X. The distribution of time spent in state X (call it *T*) is the minimum of *n* random variables, i.e., \(T=\min _{i}(T_i)\), \(i=1,\ldots ,n\), where \(T_i\) are either Erlang(\(r_i,k_i\)) distributed or follow the more general (nonhomogeneous) Poisson process \(k_i\)th event time distribution with rate \(r_i(t)\). Assume particles leaving X can enter one of *m* states Y\(_\ell \), \(\ell =1,\ldots ,m\). If a particle leaves X at time \(T_i\) (i.e., \(T_i\) occurred first, so \(T=T_i\)), and then the particle transitions into state \(Y_\ell \) with probability \(p_{i\ell }(T)\). Let *x*(*t*), and \(y_\ell (t)\) be the amount in each state, respectively, at time *t*, and assume non-negative initial conditions.

### Proof

*u*that initial condition \(x(0)=x_0\) becomes \(x_{(1,\ldots ,1)}(0)=x_0\) and \(x_\alpha (0)=0\) for the remaining \(\alpha \in {\mathcal {K}}\).

### Example 5

It’s worth pointing out that the dwell times for the above sub-states of X are all identically distributed Poisson process 1st event times (note the loss rates in Eqs. (62a)–(62d), and recall the weak memorylessness property from Sect. 3.1.2). All particles in a X sub-state at time \(\tau \) will spend a remaining amount of time in that state that follows a 1st event time distributions under a Poisson process with rate \(r(t)=r_1(t)+r_2(t)\). This is a slight generalization of the familiar fact that the minimum of *n* independent exponentially distributed random variables (with respective rates \(r_i\)) is itself an exponential random variable (with rate \(r\equiv \sum _{i=1}^n r_i\)). The next section addresses the generality of this observation about the sub-states of X.

#### 3.5.5 Mean field equivalence of proportional outputs and competing Poisson processes for 1st event time distributions

The scenarios described in Sect. 3.5.1 (proportional distribution across multiple states \(Y_\ell \) after an Erlang dwell time in X) and Sect. 3.5.4 (proportional distribution across multiple states based upon competing Poisson processes), can lead to equivalent mean field equations when the X dwell times follow Poisson process 1st event time distributions, as is Example 5. This equivalence is detailed in Theorem 7, and is an important aspect of the GLCT detailed in Sect. 3.7 because it helps to show how sub-states with dwell times distributed as Poisson process 1st event times are the fundamental buildings blocks of the GLCT.

### Theorem 7

(Mean field equivalence of proportional outputs and competing Poisson processes for 1st event time distributions) Consider the special case of Theorem 6 (the Extended LCT for competing Poisson processes) where X has a dwell time given by \(T=\min _i T_i\), where each \(T_i\) is a Poisson process 1st event time with rate \(r_i(t)\), \(i=1,\ldots ,n\) and particles transition to Y\(_\ell \) with probability \(p_{i\ell }(T)\) when \(T=T_i\). The corresponding mean field model is equivalent to the special case of Theorem 4 (the Extended LCT for multiple outputs) where the X dwell time is a Poisson process 1st event time distribution with rate \(r(t)=\sum _{i=1}^n r_i(t)\), and the transition probability vector for leaving X and entering state Y\(_\ell \) is given by \(p_\ell (t)=\sum _{i=1}^n p_{i\ell }(t)\,r_i(t)/r(t)\).

### Proof

*t*goes to Y\(_\ell \) is \(p_\ell (t)=\sum _{i=1}^n \frac{r_i(t)}{r(t)}p_{i\ell }(t)\). Substituting the above equalities into the mean field Eq. (56a) (where there’s only one possible index in \({\mathcal {K}}=\{(1,1,\ldots ,1)\}\)) and (56c) gives

### 3.6 Modeling intermediate state transitions: reset the clock, or not?

We next describe how to apply extensions of the LCT in two similar but distinctly different scenarios (see Fig. 7) where the transition to one or more intermediate sub-states either resets an individual’s overall dwell time in state X (by assuming the time spent in an intermediate sub-state X\(_{I_i}\) is independent of time already spent in X\(_0\); see Sect. 3.6.1), or instead leaves the overall dwell time distribution for X unchanged (by conditioning the time spent in intermediate state X\(_{I_i}\) on the time already spent in X\(_0\); see Sect. 3.6.2).

An example of these different assumptions leading to important differences in practice comes from Feng et al. (2016) where individuals infected with Ebola can either leave the infected state (X) directly (either to a recovery or death), or after first transitioning to an intermediate hospitalized state (X\(_I\)) which needs to be explicitly modeled in order to incorporate a quarantine effect into the rates of disease transmission (i.e., the force of infection should depend on the number of non-quarantined individuals, i.e., X\(_0\)). As shown in Feng et al. (2016), the epidemic model output depends strongly upon whether or not it is assumed that moving into the hospitalized sub-state impacts the distribution of time spent in the infected state X.

To most simply illustrate these two scenarios, consider the simple case in Fig. 7 where a single intermediate sub-state \(X_I\) is being modeled, and particles enter X into sub-state X\(_0\) at rate \({\mathcal {I}}_X(t)\). Let X\(=\)X\(_0\cup \)X\(_I\). Both cases assume particles transition out of X\(_0\) either to sub-state X\(_I\) or they leave state X directly and enter state Y. Both cases also assume the distribution of time spent in X\(_0\) is \(T_*=\)min(\(T_0,T_1\)) where particles transition to X\(_I\) if \(T_1<T_0\) (i.e., if \(T=T_1\)) or to Y if \(T_0<T_1\) (where each \(T_i\) is the \(k_i\)th event time under Poisson processes with rates \(r_0(t)\) and \(r_1(t)\) (see Sects. 3.5.4 and 3.5.5). Let \(T_I\) denote the distribution of time spent in intermediate state X\(_I\). The first case assumes \(T_I\) is independent of time spent in X\(_0\) (i.e., the transition to X\(_I\) ‘resets the clock’; see Sect. 3.6.1). The second case assumes \(T_I\) is conditional on time already spent in X\(_0\) (call it \(t_0\)), such that the total amount of time spent in X, \(t_0+T_I\), is equivalent in distribution to \(T_0\) (i.e., the transition to X\(_I\) does not change the overall distribution of time spent in X; see Sect. 3.6.2).

In the next two sections, we provide extensions of the LCT for generalizations of these two scenarios, extended to multiple possible intermediate states with eventual transitions out of X into multiple recipient states.

#### 3.6.1 Intermediate states that reset dwell time distributions

First, we consider the case in which the time spent in the intermediate state X\(_I\) is independent of the time already spent in X (i.e., in the base state X\(_0\)). This is arguably the more commonly encountered (implicit) assumption found in ODE models that aren’t explicitly derived from a stochastic model and/or mean field integro-differential delay equations.

The construction of mean field ODEs for this case is a straightforward application of Theorem 6 from the previous section, combined with the extended LCT with output to multiple states (Theorem 4). Here we have extended this scenario to include \(M_X\) intermediate sub-states X\(_{I_j}\) where the transition to those sub-states from base state X\(_0\) is based on the outcome of *N* competing Poisson process event time distributions (\(T_i\)), and upon leaving the intermediate states particles transition out of state X into one of \(M_Y\) possible recipient states Y\(_\ell \).

### Theorem 8

(Extended LCT with dwell time altering intermediate sub-state transitions) Suppose particles enter X at rate \({\mathcal {I}}_X(t)\) into a base sub-state X\(_0\). Assume particles remain in X\(_0\) according to a dwell time distribution given by *T*, the minimum of \(N+1\) independent Poisson process \(k_i\)th event time distributions with rates \(r_i(t)\), \(i=0,\ldots ,N\), i.e., \(T=\min _i(T_i)\). Particles leaving X\(_0\) transition to one of \(M_X\ge 1\) intermediate sub-states X\(_{I_i}\) or to one of \(M_Y\ge 1\) recipient states \(Y_\ell \) according to which \(T_i=T\). If \(T_0=T\) then the particle leaves X and the probability of transitioning to Y\(_\ell \) is \(p_{0\ell }(T)\), where \(\sum _{\ell =1}^{M_Y} p_{0\ell }(T)=1\). If \(T_i=T\) for \(i\ge 1\) then the particle transitions to X\(_{I_j}\) with probability \(p_{ij}(T)\), where \(\sum _{j=1}^{M_X} p_{ij}(T)=1\). Particles in intermediate state \(X_{I_j}\) remain there according to the \(\kappa _i\)th event times under a Poisson process with rate \(\varrho _i(t)\), and then transition to state Y\(_\ell \) with probability \(q_{j\ell }(t)\), where (for fixed *t*) \(\sum _{\ell =1}^{M_Y} q_{j\ell }(t)=1\), and they remain in Y\(_\ell \) according to a dwell time with survival function \(S_\ell (t,\tau )\).

*j*th intermediate state X\(_{I_j}\) is \(x_{Ij}(t)=\sum _{k=1}^{\kappa _j} x_{I_{jk}}(t)\) (see Theorem 6 for notation), \({\mathcal {K}}=\{(a_0,a_1,\ldots ,a_N)\;|\;a_j\in \{1,\ldots ,k_j\}\}\), \({\mathcal {K}}_i=\{\alpha \in {\mathcal {K}} | a_i=k_i\}\), \(j=1,\ldots ,N\), \(\ell = 1,\ldots ,M_Y\), and in Eq. (64b) \(\alpha =(a_0,\ldots ,a_N) \in {\mathcal {K}}{\setminus }(1,\ldots ,1)\). Note that the \(y_\ell (t)\) equations (64e) may be further reduced to a system of ODEs, e.g., via Corollary 1, and that more complicated distributions for dwell times in intermediate states X\(_{I_i}\) (e.g., an Erlang mixture) could be similarly modeled according to other cases addressed in this manuscript.

### Proof

This follows from applying Theorem 6 to X\(_0\) and treating the intermediate states X\(_{I_j}\) as recipient states, then applying Theorem 4 to each intermediate state to partition each X\(_{I_j}\) into X\(_{I_{jk}}\), \(k=1,\ldots ,\kappa _j\), yielding Eq. (64). \(\square \)

### Example 6

#### 3.6.2 Intermediate states that preserve dwell time distributions

In this section we address how to modify the outcome in the previous section to instead construct mean field ODE models that incorporate ‘dwell time neutral’ sub-state transitions, i.e., where the distribution of time spent in X is the same regardless of whether or not particles transition (within X) from some base sub-state X\(_0\) to one or more intermediate sub-states X\(_{I_j}\). This is done by conditioning the dwell time distributions in X\(_{I_i}\) on time spent in X\(_0\) in a way that leverages the weak memorylessness property discussed in Sect. 3.1.2.

In applications, this case (in contrast to the previous case) is perhaps the more commonly desired assumption, since modelers often seek to partition states into sub-states where key characteristics, like the overall X dwell time distribution, remain unchanged, but where the different sub-states have functional differences elsewhere in the model. For example, transmission rate reductions from quarantine in SIR type infectious disease models.

One approach to deriving such a model is to condition the dwell time distribution for an intermediate state X\(_{I_i}\) on the time already spent in X\(_0\) (as in Feng et al. 2016). We take a slightly different approach and exploit the weak memoryless property of Poisson process 1st event time distributions (see Theorem 1 in Sect. 3.1.2, and the notation used in the previous section) to instead condition the dwell time distribution for intermediate states X\(_{I_j}\) on how many of the \(k_0\) events have already occurred when a particle transitions from X\(_0\) to X\(_{I_j}\) (rather than conditioning on the exact elapsed time spent in X\(_0\)). In this case, since each sub-state of X\(_0\) has *iid* dwell time distributions that are Poisson process 1st event times with rate \(r(t)=\sum _{i=0}^N r_i(t)\), if *i* of the \(k_0\) events had occurred prior to the transition out of X\(_0\), then the weak memoryless property of Poisson process 1st event time distributions implies that the remaining time spent in X\(_{I_j}\) should follow a \((k_0-i)\)th event time distribution under an Poisson process with rate \(r_0(t)\), thus ensuring that the total time spent in X follows a \(k_0\)th event time distribution with rate \(r_0(t)\). With this realization in hand, one can then apply Theorem 6 and Theorem 4 as in the previous section to obtain the desired mean field ODEs, as detailed in the following Theorem, and as illustrated in Fig. 8.

### Theorem 9

(Extended LCT with dwell time preserving intermediate states) Consider the mean field equations for a system of particles entering state X (into sub-state X\(_0\)) at rate \({\mathcal {I}}_X(t)\). As in the previous case, assume the time spent in X\(_0\) follows the minimum of \(N+1\) independent Poisson process \(k_i\)th event time distributions with respective rates \(r_i(t)\), \(i=0,\ldots ,N\) (i.e., \(T=\min _i(T_i)\)). Particles leaving X\(_0\) at time *T* transition to recipient state Y\(_\ell \) with probability \(p_{0\ell }(T)\) if \(T=T_0\), or if \(T=T_i\) (\(i=1,\ldots ,N\)) to the *j*th of \(M_X\) intermediate sub-states, X\(_{I_j}\), with probability \(p_{ij}(T)\). If \(T<T_0\), we may define a random variable \(K\in \{0,\ldots ,k_0-1\}\) indicating how many events had occurred under the Poisson process associated with \(T_0\) at the time of the transition out of X\(_0\) (at time *T*). In order to ensure the overall time spent in X follows a Poisson process \(k_0\)th event time distribution with rate \(r_0(t)\), it follows that particles entering state, X\(_{I_j}\) will remain there for a duration of time that is conditioned on \(K=k\) such that the conditional dwell time for that particle in X\(_{I_j}\) will be given by a Poisson process \((k_0-k)\)th event time with rate \(r_0(t)\). Finally, assume that particles leaving X via intermediate sub-state X\(_{I_j}\) at time *t* transition to Y\(_\ell \) with probability \(q_{j\ell }\), where they remain according to a dwell time determined by survival function \(S_\ell (t,\tau )\).

### Proof

The proof of Theorem 9 parallels the proof of Theorem 8, but with the following modifications. First, each sub-state of X\(_{I_j}\) (for all *j*) has the same dwell time distribution, namely, they are all 1st event time distributions under a Poisson process with rate \(r_0(t)\). Second, upon leaving X\(_0\) where \(T=T_i\) and \(K(T)=k < k_0\) (i.e., when only \(k<k_0\) events have occurred under the 0th Poisson process; see the definition of *K* in the text above) particles will enter (with probability \(p_{ij}(T)\)) the *j*th intermediate state X\(_{I_j}\) by entering sub-state X\(_{I_{jk}}\) which (due to the weak memorylessness property described in Theorem 1) ensures that, upon leaving X\(_{I_j}\) particles will have spent a duration of time that follows the Poisson process \(k_0\)th event time distribution with rate \(r_0(t)\). \(\square \)

### Example 7

### 3.7 Generalized Linear Chain Trick (GLCT)

In the preceding sections we have provided various extensions of the Linear Chain Trick (LCT) that describe how the structure of mean field ODE models reflects the assumptions that define corresponding continuous time stochastic state transition models. Each case above can be viewed as a special case of the following more general framework for constructing mean field ODEs, which we refer to as the Generalized Linear Chain Trick (GLCT).

- A1.
A focal state (which we call state X) can be partitioned into a finite number of sub-states (e.g., X\(_1,\ldots ,\)X\(_n\)), each with independent (across states and particles) dwell time distributions that are either exponentially distributed with rates \(r_i\) or, more generally, are distributed as independent 1st event times under nonhomogeneous Poisson processes with rates \(r_i(t)\), \(i=1,\ldots ,n\). Recall the equivalence relation in Sect. 3.5.5.

- A2.
Inflow rates into X can be described by non-negative, integrable inflow rates into each of these sub-states (e.g., \({\mathcal {I}}_{X_1}(t),\ldots ,{\mathcal {I}}_{X_n}(t)\)), some or all of which may be zero. This includes the case where particles enter X at rate \({\varLambda }(t)\) and are distributed across sub-states X\(_i\) according to the probabilities \(\varvec{\rho }(t) = [\rho _1(t),\ldots ,\rho _n(t)]^{{\textit{T}}}\) (i.e., we let \({\mathcal {I}}_{X_i}(t)\equiv \rho _i(t)\,{\varLambda }(t)\)) where \(\sum _i \rho _i =1\).

- A3.
Particles that transition out of a sub-state X\(_i\) at time

*t*transition either into sub-state X\(_j\) with probability \(p_{ij}(t)\), or into one of recipient states Y\(_\ell \), \(\ell =1,\ldots ,m\), with probability \(p_{i,n+\ell }\). That is, let \(p_{ij}(t)\) denote the probability that a particle leaving state X\(_i\) at time*t*enters either X\(_j\) if \(j\le n\) or Y\(_{j-n}\) if \(j>n\), where \(i=1,\ldots ,n\), \(j=1,\ldots ,n,n+1,\ldots ,n+m\). - A4.
Recipient states Y\(_\ell \), \(\ell =1,\ldots ,m\), also have dwell time distributions defined by survival functions \(S_{Y_\ell }(t,\tau )\) and integrable, non-negative inflow rates \({\mathcal {I}}_{Y_\ell }(t)\) that describe inputs from all other non-X sources.

### Theorem 10

*t*go to X\(_j\) (likewise, one can define \({\mathbf {P}}_Y(t)=(p_{ij}(t))\), \(i\in \{1,\ldots ,n\}\), \(j\in \{n+1,\ldots ,n+m\}\), which is the \(n\times m\) matrix of probabilities describing which transitions from X\(_i\) at time

*t*go to Y\(_{j-n}\)), \(\mathbf {{\mathcal {I}}_X}(t) = [{\mathcal {I}}_{X_1}, \ldots , {\mathcal {I}}_{X_n}]^\text {T}\), \({\mathbf {R}}(t)=[r_1(t),\ldots ,r_n(t)]^\text {T}\), and \({\mathbf {x}}(t)=[x_1(t),\ldots ,x_n(t)]^\text {T}\) which yields

### Proof

The proof of the theorem above follows directly from applying Theorem 4 to each sub-state. \(\square \)

### Example 8

*(Dwell time given by the maximum of independent Erlang random variables)*We here illustrate how the GLCT can provide a conceptually simpler framework for deriving ODEs relative to derivation from mean field integral equations by assuming the X dwell time obeys the maximum of multiple Erlang distributions. While the survival function for this distribution is not straightforward to write down, it is fairly straightforward to construct a Markov Chain that yields such a dwell time distribution (see Fig. 9).

Recall that, in Sect. 3.5.4, we considered a dwell time given by the minimum of *N* Erlang distributions. Here we instead consider the case where the dwell time distribution is given by the maximum of multiple Erlang distributions, \(T=\max (T_1,T_2)\) where \(T_i\sim \)Erlang(\(r_i,2\)). For simplicity, assume the dwell time in a single recipient state Y is exponential with rate \(\mu \). We again partition X according to which events (under the two independent homogeneous Poisson processes associated with each of \(T_1\) and \(T_2\)) particles are awaiting, and index those sub-states accordingly (see Fig. 9). These sub-states are X\(_{11}\), X\(_{21}\), X\(_{12}\), X\(_{*1}\), X\(_{22}\), X\(_{1*}\), X\(_{*2}\), and X\(_{2*}\), where a ‘\(*\)’ in the *i*th index position indicates that particles in that sub-state have already had the *i*th Poisson process reach the \(k_i\)th event (in this case, the 2nd event). Each such sub-state has exponentially distributed dwell times, but rates for these dwell time distributions differ (unlike the cases in Sect. 3.5.4 where all sub-states had the same rate): the Poisson process rates for sub-states X\(_{11}\), X\(_{21}\), X\(_{12}\), and X\(_{22}\) are \(r=r_1+r_2\) (see Fig. 9 and compare to Theorem 6 and Fig. 6), but the rate for the states X\(_{1*}\) and X\(_{2*}\) (striped circles in Fig. 9) are \(r_1\) , and for X\(_{*1}\) and X\(_{*2}\) (shaded circles in Fig. 9) are \(r_2\).

*r*,

*r*,

*r*, \(r_2\),

*r*, \(r_1\), \(r_2\), \(r_1]^\text {T}\), \(\varvec{\rho }(t)=[1,0,\ldots ,0]^\text {T}\) and hence \({\mathcal {I}}_{\mathbf {X}}(t)=[{\mathcal {I}}_X(t),0,\ldots ,0]^\text {T}\). Denote \(p_1\equiv r_1/r\) and \(p_2\equiv r_2/r\) (

*à la*Theorem 7 in Sect. 3.5.5). Then the first eight rows of \(9\times 9\) matrix \({\mathbf {P}}\) are given byThus, by the GLCT (Theorem 10), the corresponding mean field ODEs are

#### 3.7.1 GLCT for phase-type distributions

The GLCT above extends the LCT to a very flexible family of dwell time distributions known as (continuous) *phase-type distributions* (Asmussen et al. 1996; Pérez and Riaño 2006; Osogami and Harchol-Balter 2006; Thummler et al. 2006; Reinecke et al. 2012a; Horváth et al. 2012; Komárková 2012; Horváth et al. 2016; Okamura and Dohi 2015; Horváth and Telek 2017), i.e., the hitting time distributions for Continuous Time Markov Chains (CTMC). These CTMC hitting time distributions include the hypoexponential distributions, hyper-exponential and hyper-Erlang distributions, and generalized Coxian distributions (Reinecke et al. 2012a; Horváth et al. 2016). Importantly, these distributions can be fit to data or can be used to approximate other named distributions (e.g., see Horváth and Telek 2017; Osogami and Harchol-Balter 2006; Altiok 1985; Pérez and Riaño 2006; Komárková 2012; Reinecke et al. 2012b, and related publications). As detailed below, this enables modelers to incorporate a much broader set of dwell time distributions into ODEs than is afforded by the standard LCT.

*n*) vector \(\varvec{\rho }\). Also assume—just to define the CTMC that describes transitions among transient states X up to (but not after) entering states Y—that each state in Y is absorbing (i.e., \(p_{ii}=1\), \(i>n\)). Then the X dwell time distribution follows the hitting time distribution for a CTMC with initial distribution vector \(\varvec{\rho }\) and (\(n+m\))\(\times \)(\(n+m\)) transition probability matrix

*i*goes from \(r_i\) to

*i*then get normalized to

*transition rate matrix*(also sometimes called the

*infinitesimal generator matrix*or simply the

*generator matrix*) which is defined as follows. Let matrix \({\mathbf {G}}\) be the same dimension as \({\mathbf {P}}\) (and thus, \(\widetilde{{\mathbf {P}}}\)) and let the first

*n*terms in the diagonal of \({\mathbf {G}}\) be the negative of the jump process rates, \(-\varvec{\lambda }\) (i.e., \(G_{ii}=-\lambda _i\), \(i\le n\)). Let the off diagonal entries of the first

*n*rows of \({\mathbf {G}}\) be the jump process transition probabilities \({\widetilde{p}}_{ij}\) multiplied by the

*i*th rate \(\lambda _i\) (i.e., \(G_{ij}=\lambda _i\,{\widetilde{p}}_{ij}\), \(j\ne i\)). Thus, the first row of \({\mathbf {G}}\) is

*m*rows of \({\mathbf {G}}\)) are 0, \({\mathbf {G}}\) has the form

*n*initial distribution vector \(\varvec{\rho }\).

The GLCT for phase-type distributions can now be stated as follows.

### Corollary 2

### Example 9

*(Serial LCT and hypoexponential distributions)*Assume the dwell time in state X is given by the sum of independent (not identically distributed) Erlang distributions or, more generally, Poisson process \(k_i\)th event time distributions with rates \(r_i(t)\), i.e., \(T=\sum _i T_i\), \(i=1,\ldots ,N\) (note the special case where all \(k_i=1\) and \(r_i(t)=r_i\) are constant, which yields that

*T*follows a hypoexponential distribution). Let \(n=\sum _i k_i\) and further assume particles go to \(Y_\ell \) with probability \(p_{\ell }\) upon leaving X, \(\ell =1,\ldots ,m\). Using the GLCT framework above, this corresponds to partitioning X into sub-states X\(_j\), where \(j=1,\ldots ,n\), and

*j*th element of \({\mathbf {R}}(t)\) in Eq. (78), the corresponding mean field equations are

Note, the phase-type distribution form of the hypoexponential distribution could be used with Corollary 2 to derive the \(x_i\) equations in Eq. (9).

### Example 10

*(SIR model with Phase-Type Duration of Infectiousness.)*Consider the simple SIR model given by Eq. (2) with mass action transmission \(\lambda (t)=\beta \,I(t)\). Suppose the assumed exponentially distributed dwell times in state

*I*were to be replaced by a phase-type distribution with initial distribution vector \(\varvec{\alpha }\) and matrix \({\mathbf {A}}\) (note that, in some cases, it is possible to match the first three or more moments using only a \(2\times 2\) or \(3\times 3\) matrix \({\mathbf {A}}\) and note that Matlab and Python routines for making such estimates are freely available in Horváth and Telek 2017). Then, letting \({\mathbf {x}}\) be the vector of substates of I and \(I(t)=x_1(t)+\cdots +x_n(t)\), by the GLCT for phase-type distributions (Corollary 2) the corresponding mean field ODE model, with \(R(t)=N_0-S(t)-I(t)\), is

## 4 Discussion

ODEs are arguably the most popular framework for modeling continuous time dynamical systems in applications. This is in part due to the relative ease of building, simulating, and analyzing ODE models, which makes them very accessible to a broad range of scientists and mathematicians. The above results generalize the Linear Chain Trick (LCT), and detail how to construct mean field ODE models for a broad range of scenarios found in applications based on explicit individual-level stochastic model assumptions. Our hope is that these contributions improve the speed and efficiency of constructing mean field ODE models, increase the flexibility to make more appropriate dwell time assumptions, and help clarify (for both modelers and those reading the results of their work) how individual-level stochastic assumptions are reflected in the structure of mean field ODE model equations. We have provided multiple novel theorems that describe how to construct such ODEs directly from underlying stochastic model assumptions, without formally deriving them from an explicit stochastic model or from intermediate integral equations. The Erlang distribution recursion relation (Lemma 1) that drives the LCT has been generalized to include the time-varying analogues of Erlang distributions—i.e., *k*th event time distributions under nonhomogeneous Poisson processes (Lemma 2)—and distributions that reflect “competing Poisson process event times” defined as the minimum of a finite number of independent Poisson process event times (Lemma 3). These new lemmas, and our generalization of the memorylessness property of the exponential distribution (which we refer to in Sect. 3.1.2 as the *weak memorylessness* property of nonhomogeneous Poisson process 1st event time distributions) together allow more flexible dwell time assumptions to be incorporated into mean field ODE models. We have also introduced a novel Generalized Linear Chain Trick (GLCT; Theorem 10 in Sect. 3.7) which complements previous extensions of the LCT (e.g., Jacquez and Simon 2002; Diekmann et al. 2017) and allows modelers to construct mean field ODE models for a broad range of dwell time assumptions and associated sub-state configurations (e.g., conditional dwell time distributions for intermediate sub-state transitions), including the phase-type family of distributions and their time-varying analogues as detailed in Sect. 3.7.1. The GLCT also provides a framework for considering other scenarios not specifically addressed by the preceding results, as illustrated by Example 8 in which the dwell time distribution follows the maximum of multiple Erlang distributions.

These results not only provide a framework to incorporate more accurate dwell time distributions into ODE models, but also hopefully encourage more comparative studies, such as Feng et al. (2016), that explore the dynamic and application-specific consequences of incorporating non-Erlang dwell time distributions, and conditional dwell time distributions, into ODE models. More study is needed, for example, comparing integral equation models with non-exponential dwell time distributions and their ODE counterparts based on approximating those distributions with Erlang and phase-type distributions.

The GLCT also permits modelers to incorporate the flexible phase-type distributions (i.e., the hitting-time distributions for Continuous Time Markov Chains) into ODE models. This family of probability distributions includes mixtures of Erlang distributions (a.k.a. hyper-Erlang distributions), the minimum or maximum of multiple Erlang distributions, the hypoexponential distributions, generalized Coxian distributions, and others (Reinecke et al. 2012a; Horváth et al. 2016). While the phase-type distributions are currently mostly unknown to mathematical biologists, they have received some attention in other fields and modelers can take advantage of existing methods that have been developed to fit phase-type distributions to other distributions on \({\mathbb {R}}^+\) and to data (see Sect. 3.7.1 for references). These results provide a flexible framework for approximating dwell time distributions, and incorporating those empirically or analytically derived dwell time distributions into ODE models.

There are some additional considerations, and potential challenges to implementing these results in applications, that are worth addressing. First, the increase in the number of state variables may lead to both computational and analytical challenges, however we have a growing number of tools at our disposal for tackling higher dimensional systems (e.g., van den Driessche and Watmough 2002; Guo et al. 2008; Li and Shuai 2010; Du and Li 2014; Bindel et al. 2014). We intend to explore the costs associated with this increase in dimensionality in future publications. Second, it is tempting to assume that the sub-states resulting from the above theorems correspond to some sort of sub-state structure in the actual system being modeled. This is not necessarily the case, and we should be cautious about interpreting these sub-states as evidence of, e.g., cryptic population structure. Third, some of the above theorems make a simplifying assumption that, either at time \(t=0\) or upon entry into X, the initial distribution of particles is only into the first sub-state. This may not be the appropriate assumption to make in some applications, but it is fairly straight forward to modify these these initial condition assumptions within the context of the GLCT. Fourth, it may be appropriate in some applications to avoid mean field models, and instead analyze the stochastic model dynamics directly [e.g., see Allen (2010, 2017) and references therein]. Lastly, the history of successful attempts to garner scientific insights from mean field ODE models seems to suggest that such distributional refinements are unnecessary. However, this is clearly not always the case, as evidenced by the many instances in which modelers have abandoned ODEs and instead opted to use integral equations to model systems with non-Erlang dwell time distributions. We hope these results will facilitate more rigorous comparisons between such models and their simplified and/or ODE counterparts, like Feng et al. (2016) and Piotrowska and Bodnar (2018), to help clarify when the use of these ODE models is warranted.

In closing, these novel extensions of the LCT help clarify how underlying assumptions are reflected in the structure of mean field ODE models, and provide a means for incorporating more flexible dwell time assumptions into mean field ODE models directly from first principles without a need to derive ODEs from stochastic models or intermediate mean field integral equations. The Generalized Linear Chain Trick (GLCT) provides both a conceptual framework for understanding how individual-level stochastic assumptions are reflected in the structure of mean field model equations, and a practical framework for incorporating exact, approximate, or empirically derived dwell time distributions and related assumptions into mean field ODE models.

## Footnotes

- 1.
Erlang distributions are Gamma distributions with integer-valued shape parameters.

- 2.
They can also be parameterized in terms of their mean and variance (see Appendix B), or with a

*shape*and*scale*parameters, where the*scale*parameter is the inverse of the*rate*. - 3.
A useful interpretation of survival functions, which is used below, is that they give the expected proportion remaining after a give amount time.

- 4.
...despite the implied exclusivity of the adjective

*nonhomogeneous*. - 5.
That is, the probability of a given individual exiting state X during a brief time period [\(t,t+{\varDelta } t\)] is approximately \(r(t){\varDelta } t\).

- 6.
Here the variance is assumed to have been chosen so that the resulting shape parameter is integer valued. See Appendix B for related details.

- 7.
It is generally true that the survival function for a minimum of multiple independent random variables is the product of their survival functions.

## Notes

### Acknowledgements

The authors thank Michael H. Cortez, Jim Cushing, Marisa Eisenberg, Jace Gilbert, Zoe Haskell, Tomasz Kozubowski, Miles Moran, Catalina Medina, Amy Robards, Deena R. Schmidt, Joe Tien, Narae Wadsworth, and an anonymous referee for comments and suggestions that improved this work.

### Funding

This work was supported by funds provided to PJH by the University of Nevada, Reno (UNR) Office of Research and Innovation, and by a grant from the Sloan Scholars Mentoring Network of the Social Science Research Council with funds provided by the Alfred P. Sloan Foundation.

### Compliance with ethical standards

### Conflict of interest

The authors declare that they have no conflict of interest.

## References

- Allen LJS (2010) An introduction to Stochastic processes with applications to biology, 2nd edn. Chapman and Hall/CRC, Boca RatonGoogle Scholar
- Allen LJ (2017) A primer on stochastic epidemic models: formulation, numerical simulation, and analysis. Infect Dis Model 2(2):128–142. https://doi.org/10.1016/j.idm.2017.03.001 Google Scholar
- Altiok T (1985) On the phase-type approximations of general distributions. IIE Trans 17(2):110–116. https://doi.org/10.1080/07408178508975280 Google Scholar
- Anderson RM, May RM (1992) Infectious diseases of humans: dynamics and control. Oxford University Press, OxfordGoogle Scholar
- Anderson D, Watson R (1980) On the spread of a disease with gamma distributed latent and infectious periods. Biometrika 67(1):191–198. https://doi.org/10.1093/biomet/67.1.191 zbMATHGoogle Scholar
- Armbruster B, Beck E (2017) Elementary proof of convergence to the mean-field model for the SIR process. J Math Biol 75(2):327–339. https://doi.org/10.1007/s00285-016-1086-1 MathSciNetzbMATHGoogle Scholar
- Asmussen S, Nerman O, Olsson M (1996) Fitting phase-type distributions via the EM algorithm. Scand J Stat 23(4):419–441zbMATHGoogle Scholar
- Banks HT, Catenacci J, Hu S (2013) A comparison of stochastic systems with different types of delays. Stoch Anal Appl 31(6):913–955. https://doi.org/10.1080/07362994.2013.806217 MathSciNetzbMATHGoogle Scholar
- Bindel D, Friedman M, Govaerts W, Hughes J, Kuznetsov YA (2014) Numerical computation of bifurcations in large equilibrium systems in matlab. J Comput Appl Math 261:232–248. https://doi.org/10.1016/j.cam.2013.10.034 MathSciNetzbMATHGoogle Scholar
- Blythe S, Nisbet R, Gurney W (1984) The dynamics of population models with distributed maturation periods. Theor Popul Biol 25(3):289–311. https://doi.org/10.1016/0040-5809(84)90011-X MathSciNetzbMATHGoogle Scholar
- Boese F (1989) The stability chart for the linearized Cushing equation with a discrete delay and with gamma-distributed delays. J Math Anal Appl 140(2):510–536. https://doi.org/10.1016/0022-247X(89)90081-4 MathSciNetzbMATHGoogle Scholar
- Burton TA (2005) Volterra integral and differential equations, mathematics in science and engineering, vol 202, 2nd edn. Elsevier, AmsterdamGoogle Scholar
- Câmara De Souza D, Craig M, Cassidy T, Li J, Nekka F, Bélair J, Humphries AR (2018) Transit and lifespan in neutrophil production: implications for drug intervention. J Pharmacokinet Pharmacodyn 45(1):59–77. https://doi.org/10.1007/s10928-017-9560-y Google Scholar
- Campbell SA, Jessop R (2009) Approximating the stability region for a differential equation with a distributed delay. Math Model Nat Phenom 4(2):1–27. https://doi.org/10.1051/mmnp/20094201 MathSciNetzbMATHGoogle Scholar
- Champredon D, Dushoff J, Earn D (2018) Equivalence of the Erlang SEIR epidemic model and the renewal equation. bioRxiv https://doi.org/10.1101/319574
- Ciaravino G, García-Saenz A, Cabras S, Allepuz A, Casal J, García-Bocanegra I, Koeijer AD, Gubbins S, Sáez J, Cano-Terriza D, Napp S (2018) Assessing the variability in transmission of bovine tuberculosis within Spanish cattle herds. Epidemics 23:110–120. https://doi.org/10.1016/j.epidem.2018.01.003 Google Scholar
- Clapp G, Levy D (2015) A review of mathematical models for leukemia and lymphoma. Drug Discov Today Dis Models 16:1–6. https://doi.org/10.1016/j.ddmod.2014.10.002 Google Scholar
- Cushing JM (1994) The dynamics of hierarchical age-structured populations. J Math Biol 32(7):705–729. https://doi.org/10.1007/BF00163023 MathSciNetzbMATHGoogle Scholar
- Dhooge A, Govaerts W, Kuznetsov YA (2003) MATCONT: a MATLAB package for numerical bifurcation analysis of ODEs. ACM Trans Math Softw 29(2):141–164. https://doi.org/10.1145/779359.779362 MathSciNetzbMATHGoogle Scholar
- Diekmann O, Gyllenberg M, Metz JAJ (2017) Finite dimensional state representation of linear and nonlinear delay systems. J Dyn Differ Equ. https://doi.org/10.1007/s10884-017-9611-5 zbMATHGoogle Scholar
- Du P, Li MY (2014) Impact of network connectivity on the synchronization and global dynamics of coupled systems of differential equations. Phys D Nonlinear Phenom 286–287:32–42. https://doi.org/10.1016/j.physd.2014.07.008 MathSciNetzbMATHGoogle Scholar
- Ermentrout B (1987) Simulating, analyzing, and animating dynamical systems: a guide to XPPAUT for researchers and students. Software, environments and tools (Book 14), Society for Industrial and Applied MathematicsGoogle Scholar
- Ermentrout B (2019) XPP/XPPAUT homepage. http://www.math.pitt.edu/~bard/xpp/xpp.html. Accessed Apr 2019
- Fargue D (1973) Réductibilité des systèmes héréditaires à des systèmes dynamiques (régis par des équations différentielles ou aux dérivées partielles). C R Acad Sci Paris Sér A-B 277:B471–B473MathSciNetGoogle Scholar
- Feng Z, Thieme H (2000) Endemic models with arbitrarily distributed periods of infection I: fundamental properties of the model. SIAM J Appl Math 61(3):803–833. https://doi.org/10.1137/S0036139998347834 MathSciNetzbMATHGoogle Scholar
- Feng Z, Xu D, Zhao H (2007) Epidemiological models with non-exponentially distributed disease stages and applications to disease control. Bullet Math Biol 69(5):1511–1536. https://doi.org/10.1007/s11538-006-9174-9 MathSciNetzbMATHGoogle Scholar
- Feng Z, Zheng Y, Hernandez-Ceron N, Zhao H, Glasser JW, Hill AN (2016) Mathematical models of Ebola-Consequences of underlying assumptions. Math Biosci 277:89–107MathSciNetzbMATHGoogle Scholar
- Fenton A, Lello J, Bonsall M (2006) Pathogen responses to host immunity: the impact of time delays and memory on the evolution of virulence. Proc Biol Sci 273(1597):2083–2090. https://doi.org/10.1098/rspb.2006.3552 Google Scholar
- Goltser Y, Domoshnitsky A (2013) About reducing integro-differential equations with infinite limits of integration to systems of ordinary differential equations. Adv Differ Equ 3013 1:187. https://doi.org/10.1186/1687-1847-2013-187 zbMATHGoogle Scholar
- Guan ZH, Ling G (2018) Dynamic analysis of genetic regulatory networks with delays. Springer, Berlin, pp 285–309. https://doi.org/10.1007/978-3-662-55663-4_14
- Guo H, Li MY, Shuai Z (2008) A graph-theoretic approach to the method of global lyapunov functions. Proc Am Math Soc 136(08):2793–2802. https://doi.org/10.1090/S0002-9939-08-09341-6 MathSciNetzbMATHGoogle Scholar
- Gyllenberg M (2007) Mathematical aspects of physiologically structured populations: the contributions of J. A. J. Metz. J Biol Dyn 1(1):3–44. https://doi.org/10.1080/17513750601032737 MathSciNetzbMATHGoogle Scholar
- Hethcote HW, Tudor DW (1980) Integral equation models for endemic infectious diseases. J Math Biol 9(1):37–47. https://doi.org/10.1007/BF00276034 MathSciNetzbMATHGoogle Scholar
- Horváth G, Telek M (2017) BuTools 2: a rich toolbox for Markovian performance evaluation. In: ValueTools 2016—10th EAI international conference on performance evaluation methodologies and tools, association for computing machinery, pp 137–142. https://doi.org/10.4108/eai.25-10-2016.2266400
- Horváth G, Reinecke P, Telek M, Wolter K (2012) Efficient Generation of PH-distributed random variates. In: Al-Begain K, Fiems D, Vincent JM (eds) Proceedings of the 19th international conference on analytical and stochastic modeling techniques and applications. Springer, Berlin, pp 271–285, https://doi.org/10.1007/978-3-642-30782-9_19
- Horváth A, Scarpa M, Telek M (2016) Phase type and matrix exponential distributions in Stochastic modeling. Springer International Publishing, Cham, pp 3–25. https://doi.org/10.1007/978-3-319-30599-8_1
- Jacquez JA, Simon CP (2002) Qualitative theory of compartmental systems with lags. Math Biosci 180(1):329–362. https://doi.org/10.1016/S0025-5564(02)00131-1 MathSciNetzbMATHGoogle Scholar
- Kermack WO, McKendrick AG (1927) A contribution to the mathematical theory of epidemics. Proc R Soc Lond Ser A Contain Pap Math Phys Character 115(772):700–721zbMATHGoogle Scholar
- Komárková Z (2012) Phase-type approximation techniques. Bachelor’s Thesis, Masaryk University, https://is.muni.cz/th/ysfsq
- Krylova O, Earn DJD (2013) Effects of the infectious period distribution on predicted transitions in childhood disease dynamics. J R Soc Interface. https://doi.org/10.1098/rsif.2013.0098 Google Scholar
- Krzyzanski W, Hu S, Dunlavey M (2018) Evaluation of performance of distributed delay model for chemotherapy-induced myelosuppression. J Pharmacokinet Pharmacodyn 45(2):329–337. https://doi.org/10.1007/s10928-018-9575-z Google Scholar
- Kurtz TG (1970) Solutions of ordinary differential equations as limits of pure jump Markov processes. J Appl Probab 7(1):49–58MathSciNetzbMATHGoogle Scholar
- Kurtz TG (1971) Limit theorems for sequences of jump Markov processes approximating ordinary differential processes. J Appl Probab 8(2):344–356. https://doi.org/10.2307/3211904 MathSciNetzbMATHGoogle Scholar
- Li MY, Shuai Z (2010) Global-stability problem for coupled systems of differential equations on networks. J Differ Equ 248(1):1–20. https://doi.org/10.1016/j.jde.2009.09.003 MathSciNetzbMATHGoogle Scholar
- Lin CJ, Wang L, Wolkowicz GSK (2018) An alternative formulation for a distributed delayed logistic equation. Bull Math Biol 80(7):1713–1735. https://doi.org/10.1007/s11538-018-0432-4 MathSciNetzbMATHGoogle Scholar
- Lloyd AL (2001a) Destabilization of epidemic models with the inclusion of realistic distributions of infectious periods. Proc R Soc Lond B Biol Sci 268(1470):985–993. https://doi.org/10.1098/rspb.2001.1599 Google Scholar
- Lloyd AL (2001b) Realistic distributions of infectious periods in epidemic models: changing patterns of persistence and dynamics. Theor Popul Biol 60(1):59–71. https://doi.org/10.1006/tpbi.2001.1525 Google Scholar
- Lloyd AL (2009) Sensitivity of model-based epidemiological parameter estimation to model assumptions. Springer Netherlands, Dordrecht, pp 123–141. https://doi.org/10.1007/978-90-481-2313-1_6
- Ma J, Earn DJD (2006) Generality of the final size formula for an epidemic of a newly invading infectious disease. Bull Math Biol 68(3):679–702. https://doi.org/10.1007/s11538-005-9047-7 MathSciNetzbMATHGoogle Scholar
- MacDonald N (1978a) Time lags in biological models, Lecture notes in biomathematics, vol 27. Springer, Berlin. https://doi.org/10.1007/978-3-642-93107-9
- MacDonald N (1978b) Time lags in biological models, Lecture notes in biomathematics, vol 27, Springer, Berlin, chap Stability Analysis, pp 13–38. https://doi.org/10.1007/978-3-642-93107-9_2
- MacDonald N (1989) Biological delay systems: linear stability theory, cambridge studies in mathematical biology, vol 8. Cambridge University Press, CambridgeGoogle Scholar
- Makroglou A, Li J, Kuang Y (2006) Mathematical models and software tools for the glucose-insulin regulatory system and diabetes: an overview. Appl Numer Math 56(3):559–573. https://doi.org/10.1016/j.apnum.2005.04.023 MathSciNetzbMATHGoogle Scholar
- Metz JAJ, Diekmann O (eds) (1986) The dynamics of physiologically structured populations, Lecture notes in biomathematics, vol 68. Springer, Berlin. https://doi.org/10.1007/978-3-662-13159-6
- Metz J, Diekmann O (1991) Exact finite dimensional representations of models for physiologically structured populations. I: The abstract formulation of linear chain trickery. In: Goldstein JA, Kappel F, Schappacher W (eds) Proceedings of differential equations with applications in biology, physics, and engineering 1989, vol 133, pp 269–289Google Scholar
- Nisbet RM, Gurney WSC, Metz JAJ (1989) Stage structure models applied in evolutionary ecology. Springer, Berlin, pp 428–449. https://doi.org/10.1007/978-3-642-61317-3_18
- Okamura H, Dohi T (2015) Mapfit: an R-based tool for PH/MAP parameter estimation. In: Campos J, Haverkort BR (eds) Proceedings of the 12th international conference on quantitative evaluation of systems. Springer, New York, QEST 2015, vol 9259, pp 105–112. https://doi.org/10.1007/978-3-319-22264-6_7
- Osogami T, Harchol-Balter M (2006) Closed form solutions for mapping general distributions to quasi-minimal PH distributions. Perform Eval 63(6):524–552. https://doi.org/10.1016/j.peva.2005.06.002 zbMATHGoogle Scholar
- Özbay H, Bonnet C, Clairambault J (2008) Stability analysis of systems with distributed delays and application to hematopoietic cell maturation dynamics. In: 2008 47th IEEE conference on decision and control, pp 2050–2055. https://doi.org/10.1109/CDC.2008.4738654
- Pérez JF, Riaño G (2006) jPhase: an object-oriented tool for modeling phase-type distributions. In: Proceeding from the 2006 Workshop on tools for solving structured Markov chains, ACM, New York, NY, USA, SMCtools ’06. https://doi.org/10.1145/1190366.1190370
- Piotrowska M, Bodnar M (2018) Influence of distributed delays on the dynamics of a generalized immune system cancerous cells interactions model. Commun Nonlinear Sci Numer Simul 54:389–415. https://doi.org/10.1016/j.cnsns.2017.06.003 MathSciNetGoogle Scholar
- Ponosov A, Shindiapin A, Miguel JJ (2002) The W-transform links delay and ordinary differential equations. Funct Differ Equ 9(3–4):437–469MathSciNetzbMATHGoogle Scholar
- Rachev ST (1991) Probability metrics and the stability of stochastic models. Wiley Series in Probability and Mathematical Statistics, Wiley, New YorkGoogle Scholar
- Reinecke P, Bodrog L, Danilkina A (2012a) Phase-type distributions. Springer, Berlin, pp 85–113. https://doi.org/10.1007/978-3-642-29032-9_5
- Reinecke P, Krauß T, Wolter K (2012b) Cluster-based fitting of phase-type distributions to empirical data. Comput Math Appl 64(12):3840–3851. https://doi.org/10.1016/j.camwa.2012.03.016 MathSciNetzbMATHGoogle Scholar
- Robertson SL, Henson SM, Robertson T, Cushing JM (2018) A matter of maturity: to delay or not to delay? Continuous-time compartmental models of structured populations in the literature 2000–2016. Nat Resour Model 31(1):e12160. https://doi.org/10.1111/nrm.12160 MathSciNetGoogle Scholar
- Roussel MR (1996) The use of delay differential equations in chemical kinetics. J Phys Chem 100(20):8323–8330. https://doi.org/10.1021/jp9600672 Google Scholar
- Smith H (2010) An introduction to delay differential equations with applications to the life sciences, vol 57. Springer, BerlinGoogle Scholar
- Smolen P, Baxter DA, Byrne JH (2000) Modeling transcriptional control in gene networks—methods, recent results, and future directions. Bull Math Biol 62(2):247–292. https://doi.org/10.1006/bulm.1999.0155 zbMATHGoogle Scholar
- Strogatz SH (2014) Nonlinear dynamics and chaos: with applications to physics, biology, chemistry, and engineering, 2nd edn. Studies in Nonlinearity, Westview PressGoogle Scholar
- Takashima Y, Ohtsuka T, González A, Miyachi H, Kageyama R (2011) Intronic delay is essential for oscillatory expression in the segmentation clock. Proc Natl Acad Sci 108(8):3300–3305. https://doi.org/10.1073/pnas.1014418108 Google Scholar
- Thummler A, Buchholz P, Telek M (2006) A novel approach for phase-type fitting with the EM algorithm. IEEE Trans Dependable Secure Comput 3(3):245–258. https://doi.org/10.1109/TDSC.2006.27 Google Scholar
- van den Driessche P, Watmough J (2002) Reproduction numbers and sub-threshold endemic equilibria for compartmental models of disease transmission. Math Biosci 180(1–2):29–48. https://doi.org/10.1016/S0025-5564(02)00108-6 MathSciNetzbMATHGoogle Scholar
- Vogel T (1961) Systèmes déferlants, systèmes héréditaires, systèmes dynamiques. In: Proceedings of the international symposium nonlinear vibrations, IUTAM, Kiev, pp 123–130Google Scholar
- Vogel T (1965) Théorie des Systèmes Évolutifs. No. 22 in Traité de physique théorique et de physique mathématique, Gauthier-Villars, ParisGoogle Scholar
- Wang N, Han M (2016) Slow-fast dynamics of Hopfield spruce-budworm model with memory effects. Adv Differ Equ 1:73. https://doi.org/10.1186/s13662-016-0804-8 MathSciNetzbMATHGoogle Scholar
- Wearing HJ, Rohani P, Keeling MJ (2005) Appropriate models for the management of infectious diseases. PLOS Med. https://doi.org/10.1371/journal.pmed.0020174 Google Scholar
- Wolkowicz G, Xia H, Ruan S (1997) Competition in the chemostat: a distributed delay model and its global asymptotic behavior. SIAM J Appl Math 57(5):1281–1310. https://doi.org/10.1137/S0036139995289842 MathSciNetzbMATHGoogle Scholar
- Yates CA, Ford MJ, Mort RL (2017) A multi-stage representation of cell proliferation as a Markov process. Bull Math Biol 79(12):2905–2928. https://doi.org/10.1007/s11538-017-0356-4 MathSciNetzbMATHGoogle Scholar

## Copyright information

**Open Access**This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.