Top Banner
Stochastic challenges to interrupting helminth transmission Robert J. Hardwick a,b,c,* , Marleen Werkman a,b,c , James E. Truscott a,b,c , Roy M. Anderson a,b,c a London Centre for Neglected Tropical Disease Research (LCNTDR), Department of Infectious Disease Epidemiology, St. Mary’s Campus, Imperial College London, London WC2 1PG, UK b The DeWorm3 Project, the Natural History Museum of London, London SW7 5BD, UK c MRC Centre for Global Infectious Disease Analysis, School of Public Health, Imperial College London, United Kingdom Abstract Predicting the eect of dierent programmes designed to control both the morbidity induced by helminth infections and parasite transmission is greatly facilitated by the use of mathematical models of transmission and control impact. In such models, it is essential to account for as many sources of uncertainty— natural, or otherwise — to ensure robustness in prediction and to accurately depict variation around an expected outcome. In this paper, we investigate how well the standard deterministic models match the predictions made using individual-based stochastic simulations. We also explore how well concepts which derive from deterministic models, such as ‘breakpoints’ in transmission, apply in the stochastic world. Employing an individual based stochastic model framework we also investigate how transmission and control are aected by the migration of infected people into a defined community. To give our study focus we consider the control of soil-transmitted helminths (STH) by mass drug administration (MDA), though our methodology is readily applicable to the other helminth species such as the schistosome parasites and the filarial worms. We show it is possible to define a ‘stochastic breakpoint’ where much noise surrounds the expected deterministic breakpoint. We also discuss the concept of the ‘interruption of transmission’ independent of the ‘breakpoint’ concept where analyses of model behaviour illustrate the current limitations of deterministic models to account for the ‘fade-out’ or transmission extinction behaviour in simulations. The analyses based on migration confirm a relationship between the infected human migration rate per unit of time and the death rate of infective stages that are released into the free-living environment (eggs or larvae depending on the STH species) that create the reservoir of infection which in turn determines the likelihood that control activities aim at chemotherapeutic treatment of the human host will eliminate transmission. The development of a new stochastic simulation code for STH in the form of a publicly-available open-source python package which includes features to incorporate many population stratifications, dierent control interventions including mass drug administration (with defined frequency, coverage levels and compliance patterns) and inter-village human migration is also described. Keywords: Transmission breakpoints, Soil-transmitted helminths, Mathematical models, Control policies, Monitoring and Evaluation 1. Introduction Helminthiases are a class of the neglected tropical dis- eases (NTDs) that aect many hundreds of millions of hu- mans and animals worldwide. One group of worms, the soil- transmitted helminths (STH) are especially prevalent are trans- mitted through the ingestion of eggs (for Ascaris lumbricoides or Trichuris trichuria) or larvae (in the case of the hookworms: Necator americanus and Ancylostoma duodenale). They are estimated to aect 1.45 billion people at present [1, 2]. In recent years, mathematical models of both infectious dis- ease transmission [3, 4, 5] and intervention impact have been widely used in infectious disease epidemiological studies and public health policy formulation [6, 7, 8, 9, 10]. Their use in the study of the NTDs is more recent, where the vari- ety of approaches implemented have included both determin- istic [11, 7] and individual-based stochastic simulation mod- els [12, 13, 14, 15]. Much progress in model formulation, * [email protected] parameter estimation and application has been made over the last 20 years. Model-based analyses are increasingly serving an important role in policy formulation and the evaluation of dierent control policies [16, 17, 18] as is well illustrated by the activities of the Bill and Melinda Gates Foundation funded NTD Modelling consortium [19]. Furthermore, following the London Declaration in 2010, which stimulated the expansion of large mass drug administration (MDA) programmes under the direction of World Health Organization (WHO) guidelines on treatment strategies [17, 20, 21], mathematical models have played an increasing role in determining how best to design and evaluate MDA programmes [22, 23, 24]. Two key concepts emerge from analyses of deterministic models. The first is the existence of a ‘breakpoint’ in trans- mission created by the dioecious nature of the worms (a male and female must be present in the same host to ensure the pro- duction of fertile eggs and pass to the external environment and form the pool of infectious material) which creates an unstable equilibrium separating the stable endemic infection equilibrium . CC-BY-NC-ND 4.0 International license It is made available under a perpetuity. is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted December 18, 2019. ; https://doi.org/10.1101/2019.12.17.19013490 doi: medRxiv preprint NOTE: This preprint reports new research that has not been certified by peer review and should not be used to guide clinical practice.
20

Stochastic challenges to interrupting helminth transmissionDec 17, 2019  · transmitted helminths (STH) are especially prevalent are trans-mitted through the ingestion of eggs (for

Oct 20, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • Stochastic challenges to interrupting helminth transmission

    Robert J. Hardwicka,b,c,∗, Marleen Werkmana,b,c, James E. Truscotta,b,c, Roy M. Andersona,b,c

    aLondon Centre for Neglected Tropical Disease Research (LCNTDR), Department of Infectious Disease Epidemiology,St. Mary’s Campus, Imperial College London, London WC2 1PG, UK

    bThe DeWorm3 Project, the Natural History Museum of London, London SW7 5BD, UKcMRC Centre for Global Infectious Disease Analysis, School of Public Health, Imperial College London, United Kingdom

    Abstract

    Predicting the effect of different programmes designed to control both the morbidity induced by helminth infections and parasitetransmission is greatly facilitated by the use of mathematical models of transmission and control impact. In such models, itis essential to account for as many sources of uncertainty— natural, or otherwise — to ensure robustness in prediction and toaccurately depict variation around an expected outcome. In this paper, we investigate how well the standard deterministic modelsmatch the predictions made using individual-based stochastic simulations. We also explore how well concepts which derive fromdeterministic models, such as ‘breakpoints’ in transmission, apply in the stochastic world. Employing an individual based stochasticmodel framework we also investigate how transmission and control are affected by the migration of infected people into a definedcommunity. To give our study focus we consider the control of soil-transmitted helminths (STH) by mass drug administration(MDA), though our methodology is readily applicable to the other helminth species such as the schistosome parasites and thefilarial worms. We show it is possible to define a ‘stochastic breakpoint’ where much noise surrounds the expected deterministicbreakpoint. We also discuss the concept of the ‘interruption of transmission’ independent of the ‘breakpoint’ concept where analysesof model behaviour illustrate the current limitations of deterministic models to account for the ‘fade-out’ or transmission extinctionbehaviour in simulations. The analyses based on migration confirm a relationship between the infected human migration rate perunit of time and the death rate of infective stages that are released into the free-living environment (eggs or larvae dependingon the STH species) that create the reservoir of infection which in turn determines the likelihood that control activities aim atchemotherapeutic treatment of the human host will eliminate transmission. The development of a new stochastic simulation codefor STH in the form of a publicly-available open-source python package which includes features to incorporate many populationstratifications, different control interventions including mass drug administration (with defined frequency, coverage levels andcompliance patterns) and inter-village human migration is also described.

    Keywords:Transmission breakpoints, Soil-transmitted helminths, Mathematical models, Control policies, Monitoring and Evaluation

    1. Introduction

    Helminthiases are a class of the neglected tropical dis-eases (NTDs) that affect many hundreds of millions of hu-mans and animals worldwide. One group of worms, the soil-transmitted helminths (STH) are especially prevalent are trans-mitted through the ingestion of eggs (for Ascaris lumbricoidesor Trichuris trichuria) or larvae (in the case of the hookworms:Necator americanus and Ancylostoma duodenale). They areestimated to affect 1.45 billion people at present [1, 2].

    In recent years, mathematical models of both infectious dis-ease transmission [3, 4, 5] and intervention impact have beenwidely used in infectious disease epidemiological studies andpublic health policy formulation [6, 7, 8, 9, 10]. Their usein the study of the NTDs is more recent, where the vari-ety of approaches implemented have included both determin-istic [11, 7] and individual-based stochastic simulation mod-els [12, 13, 14, 15]. Much progress in model formulation,

    [email protected]

    parameter estimation and application has been made over thelast 20 years. Model-based analyses are increasingly servingan important role in policy formulation and the evaluation ofdifferent control policies [16, 17, 18] as is well illustrated bythe activities of the Bill and Melinda Gates Foundation fundedNTD Modelling consortium [19]. Furthermore, following theLondon Declaration in 2010, which stimulated the expansionof large mass drug administration (MDA) programmes underthe direction of World Health Organization (WHO) guidelineson treatment strategies [17, 20, 21], mathematical models haveplayed an increasing role in determining how best to design andevaluate MDA programmes [22, 23, 24].

    Two key concepts emerge from analyses of deterministicmodels. The first is the existence of a ‘breakpoint’ in trans-mission created by the dioecious nature of the worms (a maleand female must be present in the same host to ensure the pro-duction of fertile eggs and pass to the external environment andform the pool of infectious material) which creates an unstableequilibrium separating the stable endemic infection equilibrium

    . CC-BY-NC-ND 4.0 International licenseIt is made available under a perpetuity.

    is the author/funder, who has granted medRxiv a license to display the preprint in(which was not certified by peer review)preprint The copyright holder for thisthis version posted December 18, 2019. ; https://doi.org/10.1101/2019.12.17.19013490doi: medRxiv preprint

    NOTE: This preprint reports new research that has not been certified by peer review and should not be used to guide clinical practice.

    mailto:[email protected]://doi.org/10.1101/2019.12.17.19013490http://creativecommons.org/licenses/by-nc-nd/4.0/

  • Basic reproductive number

    Mean

    w

    orm

    b

    urd

    en

    Stable en

    dem

    ic eq.

    Unstable ‘breakpoint’ eq.

    Figure 1: Diagram illustrating the stable endemic equilibrium (solid blackline), unstable ‘breakpoint’ equilibrium (dashed black line) and insufficient R0breakpoint. For reference, the transmission model illustrated is that of soil-transmitted helminth infections with the density dependent fecundity parameterγ = 0.08 and worm aggregation within hosts parameter k = 0.3.

    from the other stable equilibrium of parasite extinction. Inde-pendent of this breakpoint, a further epidemiological situationarises where only one stable equilibrium exists; namely, para-site and transmission extinction where the rate of infection is al-ways too low to sustain the parasites in the human host. In thiscase transmission is interrupted, since an adult female wormin the human host on average, produces too few offspring toensure one of her offspring matures in the human host to per-petuate the lifecycle. For many viral and bacterial infections(the microparasites), this is the situation where the basic repro-duction number, R0 < 1, where R0 describes the generation ofsecondary cases. For the macroparasitic helminths, the conceptof R0 needs modification since it describes the average numberof female offspring, produced by female worms, that survive toreproductive maturity by infecting a new human host and ma-turing within it [7].

    The concept of R0 is further modified by two density depen-dent processes: acting on fecundity as a population regulatoryfactor and acting via the dioecious nature of the worm. Be-cause of the action of these two processes, the crtical R0 valueto sustain transmission is greater than unity in value. These twoconcepts are illustrated diagrammatically in Fig. 1. Note, inparticular, how the darker red shaded region — which demar-cates the R0 < 1 region — is replaced with a lighter shadedred ‘breakpoint’ region once these density dependent processeshave been introduced.

    The importance of these notions when we move from the de-terministic world to a stochastic one is linked to explaining whatthe interruption of transmission really appears as in a noisyworld full of variation and chance events. Even when the deter-ministic breakpoint is crossed, when its value is low due to highdegrees of parasite aggregation in the human host (see Ref. [7]),stochastic noise may induce fluctuations where bounce back orextinction occur [24, 25]. Similarly, even when transmission

    is interrupted when the average female worm produces too fewoffspring to ensure the continuation of the life cycle, stochasticnoise may not always result in parasite extinction in a definedlocation. In this paper, we shall analyze these situations withthe use of a full individual-based stochastic model and certainapproximations to the fully-simulated outcomes. In particularwhat is novel in our approach, is both looking at noise aroundthe breakpoint and the transmission interruption state, and as-sessing how the migration of infected humans influences thelikelihood of achieving effective control or even transmissioninterruption by MDA.

    At present the demand is for increasing complexity in modelsto describe all known biological and epidemiological complex-ities including, for example: differing patterns of complianceto treatment; infected human migration patterns in and out ofdefined control activity regions; and various heterogeneities inhuman behaviour that influence transmission. In such circum-stances, the temptation is to move to ever more complex simu-lation models, with a concomitant growth in parameters and theassociated problems in measurement and estimation. In this pa-per we adopt a somewhat different approach, seeking to addressthe following fundamental questions:

    • How well can deterministic models match the predictionsmade using stochastic simulations?

    • Do the concepts such as ‘breakpoints’ in transmission stillapply when stochasticity is introduced?

    • How are transmission and control affected by infected hu-man migration in a world of stochasticity?

    In addressing these questions here we seek to ascertain the un-certainties that have the greatest impact on forecasts of NTDcontrol initiatives both to enhance the quality of predictions andfocus attention on what needs to be measured to improve accu-racy.

    The results described in this paper are underpinned by vari-ous analytical and numerical methods. We focus attention onstochastic models for STH infection and control, with epidemi-ological parameters set to those of the two hookworm species(Necator americanus and Ancylostoma duodenale). However,the methodologies developed are generalizable to other humanhelminth infections.

    In Sec. 2 we introduce the mathematical model and formal-ism within which the first two main questions posed above areanswered. In Sec. 3 we then extend this formalism to include amodel for MDA control and infected human migration betweenreservoirs of infection, which we then use to answer the thirdquestion above. Lastly, in Sec. 4 we conclude with a summaryof our findings and a discussion of future work.

    2. A stochastic individual-based model

    Following past publications [12, 23], the STH transmissionmodel we introduce here is a stochastic individual-based ana-logue to the deterministic original given in Refs. [26, 11, 7].

    2

    . CC-BY-NC-ND 4.0 International licenseIt is made available under a perpetuity.

    is the author/funder, who has granted medRxiv a license to display the preprint in(which was not certified by peer review)preprint The copyright holder for thisthis version posted December 18, 2019. ; https://doi.org/10.1101/2019.12.17.19013490doi: medRxiv preprint

    https://doi.org/10.1101/2019.12.17.19013490http://creativecommons.org/licenses/by-nc-nd/4.0/

  • For a recent review of stochastic STH models and their predic-tions concerning tramsmission dynamics and control impact,see Ref. [23].

    Consider an ensemble of Poisson walkers, each representingindividual worm hosts within a community, and each assigned aworm uptake rate λ jnΛ j(t) (or the ‘force of infection’) for the n-th individual within the j-th age bin, where one initially drawshuman predispositions to worm uptake from a unit-mean and1/k j-variance gamma distribution1

    λ jn ∼ Gamma(λ jn; k j, k j) =kk jj λ

    k j−1jn

    Γ(k j)e−k jλ jn , (1)

    and one evolves the contribution to the force of infection in thej-th age bin according to the following differential equation

    dΛ jdt

    = µ2(µ + µ1)R0, j

    Na∑j=1

    1Np

    N j∑n=1

    Y[w jn(t)]

    − µ2Λ j(t) , (2)where it is important to note that the quantity which accountsfor egg input into the reservoir from sexually-reproducingworms

    Y jn(t) ≡ Y[w jn(t)] =[1 − 2−w jn(t)+1

    ]w jn(t)zw jn(t)−1 , (3)

    depends on the total number of worms w jn (as opposed to thejust the number of females) in the n-th individual within thej-th age bin. Throughout we shall assume that the standardexponential relationship for STH which takes into account thedensity dependent fecundity of worms z ≡ e−γ [7, 11, 26] is setto γ = 0.08, unless otherwise stated.

    Now let us build a corresponding Poisson process in the op-posing direction to model the worm and human deaths, givenby rates µ1 and µ. In such a model, the total mean worm burdenm(t) is defined as a weighted sum over the mean worm burdenswithin each age bin m j(t) (with Na age bins in total) — whichitself is the average over the individual worm burdens

    m j(t) ≡1N j

    N j∑n=1

    w jn(t) , (4)

    and can hence take different values, depending on the realisa-tion. The stochastic jump equation, which governs its time evo-lution over a population of Np people, takes the following form

    dm(t) ≡Na∑j=1

    N jNp

    dm j(t) =1

    Np

    Na∑j=1

    dU j(t)−1

    Np

    Na∑j=1

    dD j(t) , (5)

    where the worm uptake U j(t) and (worm and human) deathD j(t) are given by the following Poisson processes summed

    1More generally, to include a mean of X, this distribution is modified toGamma(λ jn; k j, k j/X).

    from n = 1 to N j individuals within the j-th age bin

    U j(t) =N j∑

    n=1

    ∞∑i=0

    ui jn1[ti,∞)(t) (6)

    D j(t) =N j∑

    n=1

    ∞∑i=0

    di jn1[ti,∞)(t) (7)

    ∆ti ∼ ExpDist (∆ti; 1/τ) =1τ

    e−∆tiτ (8)

    (ui jn, di jn) ∼

    (1, 0) Pr(1, 0) = λ jnΛ j(t)

    λ jnΛ j(t)+(µ+µ1)w jn(t)+1/τ

    (0, 1) Pr(0, 1) = (µ+µ1)w jn(t)λ jnΛ j(t)+(µ+µ1)w jn(t)+1/τ

    (0, 0) Pr(0, 0) = 1/τλ jnΛ j(t)+(µ+µ1)w jn(t)+1/τ

    , (9)

    where ∆ti ≡ ti − ti−1, τ is a pre-specified timescale short enoughsuch that no event is expected to take place.

    2.1. Our computational implementation in briefWe have developed a new stochastic simulation code for

    helminth transmission based on the model defined above. Thiscode comes in the form of a publicly-available open-sourcepython class: helmpy, which includes features to incorporateany population stratifications, models of control with MDA,inter-cluster human migration (building from earlier work inRefs. [27, 28]) and an interactive notebook tutorial for calcu-lating all of the quantities discussed in this paper.2 This codewill also be extended to include the other helminths in the fu-ture.

    The individual-based stochastic model implemented in thehelmpy code follows a similar pattern to the Gillespie al-gorithm [29], however we also adopt a separate methodol-ogy for the mean field expansion (which we shall introducelater) to compare the with the former, which relies on a multi-dimensional Langevin solver, i.e., numerically evolves manycoupled drift-diffusion processes simultaneously — see, e.g.,Ref. [30].

    The code is written in a (mostly) vectorised implementationof the python programming language. To provide a benchmarkfor the performance, we note here that a single individual-basedstochastic realisation of the code which implements multipleMDA treatment rounds and migration between 40 clusters of500 people (each cluster corresponding to a different infectiousreservoir) requires ∼ 20 minutes to run for 100 years on a laptopwith a 1.7 GHz Intel Core i5 processor and 4GB of memory.

    2.2. The approximate worm burden distributionStochastic individual-based simulations of STH transmission

    seek to incorporate a range of uncertainties into the population-level dynamics of the host-parasite interaction. It is interest-ing to note that these may typically be categorised into eitherone, or all, of three important biological/epidemiological com-ponents:

    2The code is also accompanied by an interactive notebook of examplesmatching the calculations made in this paper which may be found in the on-line repository: https://github.com/umbralcalc/helmpy.

    3

    . CC-BY-NC-ND 4.0 International licenseIt is made available under a perpetuity.

    is the author/funder, who has granted medRxiv a license to display the preprint in(which was not certified by peer review)preprint The copyright holder for thisthis version posted December 18, 2019. ; https://doi.org/10.1101/2019.12.17.19013490doi: medRxiv preprint

    https://sites.google.com/view/helmpyhttps://sites.google.com/view/helmpyhttps://www.python.org/https://github.com/umbralcalc/helmpyhttps://doi.org/10.1101/2019.12.17.19013490http://creativecommons.org/licenses/by-nc-nd/4.0/

  • 1. Uncertainty in predispositions of people (i.e. the specificchance of a particular group of people having their predis-positions to STH infection drawn from a probability distri-bution), i.e., finite population uncertainty induced by spe-cific samples of realisations.

    2. Uncertainty in precisely when new infections, resulting innew worm acquisition, or worm/host deaths, resulting inworm loss, occur, i.e., dynamical uncertainty about pre-cisely when events occur.

    3. Uncertainty in the demographic parameters and initialconditions of the given human community (or ‘system’)under consideration, i.e., either prior or posterior uncer-tainty on the initial conditions.

    One may average over the above forms of uncertainty eitherindividually, or in combination. In particular, to obtain the dy-namics corresponding to deterministic models of STH trans-mission, one must average over the first two — which we shallhereafter refer to as an ‘ensemble average’. The ensemble av-erage of Eq. (2) may be written as

    dE(Λ j)dt

    = µ2(µ+µ1)R0, j

    Na∑j=1

    N jNp

    E[Y jn(t)]

    −µ2E[Λ j(t)] , (10)where the result

    E[Y jn(t)] = M j(t)

    [1 + (1 − z)

    M j(t)k j

    ]−(k+1)−

    [1 + (2 − z)

    M j(t)2k j

    ]−(k+1) , (11)has been derived in numerous Refs. [26, 11, 7]. Note that wehave also defined the ensemble average over m j(t) as M j(t) ≡E[m j(t)]. Performing an equivalent ensemble average overN jm j, the mean-field evolution equation for M j(t) is given by

    N jdM jdt

    = N jdE(m j)

    dt=

    dE(U j)dt

    −dE(D j)

    dt(12)

    dE(U j)dt

    =

    N j∑n=1

    E[λ jnΛ j(t)] = N jE[Λ j(t)] (13)

    dE(D j)dt

    =

    N j∑n=1

    (µ + µ1)E[w jn(t)] = (µ + µ1)N jM j(t) , (14)

    matching the standard theory of the mean or ‘deterministic’ dis-ease model [7]. Note that we have also used Eq. (1) to iden-tify E[λ jnΛ j(t)] = E(λ jn)E[Λ j(t)] = E[Λ j(t)] assuming that λ jnand Λ(t) may be treated as independent random variables. Notethat this latter assumption is especially poor when the numberof infected individuals (predominately controlled by k and/ortreatment) is low since a limited number of individuals assert-ing their influence on the reservoir will lead to stronger cross-correlations of the form E[λ jnΛ j(t)] − E(λ jn)E[Λ j(t)] , 0.

    In contrast to the simplicity of computing the dynamicalequations for M j(t) above, calculating the time evolution ofV j(t) ≡ Var[m j(t)] will require knowledge of the overall dis-tribution.

    It is straightforward to derive a master equation which gov-erns the out-of-equilibrium behaviour of the n-th individual’s(in the j-th age bin) worm burden distribution as a function oftime P(w jn, t). This is

    ddt

    P(w jn, t) = −[λ jnΛ j(t) + (µ + µ1)w jn

    ]P(w jn, t)

    + (µ + µ1)(w jn + 1)P(w jn + 1, t)+ λ jnΛ j(t)P(w jn − 1, t) , (15)

    where one recognises the solution as an inhomogeneous Pois-son walker w jn(t) ∼ Pois[w jn(t);I jn(t)] with intensity (for theexplicit derivation, see Appendix A)

    I jn(t) = I jn(t0)e−(µ+µ1)(t−t0) + λ jn∫ t

    t0Λ j(t′)e−(µ+µ1)(t−t

    ′)dt′ .

    (16)Therefore, for an ensemble of N j independent walkers (henceindividuals) the corresponding probability mass function is alsothat of a Poisson distribution

    N jm j(t) =N j∑

    n=1

    w jn(t) ∼ Pois N j∑

    n=1

    w jn(t);N j∑

    n=1

    I jn(t) , (17)

    where we have also used the definition of the mean worm bur-den in the j-th age bin given by Eq. (4). Note that in the casewhere Λ j(t) is roughly constant for all time, the timescale forthe distribution to achieve stationarity is ∆tstat ' 1/(µ + µ1).

    Note that by assuming that the reservoir of infection Λ(t) inEq. (16) is deterministic in time and averaging over λ jn accord-ing to Eq. (1), one recovers the well-established [7] negativebinomial distribution for worms within hosts as the result of agamma-poisson mixture. In reality, of course, the sample meanestimate for the number of infectious stages entering the reser-voir in Eq. (2) will induce stochastic fluctuations in Λ(t). Es-timating the amplitude of these fluctuations will be essential toevaluating the distribution of worms within hosts in the stochas-tic individual-based simulation.

    To begin with, we must first understand the variation in Λ j(t)that is induced from the finite sample of N j individuals assignedwith an initial value of λ jn. The implicit solution to Eq. (2) isgiven by

    Λ j(t) = Λ j(t0)e−µ2(t−t0)

    + µ2(µ + µ1)R0, jNa∑j=1

    1Np

    N j∑n=1

    ∫ tt0

    Y jn(t′)e−µ2(t−t′)dt′ . (18)

    Between ensemble realisations of Eq. (18), the only source ofrandom variation is the sample variance in individual worm bur-dens when computing the value of the double sum

    Ȳ(t) ≡Na∑j=1

    N j∑n=1

    Y jn(t) . (19)

    As discussed in Ref. [28], the extremely short reservoirtimescale 1/µ2 compared to the timescales of the other pro-cesses, e.g., 1/µ and 1/µ1, allows for an accurate approximation

    4

    . CC-BY-NC-ND 4.0 International licenseIt is made available under a perpetuity.

    is the author/funder, who has granted medRxiv a license to display the preprint in(which was not certified by peer review)preprint The copyright holder for thisthis version posted December 18, 2019. ; https://doi.org/10.1101/2019.12.17.19013490doi: medRxiv preprint

    https://doi.org/10.1101/2019.12.17.19013490http://creativecommons.org/licenses/by-nc-nd/4.0/

  • to Eq. (18) to be made where one may coarse-grain (integrate)over time such that

    Λ j(t) ' (µ + µ1)R0, jNa∑j=1

    1Np

    N j∑n=1

    Y jn(t) = (µ + µ1)R0, j1

    NpȲ(t) .

    (20)If one now also assumes that w jn is drawn from an approxi-mately negative binomial distribution then the distribution of∑Na

    j=1 N j samples drawn from the individual’s egg input distri-bution is approximately also a negative binomial with updatedmean and variance [28] such that

    Ȳ ∼ NB[Ȳ; E(Ȳ),Var(Ȳ)] =

    Γ[Ȳ + E(Ȳ)

    2

    Var(Ȳ)−E(Ȳ)

    ]Γ(Ȳ + 1) Γ

    [E(Ȳ)2

    Var(Ȳ)−E(Ȳ)

    ] [Var(Ȳ) − E(Ȳ)Var(Ȳ)

    ]Ȳ [ E(Ȳ)Var(Ȳ)

    ] E(Ȳ)2Var(Ȳ)−E(Ȳ)

    (21)

    E(Ȳ) ≡Na∑j=1

    N jE[Y jn(t)] (22)

    Var(Ȳ) ≡Na∑j=1

    N2j Var[Y jn(t)] , (23)

    where one may compute the variance of the egg input distribu-tion through evaluation of its second moment, yielding

    Var[Y jn(t)] =

    Na∑j=1

    N2j

    M j(t) +

    (z2 + 1k j

    )M j(t)2[

    1 +(1 − z2) M j(t)k j ]k j+2 +

    M j(t) +(

    z24 +

    1k j

    )M j(t)2[

    1 +(1 − z24

    ) M j(t)k j

    ]k j+2−

    2M j(t) +(z2 + 2k j

    )M j(t)2[

    1 +(1 − z22

    ) M j(t)k j

    ]k j+2 − E[Ȳ(t)]2 .

    (24)

    By combining Eqs. (1), (17), (20) and (21) we may infer thatthe full distribution over ensemble realisations of P(w jn, t) maybe approximated by

    P(w jn, t) '∞∑

    Ȳ=0

    ∫ ∞0

    dλ jnPois[w jn;I jn(t)

    ]× Gamma

    (λ jn; k j, k j

    )NB[Ȳ; E(Ȳ),Var(Ȳ)] ,

    (25)

    where we have marginalised over all possible reservoir config-urations Ȳ (within the negative binomial approximation) andindividual uptake rates λ jn. In Appendix B we calculate theapproximate ensemble mean and variance of the mean wormburden constructed from summed samples from Eq. (25). Sam-pling directly from Eq. (25), one may effectively reconstruct anaccurate ensemble of realisations at any specified point in timeas long as the negative binomial approximation of the reservoiris accurate. However, accurate temporal correlations betweenthe sum of individuals will require alternative methods.

    2.3. A mean field expansion of the systemIn order to obtain a better approximation to the temporal cor-

    relations of the system, we shall perform a mean field expan-sion which allows us to calculate an accurate approximation tothe stochastic noise around the mean worm burden of the de-terministic STH model. Let us now rewrite the value of N jm jin separate components which depend differently on the systemsize N j, to obtain

    N jm j = N j〈m j(t)〉 + N1/2j ξ j(t) (26)

    =

    N j∑n=1

    I jn(t) + N1/2j ξ j(t) , (27)

    where ξ j(t) denotes a fluctuation in each age bin at each momentin time.

    Note that in Eq. (26) we have performed a temporal average(as opposed to ensemble average) over the states of the Poissonwalkers, each with intensity I jn(t) — see Eq. (17). The fullensemble of realisations for the system, which includes a ran-dom set of values chosen for λ jn, is not strictly ergodic. Hence,in order to assess the temporally correlated behaviour, in thissection we shall use the temporal average (with notation 〈·〉) torefer to drawing the random values of λ jn a priori for a givenrealisation of the system — averaging over only the uncertaintycomponent 2. as discussed at the beginning of Sec. 2.2. The fullensemble may then be restored subsequently by a second aver-aging over finite population samples (component 1. of Sec. 2.2)a posteriori.

    In Appendix C we perform a van Kampen [31] expansion toobtain a Fokker-Planck equation for the evolution of the distri-bution over fluctuations ξ j in time, which is

    ∂tP̃(ξ j, t) =

    ∂ξ j

    [(µ + µ1)ξ jP̃(ξ j, t)

    ]+

    12N j

    (µ + µ1) N j∑n=1

    I jn(t) +N j∑

    n=1

    λ jnΛ j(t)

    ∂2∂ξ2j P̃(ξ j, t) ,(28)

    which has the following stationary solution

    P̃(ξ j, t)∣∣∣stat ∝ exp

    − N j(µ + µ1)ξ2j(µ + µ1) ∑N jn=1 I jn(t) + ∑N jn=1 λ jnΛ j(t) .(29)

    The exact form of the force of infection Λ j(t) is not generallyknown, however in the limit where the mean-field equationsapply, the following estimator may be intuited which uses theensemble average

    N jΛ j(t) 'N j∑

    n=1

    λ jnE[Λ j(t)] . (30)

    Using the approximation in Eq. (30) we may thus use the solu-tion to the mean field Eqs. (10) and (12) to stochastically evolvetrajectories of the mean worm burden with temporal correla-tions.

    5

    . CC-BY-NC-ND 4.0 International licenseIt is made available under a perpetuity.

    is the author/funder, who has granted medRxiv a license to display the preprint in(which was not certified by peer review)preprint The copyright holder for thisthis version posted December 18, 2019. ; https://doi.org/10.1101/2019.12.17.19013490doi: medRxiv preprint

    https://doi.org/10.1101/2019.12.17.19013490http://creativecommons.org/licenses/by-nc-nd/4.0/

  • Table 1: The particular configurations with hookworm parameters [32] used fordemonstration in this work.

    Configuration Parameter choices (t0 is initial time)C1 R0 = 3.5; k = 0.3;

    M(t0) = 2.9; and Res.(t0) = 1.25C2 R0 = 2.1; k = 0.5;

    M(t0) = 2.1; and Res.(t0) = 1.1All cases γ = 0.08; µ = 1/70; µ1 = 1/2;

    and µ2 = 26 (last three are per year)

    2.4. Deterministic models versus stochastic simulations

    Having established the main mathematical preliminaries, inthe analysis of our results it will be convenient to refer to spe-cific configurations of the human heminth system (accordingto initial choices of transmission parameters) to illustrate ourresults more effectively. These configurations shall always in-clude the following choices corresponding to the hookwormtimescales of: the adult worm death rate µ1 = 1/2 per year(or an average life span of 2 years); the eggs/larvae death rate inthe infectious reservoir µ2 = 26 per year (or an average life spanof 2 weeks) and a density-dependent worm fecundity power ofγ = 0.08 [32]. We also have provided the particular choices ofparameters in the configurations C1 and C2 of Table 1. Con-figuration C1 has been chosen with parameters such that thesystem is far from the unstable ‘breakpoint’ equilibrium as il-lustrated in Fig. 1, conversely, configuration C2 has been cho-sen such that the system is much closer to the breakpoint for aclear comparison.

    In Sec. 2.2, we stated that deterministic models of STH trans-mission are obtained by averaging over both of the uncertaintiesin predispositions to infection and when events precisely occurin time. As such, the first of our results regarding the relation-ship between the deterministic models of STH transmission andstochastic simulations is not unexpected. The deterministic pre-dictions for the dynamics of the mean worm burden [7] and themean of the mean worm burdens derived from individual-basedsimulations exactly match — see, for instance, the good matchbetween dashed lines plotted in the left and right top panels ofFig. 2, where we have plotted the dynamics of the mean wormburdens in a community with parameters in configuration C1(see Table 1) for a range of population sizes. The left and rightcolumns of this figure correspond to the numerical solution tothe fully individual-based stochastic simulation that we definedat the beginning of Sec. 2 and the mean field model with thestochastic noise approximation using Eqs. (27) and (28), re-spectively.

    Considering the same pair of plots (top row) in Fig. 2 inmore detail we find that, for a given range of parameters, thetwo methods used to generate the 68% credible intervals abouteach mean value also agree to very good accuracy. This agree-ment is not always the case, however, as we illustrate withthe same pair of plots but with different transmission param-eters on the bottom row of Fig. 2. Given configuration C2 (seeTable 1), in which the endemic equilibrium value is situatedcloser to the unstable ‘breakpoint’ equilibrium, we find that

    an important phenomenon which exists in the individual-basedstochastic simulation is not present in the deterministic model— this phenomenon is known as ‘fade-out’ in the parasite pop-ulation. ‘Fade-out’ is where transmission is interrupted due tochance events, even when the underlying transmission success(the value of R0) is above the level that deterministic modelspredict will result in parasite persistence. In other words, val-ues just above the transmission breakpoint of the deterministicmodel may indeed move to parasite extinction, due to chanceeffects.

    Ordinarily in disease transmission models, the stochasticnoise approximation using Eqs. (27) and (28) may be used tocompute similar ‘fade-out’ effects to great accuracy, see, e.g.,in an SIR model [33]. However, the presence of the unstable‘breakpoint’ equilibrium leads to a stronger fade-out effect asone can observe in the drift towards a zero mean worm burden(transmission interruption) of the lower 68% credible intervalcontour (and mean) in the bottom row plots of Fig. 2 with pop-ulation sizes of 100 and 350, and which markedly reduces theaccuracy of the mean field stochastic approximation. A simpleGaussian approximation notwithstanding, fade-out is a very im-portant phenomenon of considerable practical relevance to theprospect of helminth transmission interruption. Note that theprobability of a fade-out event also increases from very smallto large as village population size decreases, as is also shownby the results of Fig. 2. The inability of the stochastic noiseapproximation model to capture the fade-out phenomenon isof considerable interest and is requires a more detailed mathe-matical description of the stochastic dynamics of the reservoirof infection. Such work is planned for investigation in futurework.

    In our analysis in this section, although we ignored age struc-ture, its inclusion does not influence the general insights al-though it will influence quantitative detail. For hookworm, theabsence of age structure is not too serious, even in quantitativeterms since field studies suggest that the force of infection isoften independent of age [32]. To illustrate this point, in Fig. 3we have plotted the C1 configuration (see Table 1) with relevanthookworm age stucture included, where the difference betweenFig. 3 and the top left plot of Fig. 2 is very small.

    2.5. The ‘breakpoint’ of stochastic simulationsSTHs are dioecious and therefore both male and female par-

    asites must be in the same host for the female worm to be fertil-ized and produce viable eggs or larvae which sustain transmis-sion. Past research in the context of the deterministic modelsof transmission has demonstrated that there are three apparentequilibria: a stable endemic state, parasite extinction, and anunstable state termed the ‘transmission breakpoint’ which liesbetween the stable state and parasite extinction [34, 35, 36].The existence of such a breakpoint can be intuited by the abovelimitations of STH reproduction when it becomes difficult tofind a male and female worm pair within an individual hostand it represents a clear target for control policies which aimto achieve transmission interruption. As we also discussed ear-lier in Sec. 1 and illustrated in Fig. 1, this (dashed) breakpointcurve in the phase plane of Fig. 1 acts as a separatrix between

    6

    . CC-BY-NC-ND 4.0 International licenseIt is made available under a perpetuity.

    is the author/funder, who has granted medRxiv a license to display the preprint in(which was not certified by peer review)preprint The copyright holder for thisthis version posted December 18, 2019. ; https://doi.org/10.1101/2019.12.17.19013490doi: medRxiv preprint

    https://doi.org/10.1101/2019.12.17.19013490http://creativecommons.org/licenses/by-nc-nd/4.0/

  • Mea

    n w

    orm

    bur

    dens

    Time (years)

    100 people 350 people 1000 people

    Far from unstable ‘breakpoint’ so

    ‘fade-out’ effects are weak

    Mea

    n w

    orm

    bur

    dens

    Time (years)

    100 people 350 people 1000 people

    Mean field stochastic model matches

    individual-based simulation

    Mea

    n w

    orm

    bur

    dens

    Time (years)

    100 people 350 people 1000 people

    ‘Fade-out’ ‘Fade-out’

    Unstable ‘breakpoint’ eq.

    Mea

    n w

    orm

    bur

    dens

    Time (years)

    100 people 350 people 1000 people

    ‘Fade-out’ effect is not as strong

    Unstable ‘breakpoint’ eq.

    Figure 2: Two different examples (in both left and right panels) of the expected (dashed lines) and 68% credible regions (between the solid lines) of the possiblemean worm burdens realised in time by the stochastic fully individual-based simulation method (left column) and the counterpart simulations using a mean fieldstochastic approximation method (see Eqs. (27) and (28)) have also been run for comparison (right column). The top row corresponds configuration C1 in Table 1.The bottom row corresponds configuration C2 in Table 1.

    7

    . CC-BY-NC-ND 4.0 International licenseIt is made available under a perpetuity.

    is the author/funder, who has granted medRxiv a license to display the preprint in(which was not certified by peer review)preprint The copyright holder for thisthis version posted December 18, 2019. ; https://doi.org/10.1101/2019.12.17.19013490doi: medRxiv preprint

    https://doi.org/10.1101/2019.12.17.19013490http://creativecommons.org/licenses/by-nc-nd/4.0/

  • Mea

    n w

    orm

    bur

    dens

    Time (years)

    2 x 50 people 2 x 175 people 2 x 500 people

    Relatively small changes in behaviour

    if the endemic equilibrium is the same

    Figure 3: An example demonstrating the relatively small effects of age struc-ture on stochastic individual-based model with the original configuration of C1in Table 1. In this instance, the population has been split into two equal-sizedcomponents of ages 0-14 and 15+, where we the worm uptake rate in the caseof the 15+ group has been set to exactly 3 times that of the 0-14 group. Theobserved lack of an effect may be restricted to hookworm infections where theforce of infection is often constant across age classes. This is not the case forAscaris and Trichuris infections [23].

    the attractor basins of the stable (endemic) and exctinction equi-libria.

    Extensive past numerical analyses based on using theindividual-based simulation code [37, 25] strongly indicate thatthe uncertainties which are inherent in individual-based simu-lations dominate the transmission dynamics near the determin-istic breakpoint in transmission. This is especially true if thebreakpoint is close to the endemic equilibrium of parasite ex-tinction (as opposed to the stable equilibrium of endemic in-fection) as a consequence of high degree of parasite aggrega-tion in the human population [38, 7], as is illustrated by theappearance of the fade-out effect between the top left and bot-tom left plots of Fig. 2. Furthermore, in the previous section,we highlighted some limitations in the standard formulationof deterministic models to account for the specific phenomenaof population ‘fade-out’ (or spontaneous transmission interrup-tion) which are present in the real world due to chance effects inpopulation growth and decay especially when host populationdensities are low. Such effects are also captured by individual-based stochastic simulation models. It may hence be reasonableto ask whether concepts which exist in the deterministic frame-work are present in the stochastic simulations.

    Conclusions drawn from hookworm simulation studies inRefs. [25, 37] for a range of population sizes study thresholds inprevalence in the range 0.5%-2% below which the probabilityof transmission interruption is assessed. In particular, attaininga prevalence below the threshold of ∼ 1% for population sizes100-1000 leads to interruption of transmission with a high prob-ability. In this section, we provide a theoretical argument for theexistence of this threshold as a ‘stochastic breakpoint’ whichworks in a similar way to the behaviour present in deterministicmodels, but accounting for some unavoidable uncertainty.

    Let us define a net ‘grower’ as an individual who, given a par-ticular reservoir of infection and adult worm death rate, is ableto accumulate more than one worm over time in a consistentmanner (an individual who is predisposed to infection). Suchindividuals are crucial to the survival of the parasite in a definedcommunity as they provide future material to the reservoir ofinfective stages in the habitat which subsequentially may growthe number of human hosts who become net growers of infec-tion themselves, and so on. One can typically state that if thenumber of human hosts in which the parasite population grows(net growers) is one or more in a given cluster or community ofpeople, then the chances of parasite extinction in the long-termare low.

    Immediately after, e.g., treatment through an MDA pro-gramme, only a limited number of infected individuals remainin each age bin Ninf and hence are able to contribute to the reser-voir in the following timesteps (until further relaxation of thesystem towards some equilibrium). Using a modified versionof Eq. (20) we may infer the following estimate of the infec-tious reservoir contribution by those individuals into the j-thage bin

    Λ j(t)∣∣∣inf '

    (µ + µ1)R0, jNa∑j=1

    1Np

    Ninf∑n=1

    Y jn(t) ≡ (µ + µ1)R0, j1

    NpȲ(t)

    ∣∣∣inf . (31)

    Hence, by further assuming that the fluctuations in the reser-voir of infection are well-approximated by the negative bino-mial distribution, we may evaluate the expected maximum frac-tion E( f >1max) — of all individuals in the cluster — whose ratiobetween their uptake rate λ jnΛ j(t)

    ∣∣∣inf and the death rate of a

    single worm (µ + µ1) exceeds 1 through the following integralmotivated by the form of Eq. (25)

    E( f >1max) '∞∑

    Ȳ=0

    ∫ ∞0

    dλ jnΘ[R0, jλ jnȲ

    ∣∣∣inf − Np

    ]× Gamma

    (λ jn; k j, k j

    )NBinf[Ȳ; E(Ȳ),Var(Ȳ)] ,

    (32)

    where NBinf[Ȳ; E(Ȳ),Var(Ȳ)] denotes the reservoir egg countnegative binomial distribution corresponding to Ȳ|inf and Θ(·)is a Heaviside function. Given Eq. (32) he expected number ofnet growers is therefore simply NpE( f >1max).

    Let us now define the prevalence of infection p as the fractionof the total population who are infected. We therefore deducethat p = Ninf/Np. Using Eqs. (25) and (32), we have plotted acalculation of both the probability of the number of net growersfor communities with configurations C1 and C2 (see Table 1)in Fig. 4 and the expected number of net growers as a functionof the prevalence in Fig. 5 for a wide range of system config-urations. In both sets of plots we consider population numbersof 100, 350 and 1000, as indicated.

    Fig. 4 demonstrates that for system configurations furtherfrom the unstable ‘breakpoint’ equilibrium — configuration C1in the right column of plots — the probability of exceeding anet number of growers larger than 1 becomes large once the 1%

    8

    . CC-BY-NC-ND 4.0 International licenseIt is made available under a perpetuity.

    is the author/funder, who has granted medRxiv a license to display the preprint in(which was not certified by peer review)preprint The copyright holder for thisthis version posted December 18, 2019. ; https://doi.org/10.1101/2019.12.17.19013490doi: medRxiv preprint

    https://doi.org/10.1101/2019.12.17.19013490http://creativecommons.org/licenses/by-nc-nd/4.0/

  • Rela

    tive p

    roba

    bilit

    y

    Number of net growers

    100 people

    2% prevalence

    1% prevalence

    Rela

    tive p

    roba

    bilit

    y

    Number of net growers

    100 people

    2% prevalence

    1% prevalence

    Rela

    tive p

    roba

    bilit

    y

    Number of net growers

    350 people

    2% prevalence

    1% prevalence

    0.5% prevalence

    Rela

    tive p

    roba

    bilit

    y

    Number of net growers

    350 people

    2% prevalence

    1% prevalence

    0.5% prevalence

    Rela

    tive p

    roba

    bilit

    y

    Number of net growers

    1000 people

    2% prevalence

    1% prevalence

    0.5% prevalence

    Rela

    tive p

    roba

    bilit

    y

    Number of net growers

    1000 people

    2% prevalence

    1% prevalence

    0.5% prevalence

    Figure 4: The relative probability (the probability mass divided by the maximum value) of a number of individuals who will gain more than one worm, or, ‘netgrowers’ given that effectively only one individual is contributing to the reservoir of infection per unit time for two different system configurations (given by theleft and right columns). This probability has been calculated using Eq. (25) and the condition for a net grower — as discussed in Sec. 2.5. The right columns havethe same parameters of the system as those of configuration C1 in Table 1 (which is assumed to have attained an endemic equilibrium mean worm burden). Theleft columns have the same parameters of the system as those of configuration C2 in Table 1 (which is also assumed to have attained an endemic equilibrium meanworm burden).

    9

    . CC-BY-NC-ND 4.0 International licenseIt is made available under a perpetuity.

    is the author/funder, who has granted medRxiv a license to display the preprint in(which was not certified by peer review)preprint The copyright holder for thisthis version posted December 18, 2019. ; https://doi.org/10.1101/2019.12.17.19013490doi: medRxiv preprint

    https://doi.org/10.1101/2019.12.17.19013490http://creativecommons.org/licenses/by-nc-nd/4.0/

  • prevalence threshold, with the contrary being true below thisthreshold. The plots in the left column — which correspondto configuration C2 — the probability for the number of netgrowers to be above 1 remains low even for a prevalence of2%, which is to be expected due to this configuration’s proxim-ity to the unstable ‘breakpoint’ equilibrium. Furthermore, fromFig. 5, it is immediately apparent that the expected number ofgrowers is extremely unlikely to exceed 1 if the prevalence ofinfection is lower than ∼ 1% in all cases of population num-ber. Hence, this threshold essentially acts as a ‘stochastic break-point’, below which the probability of interrupting transmissionin stochastic individual-based simulations becomes very likely.

    Note that caveats to our analysis here include varying thepopulation number well beyond the prior limits used in ourshort sensitivity analysis — in such situations it is possible forapparent thresholds to go much lower or higher, e.g., considerthe small, but non-negligible probabilities of sustaining trans-mission below a prevalence of 1% for much larger populationnumbers than those studied here in Ref. [37]. It is importantto also mention that the approximate bound we obtain on theprevalence as a ‘stochastic breakpoint’ applies as more of astrict bound and hence does not exclude the possibility (or evenhigh likelihood in some specific configurations) of eliminationat a higher prevalence of 2%. Our discussion here is thereforecomplementary (and not contradictory) to, e.g., Ref. [25].

    We expect that similar conclusions apply in settings whereparasite interruption is predicted since the basic reproductionnumber (R0) is too low to sustain transmission (see Fig. 1).If the mean worm load is just below this critical R0 value tosustain transmission in regions where the only stable state isparasite extinction, there will be a probability distribution ofsituations where parasite persistence occurs for a while due tochance events which may obscure the precise location of thisthreshold.

    Our short analysis in this section has provided some theoret-ical justification for the existence of a ‘stochastic breakpoint’which has been identified to be an important target for trans-mission interruption from previous hookworm simulation stud-ies [25, 37] and our analysis may also be extended to other par-asites, which shall be subject of future work.

    2.6. A note on modifying the reservoir to account for ageingIn the stochastic model we have built, the effect of people

    ageing over time has been neglected so far. Assuming that theeffective number of people in each age bin remains unchanged,the passing of individuals between age bins may be fully ac-counted for as a reservoir pulse of the same form as Eq. (33)which introduces new egg pulses drawn from the ( j − 1)-th agebin and removes eggs from the j-th bin into the ( j + 1)-th bin.

    The reservoir fluctuation model described above demon-strates how ageing can can only affect the system by a signif-icant variation in k j between bins — furthermore, such fluctu-ations are can be shown to be damped significantly when theage bins are much wider than 1/(µ + µ1) due to the relaxationtimescale of each individual Poisson walker (see, e.g., Eq. (17)).In light of this fact, we have elected to avoid a direct descrip-tion of ageing in this work without loss of generality in our

    Expe

    cted

    num

    ber o

    f net

    grow

    ers

    Prevalence

    100 people

    Most configurations

    require > 1% prevalence

    Expe

    cted

    num

    ber o

    f net

    grow

    ers

    Prevalence

    350 people

    Most configurations still

    require > 1% prevalence

    Expe

    cted

    num

    ber o

    f net

    grow

    ers

    Prevalence

    1000 people

    Most configurations still

    require > 1% prevalence

    but extreme values are

    more common

    Figure 5: The expected number of individuals who will gain more than oneworm, or, ‘net growers’ given that effectively only one individual is contribut-ing to the reservoir of infection per unit time for a range of different systemconfigurations. These values have been obtained by randomly sampling con-figurations of Eq. (32) with flat priors defined over the following intervals inone cluster without age structure for illustration: the basic reproduction num-ber R0 ∈ [2, 4]; the logarithim (base 10) of the worm aggregation parameterlog10 k ∈ [−4, 0]; the initial mean worm burden M(t0) ∈ [2, 5] and an assumeddensity-dependent worm fecundity power of γ = 0.08. The range of systemconfigurations sampled corresponds to much wider range than those given inFig. 4.

    10

    . CC-BY-NC-ND 4.0 International licenseIt is made available under a perpetuity.

    is the author/funder, who has granted medRxiv a license to display the preprint in(which was not certified by peer review)preprint The copyright holder for thisthis version posted December 18, 2019. ; https://doi.org/10.1101/2019.12.17.19013490doi: medRxiv preprint

    https://doi.org/10.1101/2019.12.17.19013490http://creativecommons.org/licenses/by-nc-nd/4.0/

  • argumentation, while leaving future versions of our stochas-tic simulation to include these sub-dominant effects. Past pub-lished individual-based stochastic models of helminth transmis-sion have included a dynamically ageing population [23].

    3. Extensions to the stochastic individual-based model

    3.1. The effect of infected human migration

    Up until this point we have not considered processes whichmay modify the standard STH transmission model. Applyingcontrol measures through MDA and the effect of infected hu-man migration between clusters are both processes which mod-ify the dynamics. The impact of MDA has been covered invarious recent publications [39, 25, 37], whereas, infected hu-man migration in the context of STH transmission has only re-cently been addressed in the context of its impact on achievingbreakpoints in transmission [27, 28]. In the context of STH in-fections it is necessary for infected people to be present at alocation long enough to contribute to the infectious reservoir.

    In this paper, we incorporate the migration model for STHdescribed in Ref. [28] into our individual-based stochastic sim-ulation. We shall use this model to describe the consequencesthat infected human migration has on human helminth trans-mission using illustrative examples. In Ref. [28] the relativesize of the migration rate of individual egg counts into or out ofa region (e.g., some number of people per year) compared to thedeath rate of infectious stages within the reservoir, µ2 (µ2 = 26per year for hookworm), was found to be have important impli-cations for the effect of migration on transmission. Hence, inall of the results on migration in this section, the migration rateshall be quoted as a factor of µ2 to investigate the importance ofthe ratio between these two parameters in the fully individual-based stochastic simulation.

    The migration of infected individuals between clusteredcommunities represents a combination of both the finite pop-ulation and dynamical uncertainty described at the beginningof Sec. 2.2. A simple modification to the model we have intro-duced, which builds from the work in Ref. [28], may be con-sidered to incorporate the effects of human migration into thetransmission dynamics: consider a compound Poisson process` j(t) which perturbs Eq. (2) in the following way3

    Λ j(t)→ Λ j(t) + ` j(t) (33)

    ` j(t) = (µ + µ1)R0, j1

    Np

    ∞∑i=1

    piYi1[ti,∞)(t) (34)

    Yi ∼ NB[Yi; E(Y),Var(Y)] =

    Γ[Yi +

    E2(Y)Var(Y)−E(Y)

    ]Γ(Yi + 1) Γ

    [E2(Y)

    Var(Y)−E(Y)

    ] [Var(Y) − E(Y)Var(Y)

    ]Yi [ E(Y)Var(Y)

    ] E2(Y)Var(Y)−E(Y)

    (35)

    3As was also shown in Ref. [28], when the reservoir timescale µ2 is not asfast, Eq. (34) should receive a non-Markovian modification ∝ 1 − eµ2(t−t0) toaccount for the slower decay of pulses in the reservoir.

    pi ∼

    1 Pr(1) = r+r++r−+1/τ−1 Pr(−1) = r−r++r−+1/τ0 Pr(0) = 1/τr++r−+1/τ

    , (36)

    and where r+ and r− are the ingoing and outgoing the migratoryrates, respectively, and we have coarse-grained in time to obtainthe ` j(t) fluctuation amplitude with respect to the mean wormburden — as in Eq. (20). With the effect of migration definedin this way, the parameters of Eq. (35) may be randomly se-lected from any of the corresponding available age bins, and theensemble mean updated to account for any out-of-equilibriumbehaviour. Using a similar set of pulses, in Ref. [28] it was fur-ther shown that the migratory rate must exceed or be around thesame order as the death rate of infectious material in the reser-voir, i.e., r+, r− & µ2, for the migration to affect the dynamicssignificantly.

    In Ref. [28] it is also assumed that the reservoir pulses whicharise from migration are uniform across the full ensemble ofrealisations: though this captures the inherent variability dueto migration effects, it does not marginalise entirely over thefull ensemble of possible fluctuations which are captured in thiswork. It is necessary in the finite population limit, then, forsuch processes to be modelled by a full stochastic individual-based simulation, where we leave the possibility of an analyticdescription for future work.

    In light of the apparent necessity for a numerical approach,we also point out that when using a fully individual-based sim-ulation one may randomly draw from the worm burdens of theindividuals and compute an egg pulse amplitude using Eq. (3)— in doing so potentially capturing the out-of-equilibrium be-haviour of the reservoir during, e.g., rounds of treatment. Forthe latter reason we shall adopt this approach when generat-ing our numerical results throughout. We further note that suchan approach has also been advocated in similar models such asthose in Ref. [27].

    In the bottom left panel of Fig. 2 we provided an example ofthe fade-out effect which appears in standard individual-basedsimulations. In metapopulation disease transmission models itis well-known that migration effects can stabilise local tranmis-sion, evading effects such as fade-out even when the populationsizes are small — see, e.g., Ref. [40]. By including migrationfrom a cluster with configuration C1 (see Table 1) into the clus-ter depicted in the plot with configuration C2 (with 350 peo-ple each), in Fig. 6 we demonstrate that a similar stabilisationof the fade-out effect can also occur for helminth transmissionmodels, despite the especially strong fade-out induced from thepresence of the unstable ‘breakpoint’ equilibrium. As targetsfor helminth elimination trials drive the prevalence in regionscloser to (and beyond) the unstable equilibrium, this is an im-portant possibility to take note of with practical implicationsshould migration within a given region be of the same order orhigher as is indicated in Fig. 2. Note that in order for this effectto be important, the migration rate needs to exceed the deathrate of eggs/larvae in the infectious reservoir, i.e., r+, r− & µ2,which is an early confirmation of the conclusions drawn fromRef. [28], but we shall now investigate the importance of mi-gration rates relative to µ2 in more detail by examining another

    11

    . CC-BY-NC-ND 4.0 International licenseIt is made available under a perpetuity.

    is the author/funder, who has granted medRxiv a license to display the preprint in(which was not certified by peer review)preprint The copyright holder for thisthis version posted December 18, 2019. ; https://doi.org/10.1101/2019.12.17.19013490doi: medRxiv preprint

    https://doi.org/10.1101/2019.12.17.19013490http://creativecommons.org/licenses/by-nc-nd/4.0/

  • Mea

    n w

    orm

    bur

    dens

    Time (years)

    350 people

    Unstable ‘breakpoint’ eq.Fade-out

    stabilised

    Mig. rate

    Mig. rate

    Mig. rate

    Figure 6: Three different examples (in both left and right panels) of the ex-pected (dashed lines) and 68% credible regions (between the solid lines) of thepossible mean worm burdens realised in time by the stochastic individual-basedsimulation method with the inclusion of infected human migration from a clus-ter (of 350 people) with the same transmission parameters as configuration C1in Table 1 into a cluster (of 350 people) with the same transmission parametersas configuration C2 in Table 1, the latter of which is displayed. Three differentmigration rates of individuals are used as scales of the death rate of eggs/larvaein the infectious reservoir µ2 and are depicted by different shades of blue colour.

    new consequence of migration.Migration into a cluster may also occur from an untreated ex-

    ternal source (UES), i.e., from a location with a defined nega-tive binomial distribution of worms within hosts and populationnumber that is left untreated in the endemic state. In such in-stances, it is also possible that the region may have previouslyachieved elimination which is then reversed — an ‘outbreak’scenario.

    In Fig. 7 we have plotted the prevalence of worms withinhosts after a period of 100 years for a previously-eliminatedcluster experiencing UES migration for a range of migrationrates (as a ratio of the eggs or larvae death rate for comparison).The transmission parameters chosen for the UES match a clus-ter of the indicated population size and configuration C1 fromTable 1 from which migrants move to a cluster with the same in-dicated population size and transmission parameters from con-figuration C2 in the left column of plots (configuration C1 inthe right column of plots), where the latter cluster has been ini-tialised without any initial infections. From these plots one canimmediately see that a discrete transition occurs in prevalenceafter a critical UES migration rate has been reached and thatthis value changes according to population size. This transi-tion marks the point at which the STH transmission is sustainedendemically, and hence the UES migration rate that this corre-sponds to is of critical importance to policy makers and imple-menters of STH control programmes since achieving elimina-tion above this critical point in migration rate is likely impossi-ble without treating the external source of migrants simultane-ously.

    For the larger population numbers (350 and 1000), Fig. 7 alsoconfirms the conclusions drawn in Ref. [28] — that critical mi-

    gration rates to affecting transmission must exceed a thresholdof at least µ2. Note, however that the precise number of indi-viduals required to be contributing to the reservoir per unit timecan be substantially modified when the population number ischanged and the apparent prevalence required to trigger the out-break transition can be much higher than 1% — typically 10%.Therefore, it is important that we state that the stochastic break-point that we derived in Sec. 2.5 only applies to situations wherethe prevalence of infection is lowered due to treatment, as op-posed to being raised from a zero worm state due to UES migra-tion. Such a difference in breakpoint prevalence value requiredbetween these two scenarios is due to the greater homogeneityin worm loads of individuals in the case of UES migration, asopposed to the case of post-treatment where a limited number ofindividuals have a large number or worms — the latter of whichis more consistent with the negative binomial reservoir approx-imation used to derive the stochastic breakpoint in Sec. 2.5. Weplan to investigate this apparent asymmetry in how the stochas-tic breakpoint applies for individual-based simulations in futurework.

    Note here that for configuration C1 and a small populationnumber of 100, in Fig. 7 (top right panel) we see that transmis-sion may transition to the endemic state spontaneously with amuch lower migration rate than µ2 — such an effect is due tothe additional variance induced by finite population effects andthis represents a potentially important caveat to the migrationrate threshold we have proposed above.

    3.2. Accounting for treatment with random compliance

    To demonstrate the difficulty in achieving STH transmissioninterruption with an MDA control programme when migrationof infected humans between clustered communities is in place,even when treating all communities at once, in Fig. 8 we plot thepositive predictive value (PPV) of elimination after 100 yearshaving reached at least a given prevalence threshold or below(as indicated on the horizontal axis) in a cluster with a C2 con-figuration (see Table 1) after 3 rounds of treatment (assuming100% efficacy). Treatment rounds have been applied in years15, 16 and 17 simultaneously to clusters with configurations C1and C2 (with population sizes of 350 each), where the dashedblack horizontal line at a PPV of 1 shows that elimination isessentially certain in the C2 configuration after treatment if nomigration occurs between the two clusters. Once again, how-ever, we find that this PPV drops sharply as the migration ratebetween clusters is increased in rate relative to the eggs/larvaedeath rate in the reservoir, µ2.

    4. Concluding discussion

    The control of helminth infections worldwide will require agreater degree of monitoring and evaluation throughout 2020 to2030 as treatment programmes strive to get to the point wheretransmission interruption thresholds have been achieved. Thisleads to an increased focus of research into predicting the like-lihood of ‘bounce back’ once the transmission breakpoint hasbeen achieved. Such breakpoints are variously defined, but in

    12

    . CC-BY-NC-ND 4.0 International licenseIt is made available under a perpetuity.

    is the author/funder, who has granted medRxiv a license to display the preprint in(which was not certified by peer review)preprint The copyright holder for thisthis version posted December 18, 2019. ; https://doi.org/10.1101/2019.12.17.19013490doi: medRxiv preprint

    https://doi.org/10.1101/2019.12.17.19013490http://creativecommons.org/licenses/by-nc-nd/4.0/

  • Prev

    alenc

    e afte

    r 100

    year

    s

    Migration rate / eggs or larvae death rate

    100 people

    Transition to endemic

    Prev

    alenc

    e afte

    r 100

    year

    s

    Migration rate / eggs or larvae death rate

    100 people

    Transition to endemic

    Prev

    alenc

    e afte

    r 100

    year

    s

    Migration rate / eggs or larvae death rate

    350 people

    Transition to endemic

    Prev

    alenc

    e afte

    r 100

    year

    s

    Migration rate / eggs or larvae death rate

    350 people

    Transition to endemic

    Prev

    alenc

    e afte

    r 100

    year

    s

    Migration rate / eggs or larvae death rate

    1000 people

    Transition to endemic

    Prev

    alenc

    e afte

    r 100

    year

    s

    Migration rate / eggs or larvae death rate

    1000 people

    Transition to endemic

    Figure 7: The prevalence of worms within hosts after a period of 100 years for a previously-eliminated cluster experiencing migration from an untreated externalsource (UES) for a range of migration rates. The transmission parameters chosen for the UES match a cluster of the indicated population size and configuration C1from Table 1 from which migrants move to a cluster with the same indicated population size and transmission parameters from configuration C2 in the left columnof plots (configuration C1 in the right column of plots), where the latter cluster has been initialised without any initial infections. Note that we are using the deathrate of eggs/larvae in the infectious reservoir, µ2, as a unit with which to measure the relative migration rate, where µ2 = 26 per year for hookworm. Dashed verticalblack lines indicate when the migration rate equals µ2.

    13

    . CC-BY-NC-ND 4.0 International licenseIt is made available under a perpetuity.

    is the author/funder, who has granted medRxiv a license to display the preprint in(which was not certified by peer review)preprint The copyright holder for thisthis version posted December 18, 2019. ; https://doi.org/10.1101/2019.12.17.19013490doi: medRxiv preprint

    https://doi.org/10.1101/2019.12.17.19013490http://creativecommons.org/licenses/by-nc-nd/4.0/

  • 350 people

    Mig. rate

    Mig. rate

    Mig. rate

    Mig. rate

    PP

    V fo

    r elim

    in

    atio

    n

    Post-MDA prevalence threshold

    Lower chance

    of elimination

    Figure 8: The positive predictive value (PPV) for elimination (the latter is heredefined as no remaining worms after 100 years) in a cluster with a C2 config-uration (see Table 1) given that a prevalence threshold — which is varied onthe horizontal axis — has been crossed immediately post-MDA. In three of theshown cases the C2 cluster is also experiencing migration from another clusterwith a C1 configuration (once again, see Table 1) where the migration ratesare indicated (using units of µ2 = 26 per year for hookworm). The treatmenthas been applied to both clusters and is 3 rounds of MDA with a random com-pliance pattern of individual behaviours assumed at 60% coverage (and 100%efficacy) in years 15, 16 and 17 of the overall 100.

    general for human helminths, the indication from modellingstudies is that a true prevalence (based on the use of a verysensitive diagnostic) of less than 1% moves the dynamics of thesystem to the interruption of transmission. Defining the break-point and designing monitoring and evaluation programmes re-quires the use of stochastic individual-based models to deter-mine this likelihood in terms of PPV and NPV values of theprobability of transmission elimination or bounce back. It istherefore highly desirable to account for as many sources —natural, or otherwise — of uncertainty to ensure a high degreeof confidence in the predictions made by such models. The ef-fect of infected human migration in and out of health implemen-tation units on control outcomes, is but one important exampleof a key source of heterogeneity.

    In this paper, we have sought to answer a number of ques-tions of importance to providing reliable predictions for thedesign of public health programmes for the control of humanhelminth infections and their monitoring and evaluation.

    Averaged quantities, e.g., the mean worm burden, arematched well by the deterministic model to the individual-based simulations. This is an expected result conformed bypast work [12]. Stochastic versions of the deterministic modelsemploying mean-field approximations may be derived to pre-dict how fluctuations in the averaged quantities vary over time.The mean-field approximation, however, appears to fail to pre-dict specific important phenomena accurately which exist in anindividual-based simulation; namely, fade-out effects.

    Our analyses suggest that deterministic models of STH (andother helminth) transmission provide important general guide-lines to making predictions of what level of control, such as

    MDA coverage, and what patterns of individual complianceto treatment will move the system close to or below the de-terministic breakpoint in transmission. However, once in thisregion, chance effects can result in either transmission elim-ination (fade out) or bounce back even when above or be-low the breakpoint. In practice, around the unstable equilib-rium, stochastic noise induces a degree of uncertainty in out-come which must be described as a probability of a certain out-come being achieved. Deriving these probability descriptionsin terms of, for example PPV and NPV values, requires the useof an individual-based stochastic model.

    Our analyses suggest that public health workers will benefitfrom determining the transmission threshold — or ‘breakpoint’— for transmission interruption using individual-based simu-lations, and that theoretical calculations suggest a true preva-lence target of below ∼ 1% to have an extremely high proba-bility of interruption in a wide variety of scenarios for all themajor helminth infections of humans. The important publichealth message, however, is that in a stochastic world wherechance events play a central role, nothing is certain. As such,outcomes should be expressed as probability events. Even be-low the 1% threshold, however, bounce back can occur due tochance events, where its likelihood will depend on host and par-asite population size.

    Infected human migration, like treatment, is an effect whichrequires individual-based simulation to assess its importance insustaining high levels of control in the real world where muchheterogeneity exists within and between health interventionpopulation units in most regions of endemic infection. Anal-yses suggest that sufficiently rapid migration from regions withprevalent infection can shift units in which high MDA cover-age is achieved to a situation of sustained transmission. Thissuggests that external processes such as inter-cluster migrationcould play an important role in sustaining STH transmission.

    The models suggest the existence of a near-universal criticalmigration rate (up to the population number caveat discussedin Sec. 3.1) corresponding to the death rate of eggs or larvaein the case of STH infections in the infectious reservoir exists,above which, simulations exhibit various behaviours. These in-clude stabilization of fade-out effects such that infection per-sist; migration from a neighboring setting generating infectionbounce back in locations where infection has been well con-trolled; and lower PPVs for transmission elimination, proceed-ing treatment achieving a target prevalence of infection thresh-old is likely even if all clusters are being treated when migrationbetween locations is occurring. The key result is that migrationfrom an untreated external source (UES) is capable of causingbounce back even in areas with effective MDA coverage to gettransmission close to the breakpoint once its rate equals or ex-ceeds the death rate of eggs or larvae in the infectious reservoir.For hookworm, this is typically around 26 infected individu-als per year. As a consequence of the result above, if the rateof infected migration exceeds or equals the defined threshold,the PPV for elimination may be lowered even if all clusters aretreated.

    Finally, public health workers will hopefully benefit fromopen access to simulation models, such as our public code,

    14

    . CC-BY-NC-ND 4.0 International licenseIt is made available under a perpetuity.

    is the author/funder, who has granted medRxiv a license to display the preprint in(which was not certified by peer review)preprint The copyright holder for thisthis version posted December 18, 2019. ; https://doi.org/10.1101/2019.12.17.19013490doi: medRxiv preprint

    https://doi.org/10.1101/2019.12.17.19013490http://creativecommons.org/licenses/by-nc-nd/4.0/

  • helmpy, in order to examine the effects of infected human mi-gration on the effectiveness of their control policies for STHand other helminths, though some simpler approximate descrip-tions exist under certain assumptions [28]. In future work, weplan also to extend the helmpy package to include features forlikelihood-based inference for parameter estimation from epi-demiological data in given settings.

    The models suggest the existence of a near-universal criticalmigration rate (up to the population number caveat discussedin Sec. 3.1) corresponding to the death rate of eggs or larvaein the case of STH infections in the infectious reservoir exists,above which, simulations exhibit various behaviours. These in-clude stabilization of fade-out effects such that infection per-sist; migration from an neighboring setting generating infectionbounce back in locations where infection has been well con-trolled; and lower PPVs for transmission elimination, proceed-ing treatment achieving a target prevalence of infection thresh-old is likely even if all clusters are being treated when migrationbetween locations is occurring. The challenges for future workon migration impact on the likelihood of achieving transmissionbreakpoints, lie in good measurement of both the heterogeneityof MDA coverage over time in adjacent health implementationunits and migration patterns between such units.

    Acknowledgements

    RJH, MW, JET and RMA gratefully thank the Bill andMelinda Gates Foundation for research grant support via theDeWorm3 (OPP1129535) award to the Natural History Mu-seum in London (http://www.gatesfoundation.org/). The au-thors would also like to thank Emily McNaughton for projectmanagement and helpful comments on the manuscript. Theviews, opinions, assumptions or any other information set outin this article are solely those of the authors. All authorsacknowledge joint Centre funding from the UK Medical Re-search Council and Department for International Development(MR/R015600/1).

    15

    . CC-BY-NC-ND 4.0 International licenseIt is made available under a perpetuity.

    is the author/funder, who has granted medRxiv a license to display the preprint in(which was not certified by peer review)preprint The copyright holder for thisthis version posted December 18, 2019. ; https://doi.org/10.1101/2019.12.17.19013490doi: medRxiv preprint

    https://sites.google.com/view/helmpyhttps://sites.google.com/view/helmpyhttp://www.gatesfoundation.org/https://doi.org/10.1101/2019.12.17.19013490http://creativecommons.org/licenses/by-nc-nd/4.0/

  • Appendix A. Derivation and solution of the master equation

    The temporally inhomogenous process of an individual’s worm uptake and death is obtained from the Markovian approximationto a summing over the possible histories in the following way

    P(w jn, t + ∆t) =∑

    s=−1,0,1P(w jn + s, t)P(w jn, t + ∆t|w jn + s, t)

    = P(w jn − 1, t)λ jnΛ j(t)∆t + P(w jn + 1, t)(µ + µ1)(w jn + 1)∆t + P(w jn, t)[1 − λ jnΛ j(t)∆t − (µ + µ1)w jn∆t

    ]+ O(∆t2)

    (A.1)

    lim ∆t → 0⇒ddt

    P(w jn, t) =∂

    ∂tP(w jn, t) = −

    [λ jnΛ j(t) + (µ + µ1)w jn

    ]P(w jn, t) + (µ + µ1)(w jn + 1)P(w jn + 1, t) + λ jnΛ j(t)P(w jn − 1, t) . (A.2)

    Which matches Eq. (15) in the main text. We may also rewrite Eq. (A.2) using the Probability Generating Function (PGF) G jn(Z, t) ≡∑∞w jn=0 Z

    w jn P(w jn, t) such that

    ∂tG jn(Z, t) = λ jnΛ j(t)(Z − 1)G jn(Z, t) + (µ + µ1)(1 − Z)

    ∂ZG jn(Z, t) . (A.3)

    By method of characteristics,4 the solution to Eq. (15) is

    G jn(Z, t) = exp{

    (Z − 1)[I jn(t0)e−(µ+µ1)(t−t0) + λ jn

    ∫ tt0

    Λ j(t′)e−(µ+µ1)(t−t′)dt′

    ]}, (A.4)

    where the initial intensity I jn(t0) is to be set for each individual. One immediately recognises Eq. (A.4) as the PGF of an inhomo-geneous Poisson walker with intensity

    I jn(t) = I jn(t0)e−(µ+µ1)(t−t0) + λ jn∫ t

    t0Λ j(t′)e−(µ+µ1)(t−t

    ′)dt′ , (A.5)

    which matches Eq. (16) in the main text.For an ensemble of N j independent walkers (hence individuals) in a given age bin we may obtain the PGF of the sum of their

    collective worm burdens G j(Z, t) by multiplication such that

    G j(Z, t) =N j∏

    n=1

    G jn(Z, t) = exp

    (Z − 1) N j∑n=1

    I jn(t) , (A.6)

    where the corresponding probability mass function is therefore also that of a Poisson distribution

    N jm j(t) =N j∑

    n=1

    w jn(t) ∼ Pois N j∑

    n=1

    w jn(t);N j∑

    n=1

    I jn(t) , (A.7)

    where we have also used the definition of the mean worm burden in the j-th age bin given by Eq. (4) in the main text. Note that inthe case where Λ j(t) is roughly constant for all time, the timescale for the distribution to achieve stationarity is ∆tstat ' 1/(µ + µ1).

    4One solves first-order PDEs of the form in Eq. (A.3) by method of characteristics, i.e., choosing a curve Z(t) such that

    dZdt

    = (µ + µ1)(Z − 1) ⇒ Z(t) − 1 =[Z(t′) − 1] e(µ+µ1)(t−t′) .

    Given the fact that along the curve Z(t) one also obtains an effective ODE of the form

    ddt

    G jn[Z(t), t] =∂

    ∂tG jn[Z(t), t] +

    dZdt

    ∂ZG jn[Z(t), t] = λ jnΛ j(t) [Z(t) − 1] G jn[Z(t), t] ,

    whose solution is given by Eq. (A.4) when one replaces Z(t′) − 1 with the inverted form of the equation above.

    16

    . CC-BY-NC-ND 4.0 International licenseIt is made available under a perpetuity.

    is the author/funder, who has granted medRxiv a license to display the preprint in(which was not certified by peer review)preprint The copyright holder for thisthis version posted December 18, 2019. ; https://doi.org/10.1101/2019.12.17.19013490doi: medRxiv preprint

    https://doi.org/10.1101/2019.12.17.19013490http://creativecommons.org/licenses/by-nc-nd/4.0/

  • Appendix B. Approximate ensemble mean and variance of the mean worm burden

    The approximate mean and variance of Λ j(t) may be computed by inserting Eqs. (22) and (23) into Eq. (20) and its square,yielding the following equations

    E[Λ j(t)] '(µ + µ1)R0, j

    NpE[Ȳ(t)] (B.1)

    E[Λ j(t)2] '(µ + µ1)2R20, j

    N2pE[Ȳ(t)2] (B.2)

    Var[Λ j(t)] '(µ + µ1)2R20, j

    N2pVar[Ȳ(t)] . (B.3)

    Using Eq. (17) in the main text and Eq. (B.1), we may therefore compute the ensemble mean of m j(t)

    N jM j(t) = N jE[m j(t)] =N j∑

    n=1

    E[I jn(t)] =N j∑

    n=1

    E[I jn(t0)]e−(µ+µ1)(t−t0) +∫ t

    t0N jE[Λ j(t′)]e−(µ+µ1)(t−t

    ′)dt′ , (B.4)

    which, by identifying N jM j(t0) =∑N j

    n=1 E[I jn(t0)], matches the solution to Eq. (12) in the rapid equilibriation limit dE(Λ j)/dt → 0and hence verifies the consistency of our approximative results in this section so far.

    The ensemble variance of m j(t) may also be deduced as

    N2j V j(t) = N2j Var[m j(t)] = N jM j(t) + N jE[I jn(t)2] − N jM j(t)2 , (B.5)

    from the properties of independent samples.5 By making use of Eq. (1) and assuming the relative independence of λ jn and Λ(t)once again, we have

    E[λ2jnΛ j(t)2] = E(λ2jn)E[Λ j(t)

    2] =(1 +

    1k j

    ) {Var[Λ j(t)] + E[Λ j(t)]2

    }, (B.6)

    and hence one may obtain E[I jn(t)2], which is given by6

    E[I jn(t)2] = E[I jn(t0)2]e−2(µ+µ1)(t−t0) − 2E[I jn(t0)]∫ t

    t0E[Λ j(t′)]e−(µ+µ1)(2t−t

    ′−t0)dt′

    +

    ∫ tt0

    ∫ tt0

    E[λ2jnΛ j(t′)Λ j(t′′)]e−(µ+µ1)(2t−t

    ′−t′′)dt′dt′′ . (B.7)

    If one assumes temporal stationarity such that E[Λ j(t)] = E(Λ j) and E[λ2jnΛ j(t)Λ j(t′)] = E(λ2jnΛ

    2j ), both time integrations in

    Eq. (B.7) are trivial and one obtains

    E[I jn(t)2] = E[I jn(t0)2]e−2(µ+µ1)(t−t0) − 2E[I jn(t0)]E(Λ j)[e−(µ+µ1)(t−t0) − e−2(µ+µ1)(t−t0)

    µ + µ1

    ]+

    [1 − e−(µ+µ1)(t−t0)

    µ + µ1

    ]2 (1 +

    1k j

    ) [Var(Λ j) + E(Λ j)2

    ]. (B.8)

    5Note that one findsN2j Var[m j(t)] = Var[N jm j(t)] = N jE[w jn(t)

    2] − N jE[w jn(t)]2 ,so Eq. (B.5) is consistent with the number of random degrees of freedom present.

    6Note that to obtain the relationE[I jn(t0)λ jnΛ(t′)] = E[I jn(t0)]E[λ jnΛ(t′)] = E[I jn(t0)]E[Λ(t′)] ,

    in the second term of Eq. (B.7) we have assumed that the initial intensities I jn(t0) are chosen independently of an individual’s uptake rate λ jn.

    17

    . CC-BY-NC-ND 4.0 International licenseIt is made available under a perpetuity.

    is the author/funder, who has granted medRxiv a license to display the preprint in(which was not certified by peer review)preprint The copyright holder for thisthis version posted December 18, 2019. ; https://doi.org/10.1101/2019.12.17.19013490doi: medRxiv preprint

    https://doi.org/10.1101/2019.12.17.19013490http://creativecommons.org/licenses/by-nc-nd/4.0/

  • Appendix C. The van Kampen expansion of the master equation

    We may re-derive Eq. (15) in terms of the sum over all worms carried by N j individuals in the j-th age bin N jm j(t) =∑N j

    n=1 w jn(t),taking a single step at each point in time, such that

    ddt

    P(N jm j, t) =∂

    ∂tP(N jm j, t) =

    − N j∑

    n=1

    λ jnΛ j(t) + (µ + µ1)N jm j

    P(N jm j, t) + (µ + µ1)(N jm j + 1)P(N jm j + 1, t) + N j∑n=1

    λ jnΛ j(t)P(N jm j − 1, t) . (C.1)

    Though this equation would almost-certainly represent a less efficient simulation than that of Eq. (15), it may nonetheless consistentresults for a sufficiently short choice of numerical timestep.

    Let us now rewrite the local value of N jm j (which is regarded as constant in time — or a ‘state variable’ — by the masterequation) in separate components which depend differently on the system size N j, to obtain

    N jm j = N j〈m j(t)〉 + N1/2j ξ j(t) (C.2)

    =

    N j∑n=1

    I jn(t) + N1/2j ξ j(t) (C.3)

    d(N jm j)dt

    = 0 ⇐⇒N j∑

    n=1

    dI jndt

    = −N1/2jdξ jdt

    . (C.4)

    Since the mean of Eq. (27) is an averaged quantity it does not fluctuate as a random variable, hence we may now rewrite theprobability distribution in terms of the other remaining random variable which now characterises the fluctuations of the systemaround the temporal average

    P(N jm j, t) = P

    N j∑n=1

    I jn(t) + N1/2j ξ j(t), t = P̃(ξ j, t) . (C.5)

    The total time-derivatives of both distributions are hence related, yielding

    ddt

    P(N jm j, t) =ddt

    P̃[ξ j(t), t]

    =∂

    ∂tP̃[ξ j(t), t] +

    dξ jdt

    ∂ξ jP̃[ξ j(t), t]

    =∂

    ∂tP̃[ξ j(t), t] − N−1/2j

    N j∑n=1

    dI jndt

    ∂ξ jP̃[ξ j(t), t] . (C.6)

    Notice that Eq. (27) implies steps of N jm j ± 1 translate into fluctuations of ξ j ± N−1/2j in the argument of P̃. Using this mappingas well as Eq. (27), one finds that Eq. (C.1) may be rewritten as

    ddt

    P(N jm j, t) = −

    N j∑

    n=1

    λ jnΛ j(t) + (µ + µ1)

    N j∑n=1

    I jn(t) + N1/2j ξ j(t) P̃(ξ j, t)

    + (µ + µ1)

    N j∑n=1

    I jn(t) + N1/2j ξ j(t) + 1 P̃ (ξ j + N−1/2j , t) + N j∑

    n=1

    λ jnΛ j(t)P̃(ξ j − N−1/2j , t

    ), (C.7)

    where the following van Kampen [31] (or Taylor) expansion of the distributions on the right hand side can be made which iscontrolled by powers of the system size N j

    P̃(ξ j ± N−1/2j , t

    )= P̃

    (ξ j, t

    )± N−1/2j

    ∂ξ jP̃(ξ j, t) + (2N j)−1

    ∂2

    ∂ξ2jP̃(ξ j, t) ± . . . . (C.8)

    By equating Eq. (C.6) and Eq. (C.7) with the expansion above, we may match terms of the same system size order to obtainconstraint equations. At O(N j) there is a cancellation of terms, followed by O(N1/2j ) where the mean-field results of Eqs. (12), (13)

    18

    . CC-BY-NC-ND 4.0 International licenseIt is made available under a perpetuity.

    is the author/funder, who has granted medRxiv a license to display the preprint in(which was not certified by peer review)preprint The copyright holder for thisthis version posted December 18, 2019. ; https://doi.org/10.1101/2019.12.17.19013490doi: medRxiv preprint

    https://doi.org/10.1101/2019.12.17.19013490http://creativecommons.org/licenses/by-nc-nd/4.0/

  • and (14) are consistently reproduced after a posteriori marginalisation over λ jn values. Lastly, at O(N0j ), one obtains a linear noiseapproximation for the fluctuations in the form of a Fokker-Planck equation

    ∂tP̃(ξ j, t) =

    ∂ξ j

    [(µ + µ1)ξ jP̃(ξ j, t)

    ]+

    12N j

    (µ + µ1) N j∑n=1

    I jn(t) +N j∑

    n=1

    λ jnΛ j(t)

    ∂2∂ξ2j P̃(ξ j, t) , (C.9)which also corresponds to the following Langevin equation for the individual realisations

    dξ jdt

    = −(µ + µ1)ξ j(t) +η j(t)

    N1/2j

    (µ + µ1) N j∑n=1

    I jn(t) +N j∑

    n=1

    λ jnΛ j(t)

    1/2

    , (C.10)

    where η j(t) is a zero-mean unit-amplitude Gaussian random variable with the temporal averages of 〈η j(t)〉 = 0, 〈η j(t)η j(t′)〉 =δ(t − t′).

    References

    [1] R. L. Pullan, J. L. Smith, R. Jasrasaria, S. J. Brooker, Global numbers of infection and disease burden of soil transmitted helminth infections in 2010, Parasites& vectors 7 (1) (2014) 37 (2014).

    [2] World health organisation, https://www.who.int/news-room/fact-sheets/detail/soil-transmitted-helminth-infections, accessed:26/11/2019.

    [3] R. Ross, The prevention of malaria, Dutton, 1910 (1910).[4] W. O. Kermack, A. G. McKendrick, A contribution to the mathematical theory of epidemics, Proceedings of the royal society of london. Series A, Containing

    papers of a mathematical and physical character 115 (772) (1927) 700–721 (1927).[5] N. T. Bailey, A simple stochastic epidemic, Biometrika (1950) 193–202 (1950).[6] J. L. Aron, R. M. May, The population dynamics of malaria, in: The population dynamics of infectious diseases: theory and applications, Springer, 1982, pp.

    139–179 (1982).[7] R. Anderson, R. May, Infectious Diseases of Humans: Dynamics and Control, Dynamics and Control, OUP Oxford, 1992 (1992).

    URL https://books.google.co.uk/books?id=HT0--xXBguQC[8] R. A. Weinstein, C. B. Bridges, M. J. Kuehnert, C. B. Hall, Transmission of influenza: implications for control in health care settings, Clinical infectious

    diseases 37 (8) (2003) 1094–1101 (2003).[9] M. Lipsitch, T. Cohen, B. Cooper, J. M. Robins, S. Ma, L. James, G. Gopalakrishna, S. K. Chew, C. C. Tan, M. H. Samore, et al., Transmission dynamics and

    control of severe acute respiratory syndrome, Science 300 (5627) (2003) 1966–1970 (2003).[10] M. A. Irvine, W. A. Stolk, M. E. Smith, S. Subramanian, B. K. Singh, G. J. Weil, E. Michael, T. D. Hollingsworth, Effectiveness of a triple-drug regimen for

    global elimination of lymphatic filariasis: a modelling study, The Lancet Infectious Diseases 17 (4) (2017) 451–458 (2017).[11] R. M. Anderson, R. M. May, Population dynamics of human helminth infections: control by chemotherapy, Nature 297 (5867) (1982) 557 (1982).[12] R. Anderson, G. Medley, Community control of helminth infections of man by mass and selective chemotherapy, Parasitology 90 (4) (1985) 629–660 (1985).[13] S. De Vlas, G. Van Oortmarssen, B. Gryseels, A. Polderman, A. Plaisier, J. Habbema, Schistosim: a microsimulation model for the epidemiology and control

    of schistosomiasis, The American journal of tropical medicine and hygiene 55 (5 Suppl) (1996) 170–175 (1996).[14] A. Plaisier, G. Van Oortmarssen, J. Habbema, J. Remme, E. Alley, Onchosim: a model and computer simulation program for the transmission and control of

    onchocerci