Skip to main content
Oxford University Press logoLink to Oxford University Press
. 2022 Dec 13;87(6):1043–1089. doi: 10.1093/imamat/hxac027

Numerical methods and hypoexponential approximations for gamma distributed delay differential equations

Tyler Cassidy 1,, Peter Gillich 2, Antony R Humphries 3, Christiaan H van Dorp 4
PMCID: PMC9850366  PMID: 36691452

Abstract

Gamma distributed delay differential equations (DDEs) arise naturally in many modelling applications. However, appropriate numerical methods for generic gamma distributed DDEs have not previously been implemented. Modellers have therefore resorted to approximating the gamma distribution with an Erlang distribution and using the linear chain technique to derive an equivalent system of ordinary differential equations (ODEs). In this work, we address the lack of appropriate numerical tools for gamma distributed DDEs in two ways. First, we develop a functional continuous Runge–Kutta (FCRK) method to numerically integrate the gamma distributed DDE without resorting to Erlang approximation. We prove the fourth-order convergence of the FCRK method and perform numerical tests to demonstrate the accuracy of the new numerical method. Nevertheless, FCRK methods for infinite delay DDEs are not widely available in existing scientific software packages. As an alternative approach to solving gamma distributed DDEs, we also derive a hypoexponential approximation of the gamma distributed DDE. This hypoexponential approach is a more accurate approximation of the true gamma distributed DDE than the common Erlang approximation but, like the Erlang approximation, can be formulated as a system of ODEs and solved numerically using standard ODE software. Using our FCRK method to provide reference solutions, we show that the common Erlang approximation may produce solutions that are qualitatively different from the underlying gamma distributed DDE. However, the proposed hypoexponential approximations do not have this limitation. Finally, we apply our hypoexponential approximations to perform statistical inference on synthetic epidemiological data to illustrate the utility of the hypoexponential approximation.

Keywords: infinite delay equation, functional continuous Runge–Kutta methods, delay differential equations, linear chain trick

1. Introduction

Gamma distributed delay differential equations (DDEs), generically of the form

graphic file with name DmEquation1.gif (1.1)

have been extensively used in mathematical biology, epidemiology and pharmacometric modelling (Andò et al., 2020; Câmara De Souza et al., 2018; Cassidy, 2021; Champredon et al., 2018; Hu et al., 2018; Hurtado & Kirosingh, 2019; Smith, 2011). These models describe the influence of the past on the current state through the convolution integral

graphic file with name DmEquation2.gif

where Inline graphic is the probability density function (PDF) of the gamma distribution. The initial value problem (1.1) is equipped with initial data in the form of the history function Inline graphic. Typically, Inline graphic, where Inline graphic is a probability measure (Hale & Verduyn Lunel, 1993). The Radon–Nikodym derivative of Inline graphic with respect to Lebesgue measure is the PDF Inline graphic given by

graphic file with name DmEquation3.gif

which is parameterized using the shape and scale parameters, Inline graphic and Inline graphic, respectively. While both these parameters can be positive reals, many authors, when considering applications, artificially restrict Inline graphic to integer values and (1.1) is thus an Erlang distributed DDE. This restriction is useful as these Erlang distributed DDEs can then be reduced to an equivalent system of ordinary differential equations (ODEs) through the linear chain technique (MacDonald, 1978; Vogel, 1961). A major impediment to the implementation of the more general gamma distributed DDE is the lack of appropriate numerical techniques for their simulation (Breda et al., 2016; Diekmann et al., 2018, 2020b). Here, we address this impediment in two distinct manners, first, by implementing a functional continuous Runge–Kutta (FCRK) method to simulate (1.1) and, second, by deriving a finite dimensional approximation of (1.1) that is more accurate than the common Erlang approximation.

Currently, existing numerical tools for the simulation and study of DDEs with finite delays, such as the continuous Runge–Kutta methods described in Bellen et al. (2009) and implemented in major software packages, often perform poorly when the minimal delay is smaller than the numerical solution step-size, a phenomena termed ‘overlapping’. Since the minimal delay in the Gamma-distributed DDE (1.1) is zero, this class of DDEs always exhibits overlapping. FCRK methods naturally and efficiently deal with overlapping, but although they were first proposed in the 1970s (Maset et al., 2005; Tavernini, 1971), they still have not been widely implemented in software packages nor extended to the infinite delay case. In fact, numerical tools for problems with infinite delay have only recently started to be developed. Recent work for problems with infinite delay includes pseudo-spectral techniques (Diekmann et al., 2020b; Gyllenberg et al., 2018), and the development of ODE approximations of the gamma-distributed DDE without enforcing Inline graphic (Koch & Schropp, 2015; Krzyzanski, 2019). Krzyzanski (2019) used the binomial theorem to develop an ODE approximation of a generic gamma distributed DDE. However, this approximation relies on truncating the infinite series expansion of the PDF of the gamma distribution at some finite value. While Krzyzanski (2019) does derive explicit error bounds dependent on the number of terms Inline graphic in the series expansion, the artificial truncation of the convolution integral ensures that the numerical approximation is not consistent. In a related work focused on lifespan distributions, Koch & Schropp (2015) impose a fixed upper bound for the lifespan duration, then subdivide the interval of possible lifespan durations into Inline graphic sub-compartments. The populations in each sub-compartment are weighted according to the probability of a lifespan of that length when calculating the total population size. Once again, this method requires the modeller to determine a fixed upper bound of the lifespan duration and does not capture the full dynamics of the infinite delay DDE. The FCRK method developed in this work explicitly computes the improper convolution integral and eliminates the requirement that modellers impose artificial upper bounds when simulating (1.1). To our knowledge, the FCRK method developed in this work is the first numerical method that does not artificially truncate the infinite delay by imposing artificial bounds. Consequently, the FCRK method derived here is the first consistent numerical method for DDEs with infinite delay; while we focus on gamma distributed DDEs, our method should be straightforward to adapt to other distributed DDEs where the integrand in the convolution integral decays exponentially.

The main difficulty in applying FCRK methods to infinite delay problems is the evaluation of the semi-infinite convolution integral. Our main new contribution to FCRK methods is to demonstrate how to do this both accurately and efficiently. To achieve this, we derive a novel change of variable to map the semi-infinite domain of integration to a compact interval. While many changes of variables exist to map semi-infinite to compact domains of integration, our approach is derived to conserve sufficient regularity and therefore ensure the accuracy of our numerical method. In particular, we derive explicit conditions to ensure sufficient regularity of the transformed integrand that depend only on the parameters of the PDF Inline graphic. Then, existing composite Newton–Cotes methods are utilized to numerically calculate the transformed convolution integral and thus efficiently evaluate the right-hand side of (1.1). To ensure the accuracy of the FCRK method, we derive order conditions on the quadrature method which allow us to evaluate the integrals just sufficiently accurately to maintain the global order of the FCRK method. In particular, we establish an explicit relationship between the stepsize of the FCRK method and the stepsize of the quadrature method. We prove the fourth-order convergence of our FCRK method in Theorem 2.1 and Appendix C and demonstrate the accuracy of our FCRK method through a number of examples in Section 4.1.

Inspired by the lack of readily available appropriate numerical methods for problems such as (1.1), there has also been considerable interest in approximating infinite delay DDEs by forms that are more convenient for simulation (Cassidy et al., 2019; Diekmann et al., 2018, 2020a; Hurtado & Kirosingh, 2019; Koch & Schropp, 2015; Krzyzanski, 2019). The most well-known of these is the previously mentioned linear chain technique, wherein modellers often make the simplifying assumption that Inline graphic when implementing gamma distributed DDE models. We refer to this assumption as the Erlang approximation. However, this assumption imposes constraints on the sample mean and variance of the delayed process. Typically, for a general gamma-distributed random variable with mean Inline graphic and variance Inline graphic, modellers impose Inline graphic, where Inline graphic rounds Inline graphic to the nearest integer with Inline graphic (Cassidy & Craig, 2019; Jenner et al., 2021). As a result, it is only possible to fit one of these statistics with an Erlang distribution, as the system

graphic file with name DmEquation4.gif

only admits a solution if Inline graphic which corresponds to Inline graphic

In light of this limitation of the Erlang approximation, recent work has explored using phase type distributions to approximate generic distributed DDEs. These phase-type distributed DDEs are then reduced to a system of ODEs through a variant of the linear chain technique (Cassidy, 2021; Hurtado & Richards, 2020; Hurtado & Kirosingh, 2019). These phase-type distributions approximate the underlying distribution either by minimizing some distance measurement between distributions or by matching moments of the underlying distribution. We take the latter approach when developing a novel hypoexponential approximation of the generic gamma distributed DDE (1.1). Existing work has identified the ‘reachable’ bounds in moment space and the minimal number of phases required to match the first three moments of the underlying distribution using phase type distributions (Bobbio et al., 2005; Johnson & Taaffe, 1989, 1990). However, in general, it may not be possible to match the first three moments, and even if it is possible, the required number of phases can be arbitrarily high (Osogami & Harchol-Balter, 2006). In fact, we prove in Theorem 3.3 that it is not possible to match three or more moments of a generic gamma distribution using purely hypoexponential distributions. Accordingly, we only match the first two moments of the underlying gamma distribution. We match the first two moments without imposing any restrictions on their values, and the parameters of our approximating phase-type distribution are entirely determined by the mean and variance of the underlying distribution. Moreover, our approximation is exact if the underlying distribution is Erlang.

To achieve this two moment matching, we derive explicit rates of the hypoexponential approximation to match the first two moments of a given gamma distribution and then derive the equivalent system of ODEs. These ODE models are simple to study numerically and have the added benefit of being easy to implement in scientific software packages and explain for scientific collaborators. Furthermore, we leverage our FCRK method to simulate (1.1) and thus explicitly evaluate the accuracy of our hypoexponential approximation by comparison against solutions obtained from our FCRK method, which has not been done in prior work. As we will show, our approximation more accurately captures the dynamics of the underlying gamma distributed DDE than the Erlang approximation obtained by setting Inline graphic while being as simple to implement in existing scientific software as the common Erlang approximation.

Finally, we apply our hypoexponential approximation to the problem of statistical inference. Erlang delay models are often used in epidemiology of infectious diseases (Champredon et al., 2018; Greenhalgh & Rozins, 2021; Rozhnova et al., 2021; Sanche et al., 2020) but also in many other fields (Câmara De Souza et al., 2018; Cassidy, 2021; Cassidy & Humphries, 2019; Gossel et al., 2017). A common approach is to define an epidemiological model in terms of ODEs and estimate parameters by fitting the model to disease incidence data. One key parameter, the basic reproduction number Inline graphic, is closely related to the generation interval (or it is proxy the serial interval), the initial exponential growth rate of the epidemic and time to recovery Inline graphic (Roberts & Heesterbeek, 2007). This relationship depends not only on the mean infectious period Inline graphic but also on the distribution of this period. Therefore, making invalid assumptions about this distribution can lead to spurious estimates of, e.g., Inline graphic and the corresponding critical vaccination coverage. The same argument holds for other intervals with randomly distributed durations such as the duration of the period that an individual has been exposed, but is not yet infectious (Inline graphic).

In practice, the random times Inline graphic and Inline graphic are often assumed to be Inline graphic-distributed so that the DDEs can simply be implemented as ODEs using the linear chain technique. This is convenient because ODE models are easy to implement in commonly used software packages for statistical inference (Carpenter et al., 2017), whereas support for DDE models is much less common and often restricted to an Erlang distributed or fixed delays (Lixoft, 2019; Raue et al., 2014, 2009). Apart from convenience, there is no reason to assume that the distributions of Inline graphic and Inline graphic should be Inline graphic instead of gamma distributions. The hypoexponential approximation of the gamma distribution proposed here still allows for an ODE approximation of the DDE model but removes the need to assume that the shape Inline graphic parameter is an integer.

Another purely practical reason for using the hypoexponential approximation of the gamma distribution instead of an Inline graphic distribution is that estimating the integer shape parameter Inline graphic of the Erlang distribution can be inconvenient in some software packages. For instance, in the commonly used package for Bayesian inference Stan (Carpenter et al., 2017), the estimated parameters have to be real-valued due to the limitations imposed by the Hamiltonian Monte-Carlo method. Accordingly, to estimate an integer valued Inline graphic, modellers must repeat the analysis for multiple fixed values of Inline graphic and compare the results with Bayes factors or information criteria as LOO-IC or WAIC (Vehtari et al., 2017). This extra step, and the resulting extra computation, can be avoided if Inline graphic is allowed to be real-valued and estimated by the software package, as when using either the FCRK method or the approximation derived in this work. However, updating existing scientific software to use our FCRK method would be much more time-consuming than using our hypoexponential approximation. Consequently, we implement the hypoexponential approximation in Stan and use the resulting ODE system for statistical inference of epidemiological parameters and evidence synthesis, thus illustrating a simple application of the hypoexponential approximation derived in this work.

The remainder of the article is structured as follows. We begin by developing a numerical method to simulate the general gamma distributed DDE by using the theory of FCRK methods to address overlapping in the convolution integral in Section 2. We then give sufficient conditions to ensure that our evaluation of the semi-infinite convolution integral conserves the accuracy of the underlying FCRK method by proving the convergence of our method in Section 2.1.1 and Appendix C. Next, in Section 3, we develop our hypoexponential approximation by considering a more generic concatenation of exponentially distributed waiting times than the Erlang distribution and allowing for the rate parameters to vary between compartments. In Section 3.2, we derive explicit expressions of these rates that replicate the first and second moments of the gamma distribution in (1.1). Turning to numerical results, we confirm that the FCRK method derived in Section 2 performs to the proven accuracy in Section 4.1. Then, by leveraging the numerical simulation of the gamma distributed DDE (1.1), we show that the hypoexponential approximation outperforms the common Erlang approximation of the underlying gamma-distributed DDE in Section 4.2. The comparison between the Erlang and hypoexponential approximations against the true solution of the distributed DDE obtained via our FCRK method has not been performed previously. As the most striking illustration, we show in Section 4.2.1 that the Erlang-distributed DDE does not necessarily replicate the qualitative properties of the underlying gamma-distributed DDE. Finally, we illustrate how to implement the hypoexponential approximation to estimate the parameters of an epidemiological model in Stan in Section 5 before finishing with a brief discussion.

1.1 Notation and assumptions

Choosing an appropriate state space for DDEs with infinite delay can be subtle (Cassidy & Humphries, 2019; Hale & Verduyn Lunel, 1993). Here, for fixed Inline graphic, we follow Diekmann & Gyllenberg (2012); Gyllenberg et al. (2018); Hino et al. (1991) and consider the state space Inline graphic given by

graphic file with name DmEquation5.gif (1.2)

Inline graphic is a Banach space under the norm

graphic file with name DmEquation6.gif

In practice, we take Inline graphic so that the convolution integral in (1.1) converges at time Inline graphic.

The IVP (1.1) has a unique solution Inline graphic if Inline graphic is globally Lipschitz (Diekmann & Gyllenberg, 2012). We immediately obtain that the solution Inline graphic is continuous on Inline graphic. However, to establish the accuracy of the FCRK method, we require further differentiability of the solution Inline graphic, and consequently, the function Inline graphic. In general, the convolution integral in (1.1) smooths the initial function Inline graphic for Inline graphic, as the kernel Inline graphic is analytic, and ensures that the only possible breaking point is Inline graphic. Then, if the function Inline graphic is Inline graphic-times differentiable, Inline graphic is Inline graphic times differentiable for Inline graphic

Throughout the paper, we use the following notation. If Inline graphic, then the ceiling and floor of Inline graphic are defined as Inline graphic and Inline graphic, respectively. The fractional part of Inline graphic is denoted Inline graphic. The nearest integer to Inline graphic is denoted Inline graphic. We parameterize the gamma distribution with shape and rate parameters and denote a gamma distribution with shape parameter Inline graphic and rate parameter Inline graphic by Inline graphic. Hence, when a random variable Inline graphic, then Inline graphic has mean Inline graphic and variance Inline graphic. Similarily, we denote a hypoexponential distribution with rates Inline graphic by Inline graphic. Finally, we denote the function segment Inline graphic for Inline graphic.

2. FCRK methods

Most existing numerical methods for DDEs have been adapted from known numerical methods for ODEs (Bellen et al., 2009; Enright & Hayashi, 1997; Eremin, 2016; Vermiglio, 1988). For a given stepsize Inline graphic and integration mesh given by Inline graphic, these continuous Runge–Kutta (CRK) methods are designed to output a continuous function over the delay interval. This continuous function is then used to evaluate the solution at the abscissa Inline graphic of the RK method, which is necessary for accurate evaluation of the intermediate functions in each CRK step, since these fall at time points Inline graphic which typically do not fall on the integration mesh. This illustrates another difficulty with CRK methods: when the delay Inline graphic is smaller than the stepsize Inline graphic, as if Inline graphic, then overlapping will occur, i.e. the Inline graphicst step will require knowledge of the solution in the current step (Eremin, 2019; Eremin et al., 2020), and the method can no longer be explicit. Overlapping is inevitable when solving (1.1) since the convolution integral in (1.1) requires knowledge of the solution Inline graphic on the entire semi-infinite interval Inline graphic.

A class of methods, now called FCRK methods, has been developed which have a continuous interpolant associated with each stage of the Runge–Kutta method, allowing for the construction of methods which remain explicit even in the case of overlapping. Such methods were first proposed in the 1970s (Cryer & Tavernini, 1972; Tavernini, 1971), with the convergence theory and construction of explicit methods up to order 4 derived in the 2000s (Bellen et al., 2009; Maset et al., 2005). However, the development of the methods to that point had been purely theoretical, and the works cited above do not contain any implementations or numerical simulations. FCRK methods have recently been implemented for distributed DDEs with possibly time dependent, but finite, delay (Eremin, 2019; Langlois et al., 2017). To our knowledge, Langlois et al. (2017) was the first instance of applying these FCRK methods to explicitly simulate a distributed DDE arising in mathematical biology. Here, we implement a fourth-order FCRK method for the infinite delay initial value problem (1.1). In what follows, we consider fixed time step methods and leave the variable time step case to future work.

Following Definition 6.1 of Bellen et al. (2009), we define an s-stage FCRK method as follows.

Definition 2.1.  Inline graphic-stage FCRK method —

A Inline graphic-stage  FCRK method is a triple Inline graphic such that Inline graphic and Inline graphic are polynomial functions into Inline graphic and Inline graphic, respectively, with Inline graphic and Inline graphic, and Inline graphic with Inline graphic

It is customary to represent a Inline graphic-stage FCRK method Inline graphic by its Butcher tableau

graphic file with name DmEquation7.gif

where Inline graphic and Inline graphic and Inline graphic are the components of Inline graphic and Inline graphic Now, for a given step size Inline graphic, the Inline graphic-stage FCRK method creates a continuous approximation Inline graphic to the solution of the IVP (1.1) Inline graphic through

graphic file with name DmEquation8.gif (2.1)

The stage interpolant Inline graphic is a continuous approximation of the solution Inline graphic defined by

graphic file with name DmEquation9.gif (2.2)

where

graphic file with name DmEquation10.gif (2.3)

are the stage variables, Inline graphic represents the numerical approximation of the solution up to the current stage and Inline graphic is the continuous approximation of Inline graphic in the stage given by

graphic file with name DmEquation11.gif

Thus, the piecewise interpolants Inline graphic agree with Inline graphic at the collocation points Inline graphic and define the piecewise continuous polynominal function Inline graphic. For (1.1) with history function Inline graphic and stepsize Inline graphic computed up to Inline graphic, the local error function is given by

graphic file with name DmEquation12.gif

The uniform and discrete order of an FCRK method are intrinsically related to this local error function (see Equation (1.2) and Definition 4.1 in Maset et al. (2005)). The uniform order of an FCRK method is the maximal error incurred over a single time step:

Definition 2.2.  Uniform order. —

Let Inline graphic be a positive integer and let Inline graphic be the approximation of the solution Inline graphic of an IVP with sufficiently smooth right hand side obtained using an FCRK method with step size Inline graphic. The FCRK method has uniform order Inline graphic if


Definition 2.2.

Conversely, the discrete order is the error incurred at the collocation points Inline graphic, which corresponds to Inline graphic in the definition of Inline graphic:

Definition 2.3. Discrete order. —

Let Inline graphic be a positive integer and let Inline graphic be the approximation of the solution Inline graphic of an IVP with sufficiently smooth right-hand side obtained using an FCRK method with step size Inline graphic. The FCRK method has discrete order Inline graphic if


Definition 2.3.

Finally, the global order of the numerical method is the absolute error incurred throughout the simulation when considering the solution Inline graphic and Inline graphic as continuous functions on the interval Inline graphic.

Definition 2.4. Global order. —

A Inline graphic-stage method has global order Inline graphic if


Definition 2.4.

The connection between the local error measurements given in Definitions 2.2 and 2.3 and the global order of an FCRK method is considered by Bellen & Zennaro (2013) and Bellen et al. (2009). Explicitly, if the Inline graphic-stage method has global order Inline graphic on Inline graphic, then Inline graphic is a Inline graphicth order approximation of Inline graphic as

graphic file with name DmEquation16.gif

In what follows, we use the fourth-order explicit FCRK method due to Tavernini (1971) with global fourth order and Butcher tableau given by (Bellen et al., 2009)

graphic file with name DmEquation17.gif (2.4)

although our results hold for other FCRK schemes.

2.1 Numerical quadrature

In theory, FCRK methods are directly applicable to the infinite delay case (1.1). However, in practice, a s-stage FCRK method implicitly assumes the ability to accurately calculate the right-hand side of equation (1.1). Accordingly, the main difficulty in numerically simulating (1.1) is the numerical calculation of the improper convolution integral

graphic file with name DmEquation18.gif

appearing in (2.3).

Most numerical quadrature methods are designed for a compact domain of integration. However, artificially truncating the convolution integral in (1.1) would introduce unnecessary error while simultaneously ensuring that the FCRK method is not consistent as the quadrature stepsize, Inline graphic, converges to 0. Thus, to compute the convolution integral, we map the semi-infinite domain of integration to the compact set Inline graphic through the change of variables

graphic file with name DmEquation19.gif

where Inline graphic and Inline graphic are two parameters determined later. The improper integral then becomes

graphic file with name DmEquation20.gif (2.5)

In general, we require a Inline graphic times continuously differentiable integrand for a Inline graphicth order composite Newton–Cotes quadrature method to obtain Inline graphicth order accuracy. To ensure that our change of variable does not prohibit achieving such accuracy, we show how to choose the positive constants Inline graphic and Inline graphic to ensure that the transformed integrand is sufficiently smooth for our numerical integration techniques. This requirement is naturally dependent on the smoothness of the solution Inline graphic and the history function Inline graphic Furthermore, even if Inline graphic is differentiable, it is likely that

graphic file with name DmEquation21.gif

where the superscripts denote limits from the left and right, so the solution Inline graphic is not continuously differentiable at Inline graphic (Bellen et al., 2009). Accordingly, when implementing a numerical quadrature method, we will enforce that transformed initial point Inline graphic is part of the integration mesh. We now show how to choose Inline graphic and Inline graphic to ensure that the integrand is sufficiently smooth away from this breaking point.

Lemma 2.1.

Assume that Inline graphic is Inline graphic times differentiable and set


Lemma 2.1. (2.6)

Then, Inline graphic is Inline graphic times differentiable in Inline graphic for Inline graphic. Furthermore, if the Inline graphicth derivative of Inline graphic, Inline graphic, is bounded for Inline graphic, then there exists Inline graphic such that


Lemma 2.1.

for Inline graphic.

The proof of Lemma 2.1 is straightforward and follows from the rapid decay of Inline graphic at Inline graphic. This decay, along with the fact that the history function Inline graphic belongs to the function space Inline graphic for Inline graphic, ensures that Inline graphic as Inline graphic. We give the full proof in Appendix A. In practice, we use the fifth-order open composite Simpson’s rule, which is the fifth-order composite open Newton–Cotes method, and require the integrand to have a bounded fourth derivative. Therefore, when implementing the FCRK method, we apply (2.6) with Inline graphic. When evaluating the numerical approximation of the convolution integral (2.5), we avoid the mesh points Inline graphic where the interpolant is continuous but not differentiable by ensuring these points are in the integration mesh. Finally, it is known that solutions of DDEs typically have discontinuous derivatives at breaking points. However, when considering a distributed DDE such as (1.1), we can leverage the additional smoothing offered by the convolution integral and only must ensure that Inline graphic is in the integration mesh at each time point (Eremin et al., 2020).

After the change of integration variable, with Inline graphic and Inline graphic chosen as in (2.6), solving the IVP (1.1) is equivalent to solving

graphic file with name DmEquation24.gif (2.7)

We recall that Inline graphic depends explicitly on the solution Inline graphic through the definition (2.5). Finally, while we only consider fixed time step FCRK methods in this work, using variable time step methods on the reformulated IVP (2.7) is possible.

Then, to simulate (2.7) using an FCRK method, we must numerically evaluate the convolution integral

graphic file with name DmEquation25.gif (2.8)

where we note that the integrand is depends explicitly on the solution of (2.7).

2.1.1 Quadrature rules and order conditions

As we are developing an FCRK method to numerically integrate (2.7), we will not evaluate the transformed convolution integral (2.8) exactly. Rather, as mentioned, we will use a quadrature method to numerically evaluate the integral to sufficient accuracy to maintain the global order of the FCRK method. Specifically, we consider an FCRK method of global order Inline graphic so that the interpolant (2.1) is accurate to order Inline graphic on each stage. We thus have

graphic file with name DmEquation26.gif

Therefore, if we were to calculate the convolution integral (2.8) exactly, then we would evaluate the right-hand side of (2.7) to order Inline graphic. In each RK stage, the evaluations of Inline graphic occur within the calculation of Inline graphic, so we gain an extra order of accuracy via the multiplication by Inline graphic in (2.2). Then, the local error in each step of the numerical method has order Inline graphic as required, with the extra order coming from the multiplication by Inline graphic.

However, in practice, we cannot evaluate the convolution integral (2.8) exactly, and nor would we want to do so. Indeed, as the numerical solution Inline graphic is only a Inline graphic-th order approximation of the true solution Inline graphic, it is not computationally efficient to evaluate the convolution integral Inline graphic to extreme precision. Thus, the numerical integration should be sufficiently accurate to preserve the global order of the method, but not so accurate as to be computationally inefficient. To illustrate this idea, assume that we evaluate the integral (2.8) to order Inline graphic using a composite quadrature method with stepsize Inline graphic, so

graphic file with name DmEquation27.gif

where Inline graphic denotes the quadrature approximation of the convolution integral. Now, consider an FCRK method of order Inline graphic with coefficients Inline graphic and stepsize Inline graphic. Using Taylor’s theorem, we see that

graphic file with name DmEquation28.gif

where Inline graphic is the partial derivative of Inline graphic with respect to the second variable. Therefore, the first stage step Inline graphic is calculated with the same accuracy as the numerical integration. We can thus proceed inductively to calculate each Inline graphic and Inline graphic with accuracy Inline graphic. Accordingly, for the continuous approximation Inline graphic of the solution Inline graphic, equation (2.2) gives

graphic file with name DmEquation29.gif

Thus, if Inline graphic for some constant Inline graphic, then Inline graphic. Therefore, the condition Inline graphic ensures that we do neither decrease the accuracy of the scheme nor perform extra computations when numerically integrating (2.8) using a Inline graphicth order quadrature rule.

Finally, we note that the integrand in (2.8) is not defined at Inline graphic. Accordingly, we use an open quadrature method so that the end points of the domain of integration, Inline graphic and Inline graphic, are not included. In particular, we use the composite Simpson’s open rule for which the base method is given by

graphic file with name DmEquation30.gif

where Inline graphic. We note that the integrand of (2.8) must be sufficiently smooth inside each integration sub-interval to ensure the composite order. As previously mentioned, Inline graphic is a potential breaking point of the distributed DDE. Therefore, we must enforce that Inline graphic is as an end-point of one of the sub-intervals at each step Inline graphic by including

graphic file with name DmEquation31.gif

in the quadrature mesh. Furthermore, since Inline graphic is only Inline graphic at the mesh points Inline graphic preceding the current step Inline graphic, we include the transformed mesh points Inline graphic in the integration mesh. These points may not be evenly spaced in Inline graphic, and so, the composite Simpson’s open rule does not use a uniform step size Inline graphic to partition Inline graphic. To ensure the global accuracy of the FCRK method, it is sufficient to divide Inline graphic into sub-intervals of maximal length Inline graphic. The composite quadrature rule therefore has error Inline graphic and is sufficiently accurate to maintain the global error of the fourth-order FCRK methods considered here. Indeed, we utilize results from Bellen et al. (2009); Maset et al. (2005) to prove the following result in Appendix C

Theorem 2.1. Global order of the FCRK method —

Assume that the right-hand side of (1.1) is 4 times continuously differentiable and let Inline graphic be the explicit FCRK method with global fourth order defined in (2.4). Furthermore, let the simulation mesh include all breaking points of the DDE (1.1) and have maximal stepsize Inline graphic, and calculate the convolution integral Inline graphic using the composite Simpson’s open rule with maximal sub-interval size of Inline graphic. Then, the FCRK method has global order 4.

3. ODE approximations

In Section 2, we developed a numerical method to solve the distributed DDE (1.1). As mentioned, numerical methods for distributed DDEs are computationally demanding, complicated and as a result, not available in most off-the-shelf scientific software packages. Therefore, we discuss a common method by which modellers avoid these difficulties via an Erlang approximation of (1.1) before deriving a new phase-type approximation of (1.1).

3.1 Erlang approximation

In many modelling applications, it is common to avoid the difficulties in simulating (1.1) by enforcing that Inline graphic. As previously mentioned, the case Inline graphic corresponds to Inline graphic, where Inline graphic and Inline graphic are the mean and variance of the underlying gamma distribution. As Inline graphic being an integer multiple of Inline graphic is not generic, it is common to round Inline graphic to the nearest integer Inline graphic and then set the rate parameter Inline graphic. This approximation allows modellers to replace the gamma distributed delay with an Erlang distribution and thus approximate (1.1) by the Erlang distributed DDE

graphic file with name DmEquation32.gif (3.1)

The Erlang-distributed random variable Inline graphic with shape and rate parameters Inline graphic and Inline graphic, respectively, has precisely the same mean Inline graphic as the random variable in (1.1), but not the same variance. Then, it is a simple application of the linear chain technique—where the convolution integral is written as the solution to a system of differential equations—to obtain the equivalent ODE formulation to (3.1)

graphic file with name DmEquation33.gif (3.2)

3.2 Hypoexponenetial approximations

The approximation involved in the linear chain technique described previously replaces the gamma-distributed convolution integral with an Erlang distributed convolution integral parameterized to match the first moment of the original gamma distribution. Here, we develop an improved approximation technique to approximate the gamma-distributed DDE (1.1) by constructing a random variable Inline graphic with corresponding probability measure Inline graphic that matches the first two moments of the original gamma distribution and considering the corresponding distributed DDE

graphic file with name DmEquation34.gif (3.3)

We construct Inline graphic such that it represents the concatenation of exponentially distributed random variables, so it is a phase-type distribution, and we show that (3.3) admits a finite dimensional representation. We then derive the equivalent ODE formulation to (3.3) and show that this approximation is more accurate than the approximation in (3.1). There are infinitely many such random variables Inline graphic and we consider two specific cases. We discuss the benefits of each approximation in Section 3.4.

3.2.1 The fixed hypoexponential approximation

We begin by deriving the rates of the exponentially distributed random variables whose concatenation is the random variable Inline graphic, where Inline graphic is the concatenation of an Erlang distribution with two exponential distributions. We parametrize the Erlang distribution so that the rates of the Erlang distribution are fixed as the fractional part of Inline graphic varies. Accordingly, we refer to this approximation as the fixed hypoexponential approximation, with corresponding random probability measure Inline graphic.

Theorem 3.1.

Consider the gamma distributed random variable Inline graphic with shape parameter Inline graphic, mean Inline graphic and variance Inline graphic. Let Inline graphic be the random variable obtained by concatenating Inline graphic independent and exponentially distributed variables where Inline graphic of these exponentially distributed random variables have identical rates


Theorem 3.1.

while the remaining two exponentially distributed variables have rates Inline graphic and Inline graphic. Then, setting


Theorem 3.1.

and


Theorem 3.1.

ensures that Inline graphic and Inline graphic have the same first two moments.

Proof.

The moment generating function (MGF) Inline graphic of the random variable Inline graphic is given by


Proof.

The mean Inline graphic and variance Inline graphic of Inline graphic are therefore


Proof.

Recalling that


Proof.

and setting Inline graphic and Inline graphic, gives


Proof.

From this, Inline graphic must solve


Proof.

By symmetry, Inline graphic must be the other root of this polynomial. Hence, we obtain


Proof.

which ensures that the random variable Inline graphic matches the first two moments of the gamma distribution.

When Inline graphic, the square roots in the definition of Inline graphic and Inline graphic vanish identically, leading to the following Corollary.

Corollary 3.1.

If the gamma-distributed random variable Inline graphic has integer shape parameter Inline graphic, then the random variable Inline graphic defined in Theorem 3.1 is also Erlang distributed and Inline graphic for Inline graphic.

3.2.2 A smoothed hypoexponential approximation

The parametrization of the hypoexponential distribution in Theorem 3.1 is determined by the choice of Inline graphic and is therefore not unique. Here, we derive a slightly different parameterization of the hypoexponential approximation. This alternative approximation has benefits and a disadvantage compared with the fixed hypoexponential approximation, which we discuss below.

Again, denote the mean of the gamma-distributed random variable Inline graphic by Inline graphic and let Inline graphic denote the shape parameter. Now we define a second hypoexponentially distributed random variable Inline graphic with the same mean and variance as Inline graphic. We once again use a concatenation of an Erlang distribution with two exponential distributions. Here, unlike the fixed approximation described in Theorem 3.1, the rate of the Erlang distribution varies continuously as the fractional part of Inline graphic changes. We therefore refer to this approximation as the smoothed hypoexponential approximation, with corresponding probability measure Inline graphic.

Theorem 3.2.

Let Inline graphic be a Inline graphic-distributed random variable where Inline graphic. Consider the hypoexponentially distributed random variable Inline graphic with rate parameters Inline graphic. Recalling that Inline graphic as Inline graphic, set Inline graphic, and define Inline graphic and Inline graphic by


Theorem 3.2. (3.4)

If Inline graphic, then we define Inline graphic. Then, Inline graphic and Inline graphic have the first two moments.

The proof of Theorem 3.2 is similar to the proof of Theorem 3.1 and is given in Appendix B. We note that we use the term smooth when describing the smoothed hypoexpoential approximation of Inline graphic to refer to the continuous dependence of Inline graphic on Inline graphic and not in the infinitely differentiable sense. Once again, if Inline graphic is an integer, it follows from the definition that the smoothed hypoexponential approximation is exact.

3.3 ODE representation of the hypoexponential DDE

The random variables Inline graphic and Inline graphic as defined in Theorems 3.1 and 3.2 correspond to the concatenation or addition of Inline graphic exponentially distributed random variables. As the derivation that follows is identical for the smoothed and fixed approximations, we drop the indices Inline graphic and Inline graphic. The PDF of the hypoexponential distributions is obtained by convolving the PDFs of an Erlang distributed random variable with rate Inline graphic and shape parameter Inline graphic, and the two exponentially distributed random variables with respective rates Inline graphic and Inline graphic, where the rates are given explicitly in Theorems 3.1 and 3.2. The exponential distributions have respective PDFs Inline graphic and Inline graphic. Then, the delayed term in (3.3) is given by the convolution integral

graphic file with name DmEquation45.gif

where Inline graphic. The convolution integral

graphic file with name DmEquation46.gif

will satisfy a system of Inline graphic ODEs in a similar manner to the linear chain technique (Cassidy, 2021; Diekmann et al., 2018, 2020a). To show that this is indeed the case, we introduce Inline graphic auxiliary variables Inline graphic satisfying

graphic file with name DmEquation47.gif

with initial conditions

graphic file with name DmEquation48.gif

and

graphic file with name DmEquation49.gif

Then, using the linear chain technique on the Erlang-distributed variables Inline graphic for Inline graphic, we see

graphic file with name DmEquation50.gif

Then, an application of the main result in (Cassidy, 2021) shows that

graphic file with name DmEquation51.gif

It follows from the associativity of convolution that

graphic file with name DmEquation52.gif

Therefore, the distributed DDE (3.3) is equivalent to the Inline graphic dimensional system of ODEs

graphic file with name DmEquation53.gif (3.5)

where the rates Inline graphic and Inline graphic are taken from the fixed or smooth hypoexponential approximation.

3.4 A comparison between fixed and smooth hypoexponential approximations

The rates Inline graphic and Inline graphic determine the expected residence time in the Inline graphicst and Inline graphicth compartments. Now, if these rates were to grow arbitrarily large, then the expected residence time would become arbitrarily small and the system of differential equations would become stiff. Furthermore, the dynamical system obtained from the gamma-distributed DDE has interesting behaviour as a function of the shape parameter Inline graphic. For Inline graphic we expect the gamma-distributed DDE to define an infinite dimensional dynamical system. However, when Inline graphic the gamma-distributed DDE can be reduced to a finite dimensional system of ODEs through the linear chain technique as detailed in Section 3.1. Assuming continuous dependence of dynamics on the parameter Inline graphic, as Inline graphic the gamma-distributed DDE approaches a transit compartment model with Inline graphic compartments. However, both the fixed and smoothed approximations are equivalent to transit compartment models with Inline graphic compartments. Thus, it is possible that the residence time in the final compartment becomes arbitrarily small so that the extra compartment in the hypoexponential approximation is negligible at the cost of the ODE system becoming stiff.

To formalize this argument, consider the limit of Inline graphic and the fixed hypoexponential distribution. Then, Inline graphic and Inline graphic must simultaneously satisfy

graphic file with name DmEquation54.gif

which is only possible if Inline graphic It is simple to show that, if Inline graphic the rates Inline graphic and Inline graphic are bounded from above so that this stiffness only occurs when Inline graphic for the fixed hypoexponential distribution.

Now, consider the smoothed approximation and Inline graphic for each integer Inline graphic. We immediately see that the rate Inline graphic can become arbitrary large in the limit, and the system of ODEs becomes stiff. In addition, as Inline graphic, the argument of the square roots Inline graphic in (3.4) approaches Inline graphic, and the derivative of Inline graphic becomes arbitrarily large as Inline graphic. This is problematic for optimization methods that require the gradient of the objective function. To circumvent these singularities in the smooth hypoexponential approximation, we slightly modify (3.4) by replacing Inline graphic and Inline graphic by Inline graphic and Inline graphic, defined by

graphic file with name DmEquation55.gif

where Inline graphic is a small constant. By choosing Inline graphic, the practitioner can now trade-off the size of the discontinuities of the objective function at integer values of Inline graphic, with the level of stiffness of the resulting ODEs. As we will see in Section 5, for statistical inference, one often needs to optimize an objective function which depends on the solution of a DDE (1.1) at certain time points Inline graphic. For many optimization algorithms, it helps if the objective function depends smoothly on the model parameters, including Inline graphic, and so using the smoothed hypoexponential in these scenarios may be advantageous.

Furthermore, we note that the approximations in Theorems 3.1 and 3.2 are approximations of the semi-infinite convolution integral in (1.1). To compare the hypoexponential approximations against the true gamma distribution, we first consider the survival function of the gamma distribution with mean Inline graphic and shape parameter Inline graphic which is given by

graphic file with name DmEquation56.gif

We also compute the survival functions corresponding to the fixed and smoothed hypoexponential approximations of the gamma distribution with mean Inline graphic and shape parameter Inline graphic  

graphic file with name DmEquation57.gif (3.6)

We plot Inline graphic and Inline graphic in Fig. 1 to illustrate the difference between the fixed and smoothed hypoexponential approximations. We do not present Inline graphic as it overlaps the two approximations. Furthermore, for fixed Inline graphic it is possible to view Inline graphic and Inline graphic as functions of Inline graphic. In Fig. 1 (B), we show this function for both approximations and the exact solution. For the fixed hypoexponential approximation (derived in Theorem 3.1Inline graphic, we generally lose continuous dependence on the parameter Inline graphic at integer values as the rates of the Erlang distribution Inline graphic do not vary continuously but rather jump as Inline graphic crosses each integer. However, using the smoothed hypoexponential parameterization, the rates Inline graphic vary continuously with Inline graphic which appears to reduce the size of jumps at integer values of Inline graphic. However, an analytical study of these jumps is beyond the scope of the current work.

Fig. 1.


Fig. 1.

Trajectory dependence on the shape parameter Inline graphic is not smooth. (A) The trajectory Inline graphic and Inline graphic for Inline graphic calculated with the fixed (black) and smoothed (red) hypoexponential approximations in (3.6). The exact solution Inline graphic is not shown as it overlaps with the two curves. (B) The graph of Inline graphic with Inline graphic, using the fixed (black) and smoothed (red) parameterizations of the hypoexponential approximation, and the exact solution (blue).

3.5 Approximation error estimates

The natural phase space for distributed DDEs such as (1.1) or (3.3) is the space of exponentially weighted functions Inline graphic (Cassidy, 2021; Diekmann & Gyllenberg, 2012). In general, solutions evolving from the space of Inline graphic measurable functions remain integrable with respect to Inline graphic (Cassidy & Humphries, 2019; Hale, 1974).

Now, for the rate parameter of the gamma distribution given by Inline graphic, solutions of the gamma-distributed DDE will satisfy the growth bound in (1.2) with Inline graphic. Furthermore, solutions Inline graphic of linear gamma-distributed DDE (1.1) are of the form Inline graphic with Inline graphic. To illustrate the increased accuracy offered by the hypoexponential approximation, we use this linear case to derive explicit bounds for the approximation error induced by replacing the gamma distribution in (1.1) by an Erlang distribution as in (3.1) or by the hypoexponential approximation in (3.3). In both cases, we will express the approximation error as the difference of the MGFs evaluated at Inline graphic and we will see that the hypoexponential approximation has one fewer term than the Erlang approximation.

3.5.1 Erlang-distributed DDE

In the Erlang approximation described in Section 3.1, we approximated the convolution integral in the gamma-distributed DDE

graphic file with name DmEquation58.gif

where Inline graphic is the rate of the approximating Erlang distribution, and the Erlang-distributed DDE (3.1) is otherwise identical to (1.1). Thus, to compute the error induced by this approximation, we consider the difference between the convolution integrals where Inline graphic  

graphic file with name DmEquation59.gif

We immediately obtain

graphic file with name DmEquation60.gif

where the MGF of the gamma-distributed random variable is given by

graphic file with name DmEquation61.gif

and Inline graphic is the MGF of the Erlang distribution

graphic file with name DmEquation62.gif

Then,

graphic file with name DmEquation63.gif (3.7)

Using the binomial theorem and the fact that the Erlang distribution is parameterized so that the first moment matches that of the gamma distribution, we can write the numerator in (3.7) as

graphic file with name DmEquation64.gif

Thus, the approximation error in the Erlang approximation case (see Section 3.1) is order Inline graphic. We see from the above analysis that if Inline graphic, then (3.7) is identically 0 and the approximation is exact.

3.5.2 Hypoexponential approximations

Turning to the two moment approximations derived in Theorems 3.1 and 3.2, we see that the approximation error induced by integrating with respect to the random variable Inline graphic  is given by

graphic file with name DmEquation65.gif

Then, we obtain

graphic file with name DmEquation66.gif (3.8)

where Inline graphic is the MGF of the random variable Inline graphic and is given by

graphic file with name DmEquation67.gif

Then, we see

graphic file with name DmEquation68.gif (3.9)

By recalling that Inline graphic and the fact that the first two moments agree, we use the binomial theorem to write the numerator in (3.9) as

graphic file with name DmEquation69.gif

Now, recalling that Inline graphic and Inline graphic, we have

graphic file with name DmEquation70.gif

Thus, as Inline graphic and Inline graphic are entirely determined by the mean and variance of the gamma distribution, we can write the error (3.8) as

graphic file with name DmEquation71.gif

where Inline graphic Accordingly, we see that the approximation error is order Inline graphic, or one order better than the Erlang-distributed DDE approximation. We also see that for Inline graphic as Inline graphic as in Section 3.2, Inline graphic so (3.9) is identically 0, and the approximation is exact.

3.6 On three moment matching

The ODE approximations in this section aim to replicate the gamma-distributed DDE by matching the first (in the case of the Erlang approximation) or first and second moments (in the hypoexponential approximations) of the underlying gamma distribution. It is natural to ask if a similar technique could allow for a more accurate approximation by matching the first three moments. To address this question, it is simpler and equivalent to match first three cumulants, rather than moments, of gamma and hypoexponential. The cumulant generating function of a gamma-distributed random variable Inline graphic with shape and rate parameters Inline graphic and Inline graphic is given by

graphic file with name DmEquation72.gif

Therefore, the cumulants Inline graphic are

graphic file with name DmEquation73.gif

Conversely, the cumulant generating function of hypoexponential-distributed random variable Inline graphic is given by

graphic file with name DmEquation74.gif

Therefore, the cumulants of Inline graphic are given by

graphic file with name DmEquation75.gif

Now, we show that if a hypoexponential distribution matches the first three cumulants, and thus moments, of Inline graphic then Inline graphic.

Theorem 3.3.

Let Inline graphic be a gamma-distributed random variable and assume that Inline graphic such that Inline graphic for Inline graphic. Then, Inline graphic.

Proof.

Without loss of generality by scaling, we take Inline graphic. Write Inline graphic, so that Inline graphic. The following system of equations for the first three cumulants must hold


Proof.

Now, consider the sum Inline graphic. We have Inline graphic and therefore


Proof.

As all terms of Inline graphic are non-negative, we must have Inline graphic for all Inline graphic. As Inline graphic, we obtain Inline graphic for all Inline graphic. It follows that Inline graphic and Inline graphic.

We therefore conclude that it is not possible to match the first three moments of a generic gamma distribution using a hypoexponential approximation. This three moment matching problem has been extensively studied (Bobbio et al., 2005; Osogami & Harchol-Balter, 2006). A generalized hypoexponential random variable corresponding to a Markov chain where each stage is visited at most once, i.e. the linear chain flows in one direction but some stages can be skipped, can be used to match the first three moments of gamma-distributed random variable. However, these generalized hypoexponential random variables are more demanding to implement than the hypoexponential approximations derived in Theorems 3.1 and 3.2. In short, their output varies depending on normalized moments, require at least as many parameters as the hypoexponential approximations, and the non-zero probability of skipping stages does not allow for a simple skip-free Markov chain interpretation as in the hypoexponential approximation.

4. Numerical results

Here, we illustrate the analytical results of Section 2 and evaluate the hypoexponential approximations derived in Section 3.2 by comparing the direct simulation of (1.1) using the FCRK method in Section 2 against the numerical simulation of the approximate ODE (3.3) and the Erlang distributed DDE (3.1). We first show that the FCRK method for (1.1) is accurate to the order demonstrated in Theorem 2.1. We then test the accuracy of the hypoexponential approximation derived in Section 3.2 using our FCRK method to provide reference solutions of generic gamma-distributed DDEs.

4.1 Numerical verification of the FCRK method

We test the fourth-order FCRK numerical solver by comparing the output of the FCRK method for (1.1) against differential equations with known, or reference, solutions. To obtain these known solutions, we first consider (1.1) in the case where the shape parameter Inline graphic is an integer. The gamma distribution in (1.1) is thus an Erlang distribution so, using the linear chain technique, we derive an equivalent ODE formulation. This equivalent ODE formulation can either be solved analytically or simulated using established techniques for systems of ODEs as implemented in Matlab to give the reference solution Inline graphic.

We simulate the Erlang-distributed DDE (1.1) using our fourth-order FCRK method to compute the numerical solution Inline graphic for a given step size Inline graphic. Then, to compute the accuracy of our simulation, we compute the Inline graphic error between the solution of (1.1), as obtained using our FCRK method, and the reference solution, obtained via the equivalent ODE. In general, when using a Inline graphicth order FCRK method, the error between the numerical solution, Inline graphic and the reference solution, Inline graphic, satisfies

graphic file with name DmEquation78.gif

where Inline graphic is the stepsize of the FCRK method. The error Inline graphic then satisfies

graphic file with name DmEquation79.gif

Therefore, we consider the error Inline graphic as a function of the step size Inline graphic of the FCRK method and thus compute Inline graphic for a various values of Inline graphic. The slope of Inline graphic as a function of Inline graphic is the order Inline graphic of the FCRK method.

4.1.1 Linear test problem

We first consider the linear test problem

graphic file with name DmEquation80.gif (4.1)

where we set Inline graphic, and choose Inline graphic so the mean delay time Inline graphic. In this case, we can use the linear chain technique to reduce the Erlang distributed DDE in (4.1) to

graphic file with name DmEquation81.gif (4.2)

where

graphic file with name DmEquation82.gif

Equation (4.2) is a linear system of ODEs and has an exact solution given by matrix exponentials. For Inline graphic, the analytical solution is

graphic file with name DmEquation83.gif

Thus, we simulate (4.1) using the fourth-order FCRK method described in the preceding section for Inline graphic and compare it against the analytic solution of (4.2) for Inline graphic on the interval Inline graphic. Furthermore, we simulate (4.1) for Inline graphic and Inline graphic. To compute reference solutions for Inline graphic, we use the fourth-order variable step size RK solver in Matlab (MATLAB, 2017) with an absolute and relative error tolerance of Inline graphic. We show the error Inline graphic on the log-log scale and the solution of the DDE in Figure 2.

Fig. 2.


Fig. 2.

Convergence plots for the linear test problem (4.1). We plot Inline graphic as a function of Inline graphic. The slope of Inline graphic gives the convergence rate. Inline graphic is the simulation of (4.1) using the fourth-order FCRK method from Section 2 with fixed step size Inline graphic and Inline graphic is the solution of the equivalent ODE (4.2). Figure (A) shows the comparison against the exact solution when Inline graphic, while figures (B) and (C) show the error between Inline graphic and Inline graphic for Inline graphic and Inline graphic, respectively. Figure (D) shows the solution of the DDE for each test case. The solution Inline graphic of the equivalent ODE (4.2) is calculated using the fourth-order RK method RK45 in Matlab with relative and absolute error tolerance of Inline graphic.

4.1.2 Nonlinear test problem

We next consider the nonlinear test problem

graphic file with name DmEquation84.gif (4.3)

where we set Inline graphic, take Inline graphic, and choose Inline graphic which gives Inline graphic. Once again, we set

graphic file with name DmEquation85.gif

and use the linear chain technique to reduce (4.3) to

graphic file with name DmEquation86.gif (4.4)

Equation (4.4) is a nonlinear system of ODEs so we do not expect to find an analytical solution. Rather, we once again solve the system of ODEs (4.4) using the fourth-order variable step size RK solver in Matlab (MATLAB, 2017). We solve (4.4) with a tolerance of Inline graphic and compare this numerical solution against the numerical solution of (4.3) obtained using the FCRK method described in Section 2 on the interval Inline graphic. We show the error Inline graphic on the log-log scale for Inline graphic and Inline graphic and the solution of the DDE in Figure 3.

Fig. 3.


Fig. 3.

Convergence plots for the nonlinear test problem (4.3). We plot Inline graphic as a function of Inline graphic. The slope of Inline graphic gives the convergence rate. Inline graphic is the simulation of (4.3) using the fourth-order FCRK method from Section 2 with fixed step size Inline graphic and Inline graphic is the solution of the equivalent ODE (4.4). Panels (A—C) show the error between Inline graphic and Inline graphic for Inline graphic, respectively. Panel (D) shows the solution of the DDE for each test case. The solution Inline graphic of the equivalent ODE (4.4) is calculated using the fourth-order RK method RK45 in Matlab with relative and absolute error tolerance of Inline graphic.

4.1.3 Linear gamma-distributed DDE

Thus far, we have tested the FCRK method developed in section 2 by simulating Erlang-distributed DDEs and comparing the numerical solution against the solution of the equivalent ODE system. Here, we test our numerical method against a known solution of a gamma-distributed DDE with Inline graphic. In short, we consider

graphic file with name DmEquation87.gif (4.5)

We note that Inline graphic is a solution (4.5) and make the ansatz Inline graphic. Inserting Inline graphic gives the characteristic function

graphic file with name DmEquation88.gif

where Inline graphic is the Laplace transform of the function Inline graphic evaluated at Inline graphic. It follows that Inline graphic for MGF of the gamma-distributed random variable evaluated at Inline graphic Thus, a solution of (4.5) must satisfy

graphic file with name DmEquation89.gif (4.6)

which implies

graphic file with name DmEquation90.gif

Now, for simplicity, we set Inline graphic so that Inline graphic and

graphic file with name DmEquation91.gif (4.7)

is a solution of the characteristic function where we must impose Inline graphic. The corresponding eigenfunction Inline graphic is the solution of the linear-distributed DDE for the history function Inline graphic We have thus determined an analytical solution to the linear gamma-distributed DDE (4.5) in against which we can compare the numerical solution obtained by the FCRK method.

Now, we consider parameter triples Inline graphic, set Inline graphic and calculate Inline graphic by taking the principal root in (4.7). In Fig. 4, we show the convergence of the numerical solution of (4.5) obtained using the FCRK method to the analytical solution for the parameter triples Inline graphic and Inline graphic on the interval Inline graphic.

Fig. 4.


Fig. 4.

Convergence plots for the linear gamma-distributed DDE test problem (4.5). We plot Inline graphic as a function of Inline graphic where Inline graphic is the simulation of (4.5) using the fourth-order FCRK method from Section 2 and Inline graphic is the analytical solution of the linear-distributed DDE. In B, the error reaches machine precision for Inline graphic A–C show the error between Inline graphic and Inline graphic for the parameter triples Inline graphic given by Inline graphic and Inline graphic, respectively.

We note that for the DDEs (4.1) and (4.3), we observe the predicted convergence rate with approximate slope 4 until we reach numerical precision. For the DDE (4.5), the convergence rate is higher than expected and close to 5. However, the DDE (4.5) is linear and its solution is particularly simple being composed of a single exponential function. Numerical analysis is replete with examples of methods which exhibit a higher than required convergence order for certain problems, and this seems to just be another such example. We therefore conclude that the FCRK method derived in Section 2 exhibits the fourth-order global accuracy demonstrated in Theorem 2.1. These numerical tests, when combined with Theorem 2.1, indicate that we can use our FCRK method to provide reference solutions when comparing the Erlang and hypoexponential approximations.

4.2 Numerical evaluation of Erlang and hypoexponential approximations

Having confirmed the accuracy of our FCRK method to solve the distributed DDE (1.1), we now evaluate the Erlang and hypoexponential approximations for the two test problems (4.1) and (4.3) for Inline graphic. To test the accuracy of the Erlang approximation from Section 3.1, we use (3.2) with shape parameter Inline graphic and corresponding rate Inline graphic. We also consider the fixed hypoexponential approximation as described in Section 3.2 with Inline graphic and the rates Inline graphic and Inline graphic as given in Theorem 3.1. In these simulations, the fixed and smoothed approximations are indistinguishable, so we only show the fixed approximation corresponding to Inline graphic.

In the following simulations, we consider (4.1) and with Inline graphic, Inline graphic, and a non-constant history function given by Inline graphic for Inline graphic. We simulate the nonlinear test problem (4.3) for Inline graphic and Inline graphic with a constant history function Inline graphic.

In all cases shown in Fig. 5, the Erlang approximation has a visibly larger error than the hypoexponential approximations. In fact, there is no perceptible difference between the fixed (and consequently, the smoothed) hypoexponential approximation and the solution of the gamma-distributed DDE. While we only present the simulation results for a limited number of test problems, the significantly improved approximation by the hypoexponential approximation, compared against the Erlang approximation, was confirmed by a number of other test cases.

Fig. 5.


Fig. 5.

Comparison of ODE approximations to the gamma-distributed DDE (1.1) using the Erlang approximation in equation (3.2) or the fixed hypoexponential approximation Inline graphic in (3.5). In all cases, the solution of the gamma-distributed DDE as solved using the FCRK method is in solid blue, the solution of the fixed hypoexponential two moment approximation is in dashed orange and the solution of the Erlang approximation is in purple. A–C show the solution of the linear test problem (4.1) for Inline graphic and Inline graphic, respectively. D–F show the solution of the nonlinear test problem (4.3) for Inline graphic and Inline graphic, respectively.

4.2.1 Effects on linear stability

To study the effects of replacing the gamma-distributed DDE (1.1) by an Erlang or either hypoexponential approximation, we consider the linear gamma-distributed DDE given in (4.5). We note that Inline graphic is an equilibrium solution of the linear DDE, and it follows that this linear DDE represents the linearised version of

graphic file with name DmEquation92.gif

where Inline graphic and Inline graphic and Inline graphic. The principle of linearized stability for delay equations with infinite delay was established by Diekmann & Gyllenberg (2012) and, in short, indicates that the qualitative behaviour of a DDE with infinite delay near an equilibrium solution is determined by the linearized version of the DDE.

As a final test of the Erlang and hypoexponential approximations, we consider two specific examples with Inline graphic and parameters Inline graphic and Inline graphic and chosen near a bifurcation point. We identified the bifurcation point Inline graphic by following the same analysis as in Campbell & Jessop (2009) and Jessop & Campbell (2010) to calculate the region of stability of the equilibrium solution. There, the authors used Inline graphic as a solution ansatz for the linear DDE (4.5) and calculated conditions to ensure that the characteristic equation has a purely imaginary pair of roots.

In Fig. 6, we show that the hypoexponential approximation has the same stability properties as the solution of the distributed DDE, but that the Erlang approximation does not have the same stability properties. Essentially, for values of Inline graphic near the bifurcation point Inline graphic, the Erlang approximation requires rounding Inline graphic to the nearest integer, which may fall on the opposite side of the bifurcation point, so Inline graphic. Consequently, the Erlang approximation does not replicate the same qualitative behaviour as the gamma DDE. While we did not observe qualitative disagreement between the hypoexponential approximation and the gamma DDE in our simulations, it is possible for the hypoexponential approximation to fail in the same manner, although the Erlang approximation would also fail in this case. In Fig. 6A, we set Inline graphic and Inline graphic, while in Fig. 6B, we set Inline graphic and Inline graphic. We parameterize the Erlang and hypoexponential approximations as previously described in Sections 3.1 and 3.2.

Fig. 6.


Fig. 6.

Comparison of ODE approximations to the gamma-distributed DDE (4.5) using the Erlang approximation in equation (3.2) or the fixed hypoexponential two moment approximation in (3.5) showing that the Erlang approximation does not have the same stability properties as the gamma-distributed DDE or the hypoexponential approximation. In all cases, the solution of the gamma-distributed DDE as solved using the FCRK method is in solid blue, the solution of the hypoexponential approximation is in dashed orange and the solution of the Erlang approximation is in purple.

These examples indicate that using an Erlang approximation to replace the gamma-distributed DDE can introduce extreme approximation error and may not replicate the qualitative behaviour of the original gamma distributed DDE. However, these simulations also indicate that the hypoexponential approximation faithfully replicates the dynamics of the linearized gamma-distributed DDE. In this sense, these results strongly advocate for the use of the hypoexponential approximation derived in Section 3.2 rather than the usual Erlang approximation when attempting to approximate the solution of a gamma-distributed DDE with an ODE approximation.

5. Statistical inference

One benefit of the hypoexponential approximation of a gamma-distributed DDE is that it is easily implemented in existing inference software. Here, we demonstrate a possible implementation, using the simple and ubiquitous example of the Kermack–McKendrick (SIR) model from epidemiology, and the probabilistic programming language Stan (Carpenter et al., 2017). For this example, we deliberately choose a simplistic scenario, but the same ideas can be used for more realistic models. We first show how one can formulate the SIR model as a system of DDEs. Then, we derive the hypoexponential ODE approximation using the machinery developed above. We then show how one can build a simple statistical model for two independent data streams that both inform the model’s parameters (including the shape parameter Inline graphic). Finally, we fit the model to simulated data.

5.1 The Kermack–McKendrik model as a system of DDEs

The SIR model describes fractions of susceptible (Inline graphic), infected (Inline graphic) and recovered (Inline graphic) individuals in a population affected by a pathogen. In our version, the duration of the infectious period Inline graphic is Inline graphic distributed. Hence, in this example, we ignore individuals that were exposed to the pathogen, but not yet infectious. The mean duration of the infectious period is Inline graphic and the variance is Inline graphic. The infection rate and the initial fraction infected in the population are denoted Inline graphic and Inline graphic, respectively. The model is then given by the following system of DDEs:

graphic file with name DmEquation93.gif (5.1)

The variable Inline graphic represents the instantaneous incidence, which is equal to Inline graphic for Inline graphic, and we define Inline graphic for Inline graphic to jump-start the epidemic (Champredon et al., 2018). Here, Inline graphic is the Dirac delta measure at Inline graphic. In addition, when Inline graphic, we set Inline graphic and Inline graphic. Notice that Inline graphic and Inline graphic have a discontinuity at Inline graphic, and Inline graphic, and Inline graphic.

To understand why the system of DDEs (5.1) is correct, first notice that the equation for Inline graphic is the same as in the standard ODE SIR model: susceptible individuals are depleted at a rate equal to the incidence Inline graphic, assuming mass action. The equation for Inline graphic is a bit less intuitive. The first term Inline graphic represents influx of recently infected susceptible individuals, and the second term is a convolution integral of the same time-delayed incidence, and the PDF of Inline graphic. Hence, this convolution term represents the recovery of individuals at time Inline graphic that were infected Inline graphic time units ago, with the likelihood of recovery Inline graphic time units from infection given by Inline graphic.

A more formal way to derive (5.1) is to start with the renewal equation formulation of the Kermack–McKendrick model (see, e.g. Diekmann et al. (2012))

graphic file with name DmEquation94.gif (5.2)

where Inline graphic is the survival function of the gamma distribution. The fraction of infectious individuals at time Inline graphic is then given by Inline graphic, an integral over all individuals infected at time Inline graphic that are still infectious at time Inline graphic. In order to derive DDE (5.1), we differentiate Inline graphic as follows:

graphic file with name DmEquation95.gif

Here, differentiating under the integral sign is justified as Inline graphic is bounded (for Inline graphic) and bounded functions are integrable with respect to the measure Inline graphic on the interval Inline graphic.

5.2 The hypoexponential approximation of the DDE SIR model

We now approximate DDE (5.1) with a system of ODEs using the method developed in Section 3.2.

Lemma 5.1.

Using the hypoexponential approximation, the above DDE model (5.1) can be replaced by the following system of ODEs:


Lemma 5.1. (5.3)

where we write Inline graphic, with Inline graphic and the rates Inline graphic are given by


Lemma 5.1. (5.4)

As initial condition, we take Inline graphic, Inline graphic, and Inline graphic for Inline graphic.

Proof.

We first approximate the gamma distribution Inline graphic with the hypoexponential distribution with parameters Inline graphic and then use the linear chain trick to approximate the convolution integral Inline graphic. This results in the following system of ODEs:


Proof.
(5.5)

The initial conditions for the auxiliary variables Inline graphic are given by


Proof.

which holds because Inline graphic only if Inline graphic. Notice that Inline graphic and Inline graphic. Hence, Inline graphic for Inline graphic, and the equation for Inline graphic in system (5.5) is redundant.

5.3 A statistical model for epidemiological data

Reporting of incidence often happens at discrete time points Inline graphic, and the reported quantity is the accumulated number of cases observed between consecutive reporting times. Using the above model (5.1), we therefore use the cumulative incidence Inline graphic to simulate cases

graphic file with name DmEquation100.gif (5.6)

where Inline graphic is a large (known) constant representing the catchment population size, and Inline graphic are (positive) reporting times, and we take Inline graphic. The simulated incidence data are shown in Fig. 7A. Conversely, given predictions of the model Inline graphic, we can compute the likelihood of data Inline graphic, using the probability mass function of the Poisson distribution.

Fig. 7.


Fig. 7.

Simulated epidemic data and posterior predictive checks. (A) Simulated data Inline graphic and the model prediction Inline graphic. The dark-blue band represents the Inline graphic credible interval, and the light-blue band the Inline graphic prediction interval. (B) Simulated serial intervals represented as a empirical survival function (black), and the fitted survival function for Inline graphic given by Inline graphic (blue).

In addition to time series of the number of reported cases, often other data are collected to inform an epidemic model. For example, symptom onset data from transmission couples might be available. Such data consists of the times of symptom onset of pairs of individuals A and B, for whom it is known that A infected B (e.g. by means of genetic evidence). Transmission couple data give information about the length of the generation interval Inline graphic, which is defined as follows:

Definition 5.1.

Sample a random infected individual A from the population. Suppose that A was infected at time Inline graphic by individual B, and suppose that B was infected at time Inline graphic. The generation interval is then defined as


Definition 5.1. (5.7)

hence, the time between infection of individuals A and B.

Notice that different definitions of Inline graphic exist in the literature; we refer to Svensson (2007) for a discussion. In practice, the generation interval will almost never be observed but can be approximated by the serial interval, which is the time between symptom onset of individuals A and B.

Assuming that the duration of the infection is gamma distributed, the hypoexponential approximation method allows one to estimate the shape parameter of this distribution using both time series data and transmission couple data simultaneously, i.e. using ‘evidence synthesis’. For this, we still need a likelihood function for the transmission couple data.

Lemma 5.2.

As before, suppose that the length of the infectious period has a gamma distribution Inline graphic. The PDF of Inline graphic is given by


Lemma 5.2.

where Inline graphic is the (upper) incomplete gamma function.

Proof.

Here, we present only a sketch of the proof. See Svensson (2007) and references therein for more details. Let Inline graphic denote the PDF of Inline graphic. As in Definition 5.1, consider a randomly sampled individual A, infected at time Inline graphic and consider all individuals infected at time Inline graphic. Each of these individuals had an equal chance of infecting A, as long as they are still infectious at time Inline graphic, which is true with probability


Proof.
(5.8)

Therefore, the probability density Inline graphic must be proportional to Inline graphic. To get a proper PDF, we must find the normalizing constant


Proof.
(5.9)

Hence, we find that


Proof.
(5.10)

which proves the lemma.

Suppose that we have Inline graphic observed serial intervals. Assuming for simplicity that symptom onset is immediate, the distribution of the serial interval and generation interval are identical. The log-likelihood of the data is now the sum of the log-likelihood of the case data Inline graphic, and the log-likelihood of the transmission-couple data Inline graphic, given parameters Inline graphic, is

graphic file with name DmEquation106.gif (5.11)

where Inline graphic is the probability mass function of the Poisson distribution. To demonstrate this approach, we simulated, in addition to observed cases Inline graphic, a small number of generation times Inline graphic. The simulated serial interval data are shown in Fig. 7B.

We then used Stan to fit the model defined by (5.11) to the simulated data in a Bayesian framework, using improper flat priors for all parameters. In the Stan implementation, the DDE model (5.1) was replaced by the system of ODEs (5.3). The fitted model predictions are shown together with the simulated data in Fig. 7A and B. The marginal and joint posterior densities of the model parameters are shown in Fig. 8, together with the ground-truth values used to simulate the data. For all parameters, the ground-truth values are close to the modes of the marginal posterior distributions. We do find strong correlations between all pairs of parameters indicating practical identifiability issues.

Fig. 8.


Fig. 8.

Posterior marginal and joint density for the epidemic model parameters. Each dot in the joint density scatter plots represents a Monte-Carlo sample from the posterior distribution. The color of the dots indicates the density. The black vertical lines represent the ground-truth parameter values. The ground-truth parameters used for the simulation are Inline graphic, Inline graphic, Inline graphic, Inline graphic, Inline graphic and Inline graphic.

In the SIR model, the shape parameter Inline graphic of the infectious period Inline graphic is hard to identify due to the correlation with other parameters, as shown in Fig. 8. Further complicating matters, the trajectories of the model as a function of Inline graphic are very similar when Inline graphic is large, which makes the likelihood of the incidence data Inline graphic not well behaved. This problem has also been described for in-vitro SHIV data (Beauchemin et al., 2017). To resolve such identifiability issues, it can be important to use other data to inform the parameter Inline graphic. In this example, we used synthetic serial intervals that could be observed during real-life epidemics using transmission pairs. The distribution of these serial intervals depends on the real-valued parameter Inline graphic. Therefore, to fit the model to both incidence data and serial intervals in an evidence synthesis framework, it is essential that the likelihood of the incidence data also depends on a real-valued shape parameter Inline graphic.

Furthermore, treating Inline graphic as a first-class real-valued parameter in a statistical model can be important for accurately and efficiently estimating important quantities as the basic reproduction number Inline graphic. For certain childhood diseases, the dynamics of an epidemiological model depend on Inline graphic is of a more qualitative nature (Krylova & Earn, 2013) due to bifurcations. As we have shown in Fig. 6, using an Erlang instead of the hypoexponential approximation in such cases can result in large deviations from the true gamma-distributed model.

The Stan model code and a python script to simulate data and fit the model are available on https://github.com/lanl/gamma-dde.

6. Discussion

Gamma-distributed DDEs, such as (1.1), occur throughout mathematical biology. However, modellers often make simplifying assumptions due to the lack of appropriate numerical methods for infinite delay models. In this work, we developed an FCRK method to numerically simulate gamma-distributed DDEs, established order conditions on the numerical quadrature technique to ensure the accuracy of the method, proved the convergence of the FCRK method and illustrated our results with a series of test problems. Despite the development of an FCRK method to simulate (1.1) in this work, many software packages rely on ODE solvers to perform parameter fitting and statistical inference. Accordingly, we derived a finite dimensional approximation of the gamma-distributed DDE using a hypoexponential approximation and used numerical simulation to show that this hypoexponential approximation outperforms the common Erlang approximation. In particular, we demonstrated that using the Erlang approximation can lead to qualitatively different behaviour than the hypoexponential approximation and the true solution of the gamma-distributed DDE. Finally, we implemented our finite dimensional approximation in Stan (Carpenter et al., 2017) to fit synthetic data from a hypothetical epidemic.

The primary impediment towards the adaptation of FCRK methods to distributed DDEs with infinite delay is the accurate and consistent evaluation of the convolution integral (2.8). Here, we developed a change of variable that transforms the semi-infinite domain of integration to Inline graphic This change of variables is parametrized by certain parameters Inline graphic and Inline graphic, and we give conditions on Inline graphic and Inline graphic to ensure that the transformed integrand is sufficiently smooth to implement standard quadrature rules in Lemma 2.1. These conditions, and thus the change of variable and FCRK method, apply to other delay distributions that decay exponentially. Accordingly, the FCRK method framework developed in this article should extend with minimal changes to other distributed DDEs with infinite delays.

Until such FCRK methods are implemented in common software packages such as Stan, it is useful to have accurate finite dimensional approximations of the distributed DDE (1.1). Many finite dimensional approximations have been developed recently. The hypoexponential approximation described in Section 3 offers a number of advantages over existing methods. While our analysis of the approximation error does not allow for an explicit expression of the error introduced by replacing the gamma distribution by either the Erlang or hypoexponential distribution, the calculation in Section 4.2 offers a heuristic explanation for why the hypoexponential distribution is more accurate than the common Erlang approximation. As our numerical simulations show, there are gamma-distributed DDE problems for which the hypoexponential method gives the correct qualitative behaviour, while the Erlang approximation exhibits incorrect asymptotic stability behaviour. Moreover, unlike existing algorithms to parametrize phase-type distributions that do not give explicit values for the parameters of the phase-type distribution, we explicitly derived the parameters of the hypoexponential distribution as a function of the mean and variance of the underlying gamma distribution. This explicit expression for the rates allows for simple implementation in software packages such as Stan and we showed how to implement a simple SIR model with a gamma-distributed duration of infection. This example explicitly showed how the hypoexponential approximation derived in Section 3 facilitates evidence synthesis that is necessary to identify important model parameters.

Our work represents a step towards relaxing the assumption of Erlang-distributed delays in, amongst many other applications, infectious disease epidemiology. The FCRK method developed in this work allows modellers to directly simulate a gamma-distributed DDE if precise numerical results are necessary, while the hypoexponential approximations offer a more accurate ODE representation of the underlying DDE than the common Erlang approximation without any increase in complexity. Accordingly, we have presented two distinct pathways to allow for the implementation of gamma-distributed DDEs and facilitate their use in mathematical biology or other fields of science.

A. Smoothness conditions for the FCRK method

In the main text, we derived sufficient conditions on the change of variable

graphic file with name DmEquation107.gif

to ensure that the transformed convolution integral is sufficiently smooth to not introduce unnecessary error in the FCRK method. Here, we prove that these conditions are sufficient by giving the proof of Lemma 2.1.

We recall that Inline graphic is the solution of the gamma-distributed DDE and Inline graphic is the PDF of the gamma distribution with shape parameter Inline graphic and rate parameter Inline graphic, and we are calculating

graphic file with name DmEquation108.gif

We first show that the derivatives of Inline graphic with respect to Inline graphic can be computed inductively.

Lemma A.1.

Assume that Inline graphic is Inline graphic times differentiable and take Inline graphic. Then,


Lemma A.1.

where Inline graphic is a constant depending only on Inline graphic, Inline graphic and Inline graphic is an integer between Inline graphic and Inline graphic, inclusive.

Proof.

The proof is by induction on the order of the derivative Inline graphic. The Inline graphic case follows immediately from the definition of Inline graphic, while the Inline graphicst case comes from term by term differentiation with


Proof.

We now must show that Inline graphic is a bounded function of Inline graphic on Inline graphic. Take Inline graphic and consider the compact interval Inline graphic away from Inline graphic, Inline graphic We note that Inline graphic is a product of continuous functions, and thus continuous, so the image of this compact set is compact and thus bounded. Then, we consider the interval Inline graphic and define

graphic file with name DmEquation111.gif

for Inline graphic. We note that, for Inline graphic and Inline graphic, Inline graphic appears in the derivative of Inline graphic. Now, Inline graphic for Inline graphic and we compute

graphic file with name DmEquation112.gif

Thus, for Inline graphic sufficiently close to Inline graphic and Inline graphic, we have Inline graphic and we can therefore bound Inline graphic from above as

graphic file with name DmEquation113.gif

Now, we multiply by Inline graphic so

graphic file with name DmEquation114.gif

Then, as Inline graphic we have Inline graphic Recalling that the weight parameter of the function space Inline graphic satisfies Inline graphic, we set Inline graphic and thus obtain

graphic file with name DmEquation115.gif

Then, as Inline graphic we immediately see

graphic file with name DmEquation116.gif

so Inline graphic is bounded and it follows from the definition of the space Inline graphic that

graphic file with name DmEquation117.gif

for all Inline graphic. We thus conclude that

graphic file with name DmEquation118.gif

It follows that Inline graphic and thus the integrand Inline graphic is bounded on the entire interval Inline graphic The condition Inline graphic is crucial in the above calculation, as it implies that Inline graphic and leads to the result.

Lemma A.2.

Assume that Inline graphic is Inline graphic times differentiable and set


Lemma A.2. (A1)

Then, Inline graphic is Inline graphic times differentiable in Inline graphic for Inline graphic. Furthermore, if the Inline graphicth derivative of Inline graphic, Inline graphic, is bounded for Inline graphic, then there exists Inline graphic such that


Lemma A.2.

for Inline graphic.

Proof.

We recall that Inline graphic so taking Inline graphic ensures that Inline graphic and Inline graphic The bound of Inline graphic follows from the boundedness of Inline graphic demonstrated previously.

B. The smoothed hypoexponential approximation

Here, we give the proof of Theorem 3.2 that established the rates of smoothed hypoexponential approximation. As in the main text, let Inline graphic denote the mean of a gamma-distributed random variable Inline graphic, and let Inline graphic denote the shape parameter, such that Inline graphic has variance Inline graphic. We write Inline graphic for the rate parameter, and Inline graphic for the smallest integer greater than Inline graphic. We recall the definition of the smoothed hypoexponentially distributed random variable Inline graphic with the same mean and variance as Inline graphic

Theorem B.1.

Let Inline graphic be a Inline graphic-distributed random variable where Inline graphic Consider the hypoexponentially distributed random variable Inline graphic with rate parameters Inline graphic. Recall that Inline graphic as Inline graphic, set Inline graphic and define Inline graphic and Inline graphic by

Theorem B.1. (B1)

Then, Inline graphic and Inline graphic have the same first two moments.

Proof. Proof of Theorem B.1

The mean of Inline graphic and Inline graphic are given by Inline graphic and


Proof.

because the square-roots in Eq (B1) cancel. Now using the fact that Inline graphic, we indeed find that Inline graphic. The variance of Inline graphic is equal to Inline graphic and the variance of Inline graphic is given by


Proof.

For any two numbers Inline graphic and Inline graphic, we have Inline graphic. Hence, we find that


Proof.

Therefore, Inline graphic, which proves the theorem.

Remark B.1.

Notice that the values Inline graphic and Inline graphic are the roots of the quadratic polynomial


Remark B.1.

C. Convergence of the FCRK Method

Here, we demonstrate the convergence of the FCRK method described in Section 2 and prove Theorem 2.1. In the following analysis, we make extensive use of the results in Section 6 of Maset et al. (2005) and Section 7 of Bellen et al. (2009). We will also require the definitions of discrete and uniform order for FCRK methods (found in Definitions 2.3 and 2.2, respectively, and Definition 4.1 of Maset et al. (2005)).

To begin the analysis of our FCRK method, we transform the IVP (2.7) to an equivalent formulation that is simpler to analyse. In particular, we recall that, for all times Inline graphic,

graphic file with name DmEquation126.gif

and Inline graphic is a continuous function of Inline graphic in the interval Inline graphic. We therefore define

graphic file with name DmEquation127.gif

The function Inline graphic is therefore a uniformly continuous function of Inline graphic and agrees with Inline graphic almost-everywhere in Inline graphic Therefore,

graphic file with name DmEquation128.gif

and we can consider the transformed problem

graphic file with name DmEquation129.gif (C1)

Now, we do not calculate the right-hand side of (C1) precisely but rather use a quadrature rule to approximate the integral as discussed in the main text. Maset et al. (2005) considered FCRK methods for the generalized setting of all such approximations of the right-hand side of (C1). Maset et al. (2005) denoted approximations of the right-hand side of (C1) with a tilde which, in our setting, gives

graphic file with name DmEquation130.gif

where Inline graphic is a parameter that controls the precision of the approximation. Here, Inline graphic represents the space of composite quadrature rules with a fixed number Inline graphic of steps. These quadrature rules are defined by their weights, Inline graphic, and collocation points, Inline graphic. The quadrature rule is therefore represented by Inline graphic with

graphic file with name DmEquation131.gif

where Inline graphic and Inline graphic are the the step size and order of the quadrature method, respectively. Accordingly, the approximation of the right-hand side of (C1) is given by

graphic file with name DmEquation132.gif (C2)

For notational simplicity in the following, we denote, for a given function Inline graphic,

graphic file with name DmEquation133.gif

The accuracy of the approximation Inline graphic for a given function Inline graphic and quadrature rule Inline graphic is given by

graphic file with name DmEquation134.gif (C3)

Maset et al. (2005) derived conditions on the approximation Inline graphic that permit convergence of existing FCRK methods. To establish the convergence of the FCRK method for the transformed problem (C1), the approximate function Inline graphic must satisfy the following conditions:

  • (1)

    Inline graphic is uniformly continuous with respect to Inline graphic and the derivative with respect to the function Inline graphic, Inline graphic is continuous with respect to Inline graphic and uniformly bounded with respect to Inline graphic;

  • (2)

    There exists a continuous function Inline graphic such that Inline graphic for all Inline graphic and Inline graphic;

  • (3)

    Inline graphic is of class Inline graphic with respect to Inline graphic for all Inline graphic and both the derivatives are bounded uniformly with respect to Inline graphic

Furthermore, let Inline graphic be the largest value Inline graphic such that the IVP (1.1) has a unique solution with initial data Inline graphic over the interval Inline graphic. Denote the simulation mesh by

graphic file with name DmEquation135.gif

with corresponding step size Inline graphic. Finally, let the approximation of the solution Inline graphic obtained using a FCRK method with mesh Inline graphic given by Inline graphic. Then, recalling the definitions of uniform, discrete and global Order in Definitions 2.22.4, Maset et al. (2005) prove.

Theorem C.1. Theorem 6.1 of Maset et al. (2005) —

If an FCRK method Inline graphic of uniform order Inline graphic, discrete order Inline graphic, with Inline graphic, and such that Inline graphic, is applied to (C1) for the computation of Inline graphic through Inline graphic and the following assumptions hold:

  • A:

    Inline graphic for Inline graphic and Inline graphic for all Inline graphic with Inline graphic;

  • B:

    Conditions (1), (2) and (3) hold;

  • C:

    The approximation error (C3) satisfies Inline graphic ;

  • D:

    Inline graphic is 5 times continuously differentiable;

then for a fixed Inline graphic, and simulation meshes Inline graphic that include all possible discontinuity points of Inline graphic in Inline graphic. Then,


Theorem C.1.

We note the relationship between the smoothness required of the solution Inline graphic and the maximal discrete and uniform orders for the FCRK method.

C.1 Applying Theorem (C.1) to the FCRK method

We now show that Theorem C.1 is applicable to the FCRK method derived in Section 2. Bellen et al. (2009) show that the global fourth-order explicit method considered in this work has uniform order 3 and discrete order 4 and simple inspection shows that (2.4) satisfies Assumption A. Next, we show that our approximation Inline graphic satisfies the conditions (1), (2) and (3) and so verify Assumption B.

In what follows, we consider arbitrary functions Inline graphic Furthermore, we only consider quadrature rules with bounded weights

graphic file with name DmEquation137.gif (C4)

for fixed Inline graphic. Finally, we assume that the function Inline graphic is at least Inline graphic times continuously differentiable and globally Lipschitz. The solution Inline graphic is thus Inline graphic times differentiable for Inline graphic. Thus, Assumption D is satisfied. Furthermore, we assume that Inline graphic and Inline graphic are bounded for Inline graphic.

C.1.1 Verifying condition (1)

We begin with condition (1). Now, Inline graphic is Lipschitz and thus uniformly continuous. Therefore, for each Inline graphic there exists Inline graphic such that for all Inline graphic, Inline graphic. Then, it follows from the definition (C2), the uniform continuity of Inline graphic with respect to Inline graphic is equivalent to showing that we can choose Inline graphic such that if the quadrature rules satisfy Inline graphic then the quadrature method is such that

graphic file with name DmEquation138.gif

This relationship, combined with the uniform continuity of Inline graphic, will establish the uniform continuity of Inline graphic with respect to Inline graphic. We now show how to choose such a Inline graphic By adding 0 to the above expression, we obtain

graphic file with name DmEquation139.gif

Now, Inline graphic is uniformly continuous and the the sum of the weights Inline graphic is bounded above by Inline graphic. From the uniform continuity of Inline graphic, we can choose Inline graphic, independently of Inline graphic and Inline graphic, such that if Inline graphic, so that Inline graphic then

graphic file with name DmEquation140.gif

Therefore, we obtain

graphic file with name DmEquation141.gif

Furthermore, Inline graphic is the product of bounded functions and thus bounded above. Let this upper bound be given by Inline graphic and note that it is independent of the quadrature rule used. Accordingly, it is possible to constrain Inline graphic so that the weights of the quadrature rule satisfy

graphic file with name DmEquation142.gif

It thus follows that

graphic file with name DmEquation143.gif

Therefore, independently of the quadrature rule Inline graphic, taking

graphic file with name DmEquation144.gif

is sufficient to ensure that

graphic file with name DmEquation145.gif

As Inline graphic was chosen from the uniform continuity of the function Inline graphic, it thus follows that Inline graphic is uniformly continuous in Inline graphic as desired.

Furthermore, Inline graphic is continuously differentiable and the mapping

graphic file with name DmEquation146.gif

is linear, and thus differentiable with respect to Inline graphic The chain rule for Fréchet derivatives gives

graphic file with name DmEquation147.gif

which is continuous with respect to Inline graphic and bounded with respect to Inline graphic by virtue of the bound on the quadrature weights (C4). The condition (1) is therefore satisfied.

C.1.2 Verifying condition (2)

We turn now to the second condition. From the definition of Inline graphic we immediately see that

graphic file with name DmEquation148.gif

where Inline graphic is the step size of the Inline graphicth order quadrature method Inline graphic and Inline graphic is a known error term from the Taylor expansion of Inline graphic. Recalling that Inline graphic is assumed to be bounded, we obtain

graphic file with name DmEquation149.gif

which gives

graphic file with name DmEquation150.gif

It is clear that Inline graphic is a continuous function and satisfies condition (2).

C.1.3 Verifying condition (3)

It remains to show that Inline graphic is Inline graphic with respect to Inline graphic for all Inline graphic Now, Inline graphic is 4 times continuously differentiable and Inline graphic is linear in Inline graphic Therefore, consecutive applications of the chain rule for Fréchet derivatives gives the required regularity of Inline graphic. Furthermore, the quadrature weights Inline graphic satisfy (C4) and we have assumed that Inline graphic for Inline graphic is bounded. Therefore, Lemma A.2 yields the uniform boundedness of Inline graphic for Inline graphic with respect to Inline graphic, as required.

C.1.4 Characterization of the accuracy of the approximation of Inline graphic

We now consider the approximation error defined in (C3) and show that Assumption C holds. To calculate Inline graphic in the FCRK method defined in Section 2, we considered composite quadrature rules Inline graphic of order Inline graphic with maximal step-size Inline graphic. Such quadrature rules satisfy

graphic file with name DmEquation151.gif

Then, Taylor expanding the latter expression in (C2) gives

graphic file with name DmEquation152.gif

The boundedness of Inline graphic gives Inline graphic In Section 2, we chose Inline graphic such that Inline graphic. It follows that the FCRK method (2.4) satisfies Assumption C.

C.2 A convergence result for the FCRK method

Assumption A of Theorem C.1 is satisfied for the the fourth-order explicit FCRK method defined in (2.4) with uniform order Inline graphic and discrete order Inline graphic. We have shown that both Assumptions B and C hold, while the assumption that Inline graphic is 4 times continuously differentiable ensures that Assumption D holds. We thus conclude

Theorem C.2.

Assume that the right-hand side of (1.1) is 4 times continuously differentiable and let Inline graphic be the explicit FCRK method with global fourth-order defined in (2.4). Furthermore, let the simulation mesh Inline graphic include all breaking points of the DDE (1.1) and have maximal stepsize Inline graphic. Let the quadrature method Inline graphic be given by the composite Simpson’s open rule with maximal sub-interval size of Inline graphic.

Then, the error between the solution, Inline graphic of (1.1) and the numerical approximation of the solution, Inline graphic, satisfies


Theorem C.2.

Contributor Information

Tyler Cassidy, Theoretical Biology and Biophysics, Los Alamos National Laboratory, Los Alamos, NM 87545, USA.

Peter Gillich, Department of Mathematics and Statistics, McGill University, Montreal, Quebec 3A 0G4, Canada.

Antony R Humphries, Departments of Mathematics and Statistics, and Physiology, McGill University, Montreal, Quebec 3A 0G4, Canada.

Christiaan H van Dorp, Theoretical Biology and Biophysics, Los Alamos National Laboratory, Los Alamos, NM 87545, USA.

Funding

National Institutes of Health (R01-OD011095 supported C.H.v.D., T.C., R01-AI116868 supported T.C.); National Science and Engineering Research Council of Canada (RGPIN-2018-05062 to A.R.H.); National Science and Engineering Research Council Undergraduate Student Research Award to P.G. US Department of Energy (contract no. 89233218CBA000001) supported C.H.v.D and T.C..

Bibliography

  1. Andò, A., Breda, D. & Gava, G. (2020) How fast is the linear chain trick? A rigorous analysis in the context of behavioral epidemiology. Math. Biosci. Eng., 17, 5059–5084. [DOI] [PubMed] [Google Scholar]
  2. Beauchemin, C. A., Miura, T. & Iwami, S. (2017) Duration of SHIV production by infected cells is not exponentially distributed: Implications for estimates of infection parameters and antiviral efficacy. Sci. Rep., 7, 42765. 10.1038/srep42765. [DOI] [PMC free article] [PubMed] [Google Scholar]
  3. Bellen, A., Maset, S., Zennaro, M. & Guglielmi, N. (2009) Recent Trends in the Numerical Solution of Retarded Functional Differential Equations. Acta Numerica, 18, 1–110. [Google Scholar]
  4. Bellen, A. & Zennaro, M. (2013) Numerical Methods for Delay Differential Equations, 1st edn. Oxford: Oxford University Press. [Google Scholar]
  5. Bobbio, A., Horváth, A. & Telek, M. (2005) Matching three moments with minimal acyclic phase type distributions. Stoch. Model., 21, 303–326. [Google Scholar]
  6. Breda, D., Diekmann, O., Gyllenberg, M., Scarabel, F. & Vermiglio, R. (2016) Pseudospectral discretization of nonlinear delay equations: new prospects for numerical bifurcation analysis. SIAM J. Appl. Dyn. Syst., 15, 1–23. [Google Scholar]
  7. Câmara De Souza, D., Craig, M., Cassidy, T., Li, J., Nekka, F., Bélair, J. & Humphries, A. R. (2018) Transit and lifespan in neutrophil production: implications for drug intervention. J. Pharmacokinet. Pharmacodyn., 45, 59–77. [DOI] [PubMed] [Google Scholar]
  8. Campbell, S. A. & Jessop, R. (2009) Approximating the Stability Region for a Differential Equation with a Distributed Delay. Math. Model. Nat. Phenom., 4, 1–27. [Google Scholar]
  9. Carpenter, B., Gelman, A., Hoffman, M., Lee, D., Goodrich, B., Betancourt, M., Brubaker, M., Guo, J., Li, P. & Riddell, A. (2017) Stan: a probabilistic programming language. J. Stat. Softw., 76, 1–32. [DOI] [PMC free article] [PubMed] [Google Scholar]
  10. Cassidy, T. (2021) Distributed delay differential equation representations of cyclic differential equations. SIAM J. Appl. Math., 81, 1742–1766. [Google Scholar]
  11. Cassidy, T. & Craig, M. (2019) Determinants of combination GM-CSF immunotherapy and oncolytic virotherapy success identified through in silico treatment personalization. PLOS Comput. Biol., 15, e1007495. [DOI] [PMC free article] [PubMed] [Google Scholar]
  12. Cassidy, T., Craig, M. & Humphries, A. R. (2019) Equivalences between age structured models and state dependent distributed delay differential equations. Math. Biosci. Eng., 16, 5419–5450. [DOI] [PubMed] [Google Scholar]
  13. Cassidy, T. & Humphries, A. R. (2019) A mathematical model of viral oncology as an immuno-oncology instigator. Math. Med. Biol. A J. IMA, 37, 117–151. [DOI] [PubMed] [Google Scholar]
  14. Champredon, D., Dushoff, J. & Earn, D. J. D. (2018) Equivalence of the Erlang-distributed SEIR epidemic model and the renewal equation. SIAM J. Appl. Math., 78, 3258–3278. [Google Scholar]
  15. Cryer, C. W. & Tavernini, L. (1972) The numerical solution of Volterra functional differential equations by Euler’s method. SIAM J. Numer. Anal., 9, 105–129. [Google Scholar]
  16. Diekmann, O. & Gyllenberg, M. (2012) Equations with infinite delay: blending the abstract and the concrete. J. Differ. Equ., 252, 819–851. [Google Scholar]
  17. Diekmann, O., Gyllenberg, M. & Metz, J. A. J. (2018) Finite dimensional state representation of linear and nonlinear delay systems. J. Dyn. Differ. Equations, 30, 1439–1467. [Google Scholar]
  18. Diekmann, O., Gyllenberg, M. & Metz, J. A. J. (2020a) Finite dimensional state representation of physiologically structured populations. J. Math. Biol., 80, 205–273. [DOI] [PMC free article] [PubMed] [Google Scholar]
  19. Diekmann, O., Heesterbeek, H. & Britton, T. (2012) Mathematical Tools for Understanding Infectious Disease Dynamics. Princeton University Press. [Google Scholar]
  20. Diekmann, O., Scarabel, F. & Vermiglio, R. (2020b) Pseudospectral discretization of delay differential equations in sun-star formulation: Results and conjectures. Discret. Contin. Dyn. Syst. - S, 13, 2575–2602. [Google Scholar]
  21. Enright, W. H. and Hayashi, H. (1997). A delay differential equation solver based on a continuous Runge-Kutta method with defect control. Numer. Algorithms, 16(3–4):349. [Google Scholar]
  22. Eremin, A. (2016) Functional continuous Runge-Kutta-Nyström methods. Electron. J. Qual. Theory Differ. Equ., Proc. 10'th Coll. Qualitative Theory of Diff. Equ. (July 1–4, 2015, Szeged, Hungary) Ed. by T. Krisztin. SZTE: Szeged. Bolyai Institute, No. 11, pp. 1–17. 10.14232/ejqtde.2016.8.11. [DOI] [Google Scholar]
  23. Eremin, A. S. (2019) Runge-Kutta methods for differential equations with distributed delays. AIP Conf. Proc, vol. 2116, p. 140003. [Google Scholar]
  24. Eremin, A. S., Humphries, A. R. & Lobaskin, A. A. (2020) Some issues with the numerical treatment of delay differential equations. Int. Conf. Numer. Anal. Appl. Math. Icnaam 2019, vol. 2293, p. 100003. [Google Scholar]
  25. Gossel, G., Hogan, T., Cownden, D., Seddon, B. & Yates, A. J. (2017) Memory CD4 T cell subsets are kinetically heterogeneous and replenished from naive T cells at high levels. Elife, 6, 1–30. [DOI] [PMC free article] [PubMed] [Google Scholar]
  26. Greenhalgh, S. & Rozins, C. (2021) A generalized differential equation compartmental model of infectious disease transmission. Infect Dis Model, 6, 1073–1091. [DOI] [PMC free article] [PubMed] [Google Scholar]
  27. Gyllenberg, M., Scarabel, F. & Vermiglio, R. (2018) Equations with infinite delay: Numerical bifurcation analysis via pseudospectral discretization. Appl. Math. Comput., 333, 490–505. [Google Scholar]
  28. Hale, J. K. (1974) Functional differential equations with infinite delays. J. Math. Anal. Appl., 48, 276–283. [Google Scholar]
  29. Hale, J. K. & Verduyn Lunel, S. M. (1993) Introduction to Functional Differential Equations. Applied Mathematical Sciences (F. John, J.E. Marsden & L. Sirovich eds), vol. 99. New York, NY: Springer. [Google Scholar]
  30. Hino, Y., Murakami, S. & Naito, T. (1991) Functional Differential Equations with Infinite Delay. Lecture Notes in Mathematics (A Dold, B. Eckmann & F. Takens eds), vol. 1473. Berlin Heidelberg, Berlin, Heidelberg: Springer. [Google Scholar]
  31. Hu, S., Dunlavey, M., Guzy, S. & Teuscher, N. (2018) A distributed delay approach for modeling delayed outcomes in pharmacokinetics and pharmacodynamics studies. J. Pharmacokinet. Pharmacodyn., 45, 1–24. [DOI] [PubMed] [Google Scholar]
  32. Hurtado, P. & Richards, C. (2020) Time is of the essence: incorporating phase-type distributed delays and dwell times into ODE models. Math. Appl. Sci. Eng., 1, 410–422. [Google Scholar]
  33. Hurtado, P. J. & Kirosingh, A. S. (2019) Generalizations of the ‘Linear Chain Trick’: incorporating more flexible dwell time distributions into mean field ODE models. J. Math. Biol., 79, 1831–1883. [DOI] [PMC free article] [PubMed] [Google Scholar]
  34. Jenner, A. L., Cassidy, T., Belaid, K., Bourgeois-Daigneault, M.-C. & Craig, M. (2021) In silico trials predict that combination strategies for enhancing vesicular stomatitis oncolytic virus are determined by tumor aggressivity. J. Immunother. Cancer, 9, e001387. [DOI] [PMC free article] [PubMed] [Google Scholar]
  35. Jessop, R. & Campbell, S. (2010) Approximating the stability region of a neural network with a general distribution of delays. Neural Networks, 23, 1187–1201. [DOI] [PubMed] [Google Scholar]
  36. Johnson, M. A. & Taaffe, M. R. (1989) Matching moments to phase distributions: mixtures of erlang distributions of common order. Commun. Stat. Stoch. Model., 5, 711–743. [Google Scholar]
  37. Johnson, M. A. & Taaffe, M. R. (1990) Matching moments to phase distributions: density function shapes. Commun. Stat. Stoch. Model., 6, 283–306. [Google Scholar]
  38. Koch, G. & Schropp, J. (2015) Distributed transit compartments for arbitrary lifespan distributions in aging populations. J. Theor. Biol., 380, 550–558. [DOI] [PubMed] [Google Scholar]
  39. Krylova, O. & Earn, D. J. (2013) Effects of the infectious period distribution on predicted transitions in childhood disease dynamics. J R Soc Interface, 10, 20130098. [DOI] [PMC free article] [PubMed] [Google Scholar]
  40. Krzyzanski, W. (2019) Ordinary differential equation approximation of gamma distributed delay model. J. Pharmacokinet. Pharmacodyn., 46, 53–63. [DOI] [PubMed] [Google Scholar]
  41. Langlois, G. P., Craig, M., Humphries, A. R., Mackey, M. C., Mahaffy, J. M., Bélair, J., Moulin, T., Sinclair, S. R. & Wang, L. (2017) Normal and pathological dynamics of platelets in humans. J. Math. Biol., 75, 1411–1462. [DOI] [PubMed] [Google Scholar]
  42. Lixoft (2019) Monolix version 2019R2. Lixoft SAS: Antony;  France. http://lixoft.com/products/monolix. [Google Scholar]
  43. MacDonald, N. (1978) Time Lags in Biological Models, 1st edn. Berlin: Springer. [Google Scholar]
  44. Maset, S., Torelli, L. & Vermiglio, R. (2005) Runge-Kutta Methods for Retarded Functional Differential Equations. Math. Model. Methods Appl. Sci., 15, 1203–1251. [Google Scholar]
  45. MATLAB (2017) R2017a. Natick, MA: The MathWorks Inc. [Google Scholar]
  46. Osogami, T. & Harchol-Balter, M. (2006) Closed form solutions for mapping general distributions to quasi-minimal PH distributions. Perform. Eval., 63, 524–552. [Google Scholar]
  47. Raue, A., Karlsson, J., Saccomani, M. P., Jirstrand, M. & Timmer, J. (2014) Comparison of approaches for parameter identifiability analysis of biological systems. Bioinformatics, 30, 1440–1448. [DOI] [PubMed] [Google Scholar]
  48. Raue, A., Kreutz, C., Maiwald, T., Bachmann, J., Schilling, M., Klingmüller, U. & Timmer, J. (2009) Structural and practical identifiability analysis of partially observed dynamical models by exploiting the profile likelihood. Bioinformatics, 25, 1923–1929. [DOI] [PubMed] [Google Scholar]
  49. Roberts, M. G. & Heesterbeek, J. A. (2007) Model-consistent estimation of the basic reproduction number from the incidence of an emerging infection. J. Math. Biol., 55, 803–816. [DOI] [PMC free article] [PubMed] [Google Scholar]
  50. Rozhnova, G., van  Dorp, C. H., Bruijning-Verhagen, P., Bootsma, M. C. J., van de  Wijgert, J. H. H. M., Bonten, M. J. M. & Kretzschmar, M. E. (2021) Model-based evaluation of school- and non-school-related measures to control the covid-19 pandemic. Nat. Commun., 12, 1614. [DOI] [PMC free article] [PubMed] [Google Scholar]
  51. Sanche, S., Lin, Y. T., Xu, C., Romero-Severson, E., Hengartner, N. & Ke, R. (2020) High contagiousness and rapid spread of severe acute respiratory syndrome coronavirus 2. Emerg. Infect. Dis., 26, 1470–1477. [DOI] [PMC free article] [PubMed] [Google Scholar]
  52. Smith, H. (2011) An introduction to delay differential equations with applications to the life sciences. Texts in Applied Mathematics (J.E. Marsden, L. Sirovich & S.S. Antman eds), vol. 57. New York, NY: Springer. [Google Scholar]
  53. Svensson, Å. (2007) A note on generation times in epidemic models. Math. Biosci., 208, 300–311. [DOI] [PubMed] [Google Scholar]
  54. Tavernini, L. (1971) One-Step Methods for the Numerical Solution of Volterra Functional Differential Equations. SIAM J. Numer. Anal., 8, 786–795. [Google Scholar]
  55. Vehtari, A., Gelman, A. & Gabry, J. (2017) Practical bayesian evaluation using leave-one-out cross-validation and waic. Statist. Comput., 27, 1413–1432. [Google Scholar]
  56. Vermiglio, R. (1988) Natural Continuous Extensions of Runge-Kutta methods for Volterra integrodifferential equations. Numer. Math., 53, 439–458. [Google Scholar]
  57. Vogel, T. (1961) Systèmes Déferlants, Systèmes Héréditaires, Systèmes Dynamiques. Proc. Int. Symp. Nonlinear Vib. Kiev: Academy of Sciences USSR, pp. 123–130. https://iutam.org/wp-content/uploads/2016/04/IUTAM_1961.pdf. [Google Scholar]

Articles from Ima Journal of Applied Mathematics are provided here courtesy of Oxford University Press

RESOURCES