Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2022 Dec 13;87(6):1043-1089.
doi: 10.1093/imamat/hxac027. eCollection 2022 Dec.

Numerical methods and hypoexponential approximations for gamma distributed delay differential equations

Affiliations

Numerical methods and hypoexponential approximations for gamma distributed delay differential equations

Tyler Cassidy et al. IMA J Appl Math. .

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: delay differential equations; functional continuous Runge–Kutta methods; infinite delay equation; linear chain trick.

PubMed Disclaimer

Figures

<sc>Fig.</sc> 1.
Fig. 1.
Trajectory dependence on the shape parameter formula image is not smooth. (A) The trajectory formula image and formula image for formula image calculated with the fixed (black) and smoothed (red) hypoexponential approximations in (3.6). The exact solution formula image is not shown as it overlaps with the two curves. (B) The graph of formula image with formula image, using the fixed (black) and smoothed (red) parameterizations of the hypoexponential approximation, and the exact solution (blue).
<sc>Fig.</sc> 2.
Fig. 2.
Convergence plots for the linear test problem (4.1). We plot formula image as a function of formula image. The slope of formula image gives the convergence rate. formula image is the simulation of (4.1) using the fourth-order FCRK method from Section 2 with fixed step size formula image and formula image is the solution of the equivalent ODE (4.2). Figure (A) shows the comparison against the exact solution when formula image, while figures (B) and (C) show the error between formula image and formula image for formula image and formula image, respectively. Figure (D) shows the solution of the DDE for each test case. The solution formula image of the equivalent ODE (4.2) is calculated using the fourth-order RK method RK45 in Matlab with relative and absolute error tolerance of formula image.
<sc>Fig.</sc> 3.
Fig. 3.
Convergence plots for the nonlinear test problem (4.3). We plot formula image as a function of formula image. The slope of formula image gives the convergence rate. formula image is the simulation of (4.3) using the fourth-order FCRK method from Section 2 with fixed step size formula image and formula image is the solution of the equivalent ODE (4.4). Panels (A—C) show the error between formula image and formula image for formula image, respectively. Panel (D) shows the solution of the DDE for each test case. The solution formula image of the equivalent ODE (4.4) is calculated using the fourth-order RK method RK45 in Matlab with relative and absolute error tolerance of formula image.
<sc>Fig.</sc> 4.
Fig. 4.
Convergence plots for the linear gamma-distributed DDE test problem (4.5). We plot formula image as a function of formula image where formula image is the simulation of (4.5) using the fourth-order FCRK method from Section 2 and formula image is the analytical solution of the linear-distributed DDE. In B, the error reaches machine precision for formula image A–C show the error between formula image and formula image for the parameter triples formula image given by formula image and formula image, respectively.
<sc>Fig.</sc> 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 formula image 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 formula image and formula image, respectively. D–F show the solution of the nonlinear test problem (4.3) for formula image and formula image, respectively.
<sc>Fig.</sc> 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.
<sc>Fig.</sc> 7.
Fig. 7.
Simulated epidemic data and posterior predictive checks. (A) Simulated data formula image and the model prediction formula image. The dark-blue band represents the formula image credible interval, and the light-blue band the formula image prediction interval. (B) Simulated serial intervals represented as a empirical survival function (black), and the fitted survival function for formula image given by formula image (blue).
<sc>Fig.</sc> 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 formula image, formula image, formula image, formula image, formula image and formula image.

Similar articles

References

    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. - PubMed
    1. 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 - PubMed
    1. 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.
    1. Bellen, A. & Zennaro, M. (2013) Numerical Methods for Delay Differential Equations, 1st edn. Oxford: Oxford University Press.
    1. Bobbio, A., Horváth, A. & Telek, M. (2005) Matching three moments with minimal acyclic phase type distributions. Stoch. Model., 21, 303–326.