Science, Faculty of
Mathematics, Department of
DSpace
UBCV
Konrad, Bernhard Paul
Doctor of Philosophy - PhD
University of British Columbia
We develop and apply mathematical models to obtain insights into the dynamics of HIV and malaria infection. We consider three case studies. 1. The duration of the time between exposure and detectability of HIV infection is difficult to estimate because precise dates of exposure are rarely known. Therefore, the reliability of clinical HIV testing during the first few weeks of infections is unknown, creating anxiety among HIV-exposed individuals and their physicians. We address this knowledge gap by fitting stochastic models of early HIV infection to detailed viral load time-courses, taken shortly after exposure, from 78 plasma donors. Since every plasma donor in our data eventually becomes infected, we condition our model to reflect this bias before fitting to the data. Our model prediction for the mean eclipse period is 8-10 days. We further quantify the reliability of a negative test t days after potential exposure to inform physicians about the value of initial and follow-up testing. 2. The recently launched Get Checked Online (GCO) program aims at increasing the HIV testing rate in the Vancouver men who have sex with men population by facilitating test taking and result delivery. We develop mathematical models and extract parameter values from surveys and interviews to quantify GCO's population-level impact. Our models predict that the epidemic is growing overall, that its severeness is increased by the presence of a high-risk group and that, even at modest effectiveness, GCO might avert 34-66 new infections in the next five years. 3. Metarhizium anisopliae is a naturally occurring fungal pathogen of mosquitoes that has been engineered to act against malaria by effectively blocking onward transmission from the mosquito vector. We develop and analyse two mathematical models to examine the efficacy of this fungal pathogen. We find that, in many plausible scenarios, the best effects are achieved with a reduced or minimal pathogen virulence, even if the likelihood of resistance to the fungus is negligible. The results depend on the interplay between two main effects: the ability of the fungus to reduce the mosquito population, and the ability of fungus-infected mosquitoes to compete for resources with non-fungus-infected mosquitoes.
On the Dynamics of HIV and Malaria Infection - InsightsFrom Mathematical ModelsbyBernhard Paul KonradDipl.-Math. Karlsruhe Institute of Technology, 2010A THESIS SUBMITTED IN PARTIAL FULFILLMENTOF THE REQUIREMENTS FOR THE DEGREE OFDoctor of PhilosophyinTHE FACULTY OF GRADUATE AND POSTDOCTORALSTUDIES(Mathematics)The University of British Columbia(Vancouver)September 2015c© Bernhard Paul Konrad, 2015AbstractWe develop and apply mathematical models to obtain insights into the dynamicsof human immunodeficiency virus (HIV) and malaria infection. We consider threecase studies.1. The duration of the time between exposure and detectability of HIV infectionis difficult to estimate because precise dates of exposure are rarely known. There-fore, the reliability of clinical HIV testing during the first few weeks of infectionsis unknown, creating anxiety among HIV-exposed individuals and their physicians.We address this knowledge gap by fitting stochastic models of early HIV infectionto detailed viral load time-courses, taken shortly after exposure, from 78 plasmadonors. Since every plasma donor in our data eventually becomes infected, wecondition our model to reflect this bias before fitting to the data. Our model predic-tion for the mean eclipse period is 8-10 days. We further quantify the reliability ofa negative test t days after potential exposure to inform physicians about the valueof initial and follow-up testing.2. The recently launched Get Checked Online (GCO) program aims at increas-ing the HIV testing rate in the Vancouver men who have sex with men popula-tion by facilitating test taking and result delivery. We develop mathematical mod-els and extract parameter values from surveys and interviews to quantify GCO’spopulation-level impact. Our models predict that the epidemic is growing overall,that its severeness is increased by the presence of a high-risk group and that, even atmodest effectiveness, GCO might avert 34-66 new infections in the next five years.3. Metarhizium anisopliae is a naturally occurring fungal pathogen of mosqui-toes that has been engineered to act against malaria by effectively blocking onwardtransmission from the mosquito vector. We develop and analyse two mathematicaliimodels to examine the efficacy of this fungal pathogen. We find that, in many plau-sible scenarios, the best effects are achieved with a reduced or minimal pathogenvirulence, even if the likelihood of resistance to the fungus is negligible. The re-sults depend on the interplay between two main effects: the ability of the fungus toreduce the mosquito population, and the ability of fungus-infected mosquitoes tocompete for resources with non-fungus-infected mosquitoes.iiiPrefaceI was the lead investigator for the project in Chapter 3 and corresponding Ap-pendix B, where I was responsible for establishing the study, analyzing the data,developing and analyzing the models and manuscript composition. D. Taylor andG. Ogilvie assembled the data set. J. Conway helped with mathematical analysis.D. Coombs was the supervisory author on this project and helped with manuscriptcomposition.I was the lead investigator for the project in Chapter 4, where I was respon-sible for analyzing the data, developing and analyzing the models and manuscriptcomposition. The study was established by M. Gilbert and D. Coombs. M. Gilbertorganized the collection of survey data for use in this study. W. Michelow helpedanalyze the data. M. Gilbert, W. Michelow and D. Coombs helped develop themodels.A version of Chapter 5 and corresponding Appendix C have been published inthe Malaria Journal [66]. I was the lead investigator, responsible for all major areasof establishing the study, developing and analyzing the models and manuscriptcomposition. M. Lindstrom, J. Zhu and A. Gumpinger assisted in developing andanalyzing the models. D. Coombs was the supervisory author on this project andhelped with manuscript composition.ivTable of ContentsAbstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iiPreface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ivTable of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vList of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xList of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiGlossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxAcknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.1 Mathematical modeling of infectious diseases . . . . . . . . . . . 11.2 The biology and modeling of the human immunodeficiency virus . 41.3 Old and new ways to combat and model malaria infection . . . . . 71.4 How this thesis is structured . . . . . . . . . . . . . . . . . . . . 92 Mathematical background of branching processes . . . . . . . . . . 112.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.2 The birth-death model . . . . . . . . . . . . . . . . . . . . . . . . 132.3 Gillespie’s Algorithm - a powerful but costly stochastic simulationalgorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152.4 Derivation of the master equations . . . . . . . . . . . . . . . . . 17v2.5 The probability generating function . . . . . . . . . . . . . . . . 182.5.1 Definition and basic properties . . . . . . . . . . . . . . . 192.5.2 The differential equation formulations . . . . . . . . . . . 202.5.3 Calculating the probability distribution from the probabil-ity density function . . . . . . . . . . . . . . . . . . . . . 222.6 Mean behaviour of the stochastic process . . . . . . . . . . . . . 242.7 Calculating cumulative probabilities . . . . . . . . . . . . . . . . 262.8 The probability of extinction and the basic reproduction number R0 272.9 Conditional on non-extinction . . . . . . . . . . . . . . . . . . . 302.10 Mean behaviour and cumulative probabilities for the conditionedprocess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322.10.1 Mean behaviour . . . . . . . . . . . . . . . . . . . . . . 322.10.2 Cumulative probabilities . . . . . . . . . . . . . . . . . . 352.11 The T ∗-V model . . . . . . . . . . . . . . . . . . . . . . . . . . . 362.11.1 The master equations . . . . . . . . . . . . . . . . . . . . 372.11.2 The probability generating function . . . . . . . . . . . . 392.11.3 Calculating joint probability . . . . . . . . . . . . . . . . 422.11.4 Mean behaviour of the stochastic process . . . . . . . . . 442.11.5 Extinction probability, R0 and r . . . . . . . . . . . . . . 452.11.6 Conditioning on non-extinction . . . . . . . . . . . . . . 462.11.7 Mean behaviour and cumulative probabilities for the con-ditioned T ∗-V model . . . . . . . . . . . . . . . . . . . . 482.12 The T ∗-V -W model with infectious and non-infectious virions . . 512.13 The T ∗1 -T∗2 -V model . . . . . . . . . . . . . . . . . . . . . . . . . 522.14 Conclusion and future work . . . . . . . . . . . . . . . . . . . . . 533 On the duration of the period between exposure to HIV and de-tectable infection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553.1 Motivation and background . . . . . . . . . . . . . . . . . . . . . 563.2 Extracting the maximal viral growth rates from seroconversion data 583.3 The simple birth-death model . . . . . . . . . . . . . . . . . . . . 613.3.1 The simple birth-death model does not adequately describeearly infection . . . . . . . . . . . . . . . . . . . . . . . 63vi3.4 Including infected cells and virions: the T ∗1 -T∗2 -V model . . . . . 653.4.1 The T ∗1 -T∗2 -V model is consistent with data and literature . 663.5 Risk scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683.6 The infection bias and its consequences . . . . . . . . . . . . . . 683.6.1 Mathematical derivation . . . . . . . . . . . . . . . . . . 683.6.2 The effect of the infection bias on the estimated length ofthe eclipse phase . . . . . . . . . . . . . . . . . . . . . . 703.7 Quantifying the length of the eclipse period on a population level . 723.8 Probability of a false negative HIV RNA test . . . . . . . . . . . . 743.8.1 Mathematical derivation . . . . . . . . . . . . . . . . . . 743.8.2 Results and implications for the interpretation of HIV testresults and the timing of follow-up tests . . . . . . . . . . 763.9 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784 Modelling the population-level impact of increasing HIV testing . . . 804.1 Motivation and background . . . . . . . . . . . . . . . . . . . . . 804.2 How Get Checked Online works . . . . . . . . . . . . . . . . . . 814.3 Survey data collection . . . . . . . . . . . . . . . . . . . . . . . . 834.4 The basic model with homogeneous testing patterns and risk behavior 844.5 Parameterizing the basic model . . . . . . . . . . . . . . . . . . . 864.5.1 The rate of risky events . . . . . . . . . . . . . . . . . . . 864.5.2 The per-encounter transmission probability . . . . . . . . 864.5.3 The testing rate . . . . . . . . . . . . . . . . . . . . . . . 904.5.4 Other parameters from the literature . . . . . . . . . . . . 914.6 Sensitivity analysis - the Direct Differential method . . . . . . . . 924.7 Results and predictions from the basic model . . . . . . . . . . . 944.7.1 Calculating R0 . . . . . . . . . . . . . . . . . . . . . . . 944.7.2 Sensitivity analysis . . . . . . . . . . . . . . . . . . . . . 964.7.3 Fitting to the epidemiological data . . . . . . . . . . . . . 974.8 Discussion of the basic model . . . . . . . . . . . . . . . . . . . 994.9 The full model with heterogeneous testing patterns and risk behavior1004.9.1 No contact mixing between risk groups . . . . . . . . . . 1014.9.2 Full mixing between risk groups . . . . . . . . . . . . . . 102vii4.10 Parameterizing the full models from the survey and grid data . . . 1024.10.1 Obtaining the testing rate τ and the horizontal transition rates1034.10.2 Obtaining the rate of risky events and the vertical transitionrates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1044.11 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1074.11.1 The basic reproduction number R0 . . . . . . . . . . . . . 1084.11.2 Sensitivity . . . . . . . . . . . . . . . . . . . . . . . . . 1114.12 Discussion and future work . . . . . . . . . . . . . . . . . . . . . 1135 Assessing the optimal virulence of malaria-targeting mosquito pathogens:a mathematical study of engineered Metarhizium anisopliae . . . . 1165.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1175.2 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1195.2.1 Simplified model set-up and assumptions . . . . . . . . . 1195.2.2 Life-stage-structured mosquito model and assumptions . . 1215.3 Results and Discussion . . . . . . . . . . . . . . . . . . . . . . . 1235.3.1 The simplified model with no fungus . . . . . . . . . . . 1245.3.2 Equilibrium analysis of the simplified model . . . . . . . 1255.3.3 Optimizing the virulence and application of the fungal pathogenin the simplified model . . . . . . . . . . . . . . . . . . . 1275.3.4 Optimal virulence depends on background mosquito growthrate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1295.3.5 Equilibrium analysis of the life-stage-structured model . . 1305.3.6 Life-stage-structured model without vertical transmissionof fungus . . . . . . . . . . . . . . . . . . . . . . . . . . 1305.3.7 Life-stage-structured model with vertical transmission offungus . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1325.4 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1346 Concluding remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . 137Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141viiiA The T ∗-V -W model with infectious and non-infectious virions . . . . 154A.1 The master equations . . . . . . . . . . . . . . . . . . . . . . . . 155A.2 The probability generating function . . . . . . . . . . . . . . . . 155A.3 Calculating total viral load . . . . . . . . . . . . . . . . . . . . . 156A.4 Mean behaviour of the stochastic process . . . . . . . . . . . . . 158A.5 Calculating cumulative probabilities . . . . . . . . . . . . . . . . 160A.6 The extinction probability, basic reproduction number R0 and ini-tial growth rate . . . . . . . . . . . . . . . . . . . . . . . . . . . 161A.7 Conditioning on non-extinction . . . . . . . . . . . . . . . . . . . 162A.8 Mean behaviour and cumulative probabilities for the conditionedT ∗-V -W model . . . . . . . . . . . . . . . . . . . . . . . . . . . 162B Additional material for early HIV infection . . . . . . . . . . . . . . 165B.1 Preparing the dataset of patient timecourses . . . . . . . . . . . . 165B.2 Patient data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169C Additional material for malaria . . . . . . . . . . . . . . . . . . . . 183C.1 Proof of theorems . . . . . . . . . . . . . . . . . . . . . . . . . . 183ixList of TablesTable 3.1 Assuming a per-exposure risk of 0.5% this table shows the re-quired waiting time until a negative HIV RNA test reduces therisk of infection to the desired level. The waiting time is longerfor tests with non-zero false positive rate α and non-zero falsenegative rate β . . . . . . . . . . . . . . . . . . . . . . . . . . 76Table 4.1 Per-exposure probability of HIV infection for different risk be-haviours. The use of condoms reduces the per-encounter riskof infection by 80% [89], while infection via receptive and in-sertive oral sex is estimated to be a factor of 50 and 100 timesless likely than unprotected anal sex, respectively [107]. . . . . 90Table 4.2 Model parameters for the basic model, with 95% confidenceinterval or lower and upper bound, if applicable. . . . . . . . . 92Table 4.3 Sensitivity of the relative change in the outcome predictions ofthe basic model (4.2) with respect to its parameters. Positivenumbers indicate that increasing the parameter leads to an in-crease in the final size of the corresponding compartment. . . . 97Table 4.4 Model parameters for the full model, with 95% confidence in-terval or lower and upper bound, if applicable. . . . . . . . . . 107Table C.1 Summary of estimates and references for the parameters usedin the malaria models. . . . . . . . . . . . . . . . . . . . . . . 198xList of FiguresFigure 1.1 Importance of acute HIV infection in new transmissions. Mod-ified from [20]. . . . . . . . . . . . . . . . . . . . . . . . . . 6Figure 2.1 Sample paths of the stochastic birth-death process, started witha population size of 100 and ran until a desired threshold isreached. Birth rate b = 23.9 day−1, death rate d = 23 day−1and threshold 375,000. This threshold corresponds to the HIVdetection limit of 50 RNA copies/ml, at 2 RNA copies pervirion in a human with 15L of extracellular fluid. . . . . . . . 16Figure 2.2 The probability P(150,100, t) of population size N(t) = 150 attime t for a population that starts at N(0) = 100 individuals,with death rate d = 23 day−1 and birth rate b = 23.9 day−1.The blue line is the aggregate from Gillespie simulations, thered line is obtained by integrating the probability generatingfunction as described in Equation (2.11). . . . . . . . . . . . 25Figure 2.3 Whether the population necessarily ultimately goes extinctiondepends on whether the average growth rate E[N] is larger that 1. 29xiFigure 2.4 Distributions of the time until a population size of 375,000is reached, obtained from Gillespie simulations of the birth-death process with b−d = 0.9 day−1. Paths that did not reachthe desired population size were discarded, that is, the pro-cesses are conditioned on non-extinction. Different death ratesd = 9× 104 day−1 (red) and d = 23 day−1 (blue) result in adifferent likelihood of extinction q = d/b. The larger the like-lihood of extinction, the faster the conditioned process reachesthe desired population size. . . . . . . . . . . . . . . . . . . . 31Figure 2.5 Mean of the unconditional E[N] (in blue) and conditional E[N˜](in red) process, in the case where extinction is very likely,q ≈ 96%. We see a dramatic difference between the means,which can lead to drastically wrong estimates of the initial timeof the process (e.g., time of HIV exposure) when a naive fit(black line) is extrapolated to E[N˜] = 1. Parameters: b = 23.9day−1, d = 23 day−1, n0 = 1. . . . . . . . . . . . . . . . . . . 34Figure 3.1 Schematics of typical dynamics of plasma virus RNA in a re-cently infected patient, and approximate time points when dif-ferent HIV tests become positive, i.e. can detect infection.vRNA looks for virions directly, p24Ag looks for the p24 anti-gen, a viral protein. ELISA tests for antibodies, and Westernblot combines several of the above. The dynamics below thedetection limit are unknown, the unobserved growth rate couldbe smaller, the same, or larger than the observed growth rate,as indicated by the dashed lines. Modified from [32]. . . . . . 57Figure 3.2 Examples of plasma virus RNA of recently infected patients,from the seroconversion panels obtained in [93] and [103].Values below the detection limit of 50 copies/ml are reportedas 50 copies/ml. The exposure dates for these patients are un-known and is to be estimated from the characteristic initial ex-ponential growth rate and mathematical models in this work. . 60xiiFigure 3.3 Maximal observed rate of increase of viral RNA concentration,as calculated for 51 class A seroconversion panels (mean: 1.05log(RNA copies)/ml/day) and 27 class B panels (mean: 0.99log(RNA copies)/ml/day). The difference between the two cat-egories is not significant. If the outlier in group B is removed,the difference is borderline significant (p = 0.048). . . . . . . 61Figure 3.4 Model schematics. a. Minimal stochastic birth-death model.Virions reproduce at rate b and cleared at rate d. b. Pre-ferred three-state model. Virions infect cells at rate kT andare cleared at rate c. At rate s infected cells become produc-tively infected, producing new virions at rate p and dying atrate δ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62Figure 3.5 The estimated length of the eclipse phase for all 78 plasmadonors according to the inoculumn size. Each square repre-sents the estimate for one donor. The vertical bars indicate themean and 95% confidence interval. Here we use the naive log-linear model (3.1), which is not able to capture key HIV char-acteristics, see Section 3.3.1. Hence this plot is an illustration-of-concept only. For the final results refer to Figure 3.8. . . . 64Figure 3.6 The interdependence of the parameters of the T ∗1 -T∗2 -V model.From left to right, the stars indicate particular choices of pa-rameters in three different risk scenarios: low risk and smallinoculum size, medium risk and medium inoculum size, andhigh risk and large inoculum size, see Section 3.5. The result-ing fitted values for p and kT are within the estimates from theliterature. a. The production rate p as it depends on v0 and riskof infection. b. The infection rate kT as it depends on v0 andrisk of infection. . . . . . . . . . . . . . . . . . . . . . . . . 67Figure 3.7 The effect of the infection bias on the estimated exposure date,as obtained by fitting the T ∗1 -T∗2 -V model, unconditioned (dashedlines, open markers) and conditioned (solid lines, filled mark-ers), for each exposure category: low risk (pentagon), mediumrisk (diamond) and high risk (square). . . . . . . . . . . . . . 71xiiiFigure 3.8 The estimated length of the eclipse period for all 78 plasmadonors according to the three different exposure-risk categories,using the conditioned T ∗1 -T∗2 -V model. Each dot represents theestimate for one donor. The mean and 95% confidence inter-vals are indicated by the vertical bars. . . . . . . . . . . . . . 72Figure 3.9 The five plasma donors with the smallest maximal growth ratesare at or above the 95th percentile of the length of the eclipseperiod. Due to the relatively long time-interval between theRNA measurements where the maximal growth rate occurs,and the relatively high RNA loads, it is quite likely that the realmaximal growth rate may have been missed for these donors. 73Figure 3.10 Individual and aggregate likelihood of detectable RNA as afunction of days since exposure, and relative probability of afalse negative test. Each grey line represents the estimate forone plasma donor. The blue curve is the average of all donorsin the dataset and hence provides our best estimate for a ran-dom patient from the general population. The largest informa-tion gains are between day 5 and day 10. Plotted for low risk,small inoculum to provide an upper bound on the length of theeclipse period. a. Probability of detectable RNA t days afterexposure, if infection occurs eventually. b. Probability of afalse negative test, assuming that the test is perfectly sensitiveand specific, relative to the baseline probability of infection.The results for non-perfect tests are similar and summarized inTable 3.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77xivFigure 4.1 Sketch of how the GCO program works, first published in [53].After answering a questionnaire that assesses their risk and rec-ommends which sexually transmitted infections (STIS) to testfor, users print their requisition from home. Specimens can begiven anonymously at participating lab locations, and test re-sults can be viewed online if all tests are negative. Otherwisethe STI clinic contact the user to discuss erroneous specimensas well as indeterminate or positive results. . . . . . . . . . . 82Figure 4.2 Schematics of the basic model for GCO. Individuals can be sus-ceptible, infected and unaware, or infected and aware of theirinfection. The mass-action infection rate β = rp is a prod-uct of the exposure-rate r and the per-exposure probability ofHIV transmission p, and is reduced for individuals who areaware of their infection. GCO aims to increase the testing rateτ with which infected individuals become aware of their infec-tion. The model also accounts for turnover via immigration mand emigration e in all three compartments. . . . . . . . . . . 84Figure 4.3 Relationship length and total number of risky events as ob-tained by the grid data. The horizontal and vertical error barsindicate the uncertainty in the length of the relationship andnumber of risky events, respectively. We chose to bound thenumber of risky events by once per day. The marginal his-tograms show that a large fraction of risk events stem fromone-time sexual encounters. . . . . . . . . . . . . . . . . . . 87Figure 4.4 Responses to the network grid question “The last time youhad sex with each partner, what sexual acts did you engagein?”. We use these frequencies together with the biologicalper-exposure probabilities from Table 4.1 to calculate the per-encounter risk of HIV transmission. . . . . . . . . . . . . . . 88Figure 4.5 Responses to the online survey question “What best describesyour HIV testing pattern?”. A large fraction of the populationgets tested regularly, albeit at different rates, while a smallerfraction of the population has no regular testing pattern at all. . 91xvFigure 4.6 Evolution of all compartments for the next five years, usingparameter values from Section 4.5. The total number of in-dividuals is constant, hence the (roughly constant) number ofsusceptibles is not shown for simplicity. The basic model esti-mates a total of 1326 new infections and 1666 newly detectedinfections over five years. . . . . . . . . . . . . . . . . . . . . 95Figure 4.7 Sensitivity of the annual incidence rate as it depends on thetesting rate τ , using the parameter values from Section 4.5.The linear approximation provided by the Direct Differentia-tion method is accurate for parameter values close to the initialvalue. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98Figure 4.8 The full model accounts for two risk and three testing cate-gories, and each resulting compartment is modeled using thebasic model. By facilitating testing GCO encourages individ-uals to increase their testing frequency. We assume that GCOdoes not affect risk behavior. . . . . . . . . . . . . . . . . . . 101Figure 4.9 Per-participant force of infection β = ∑partners rpartner ppartnerU .We use a two-means clustering algorithm to assign each in-dividual into a low-risk or high-risk group according to theirforce of infection from this bimodal distribution. Notice thedifferent orders of magnitude as highlighted by the logarith-mic scale on the x axis. . . . . . . . . . . . . . . . . . . . . . 105Figure 4.10 Model estimates for the spread of HIV prevalence in the nextfive years, without GCO, for the full models with homogeneousand heterogeneous mixing. . . . . . . . . . . . . . . . . . . . 108Figure 4.11 The effect of GCO is that it increases the horizontal forwardtransition rates and decreases the horizontal backward transi-tion rates of the full model. This increasing the rate at whichindividuals become regular and frequent testers, and decreasesthe rate at which people switch to a less frequent testing be-haviour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112xviFigure 5.1 Simplified model. The fraction of infected humans in the pop-ulation is given by h. Infection of susceptible mosquitoes Soccurs at mass-action rate β while removal/recovery occurs ata rate ρ . Infected mosquitoes I infect susceptible humans withprobability γ , given an encounter. Malaria infection does notsignificantly alter the mosquito death rate µ , but fungus infec-tion, occurring with rate α reflecting the intensity of fungal ap-plication, increases the death rate by σ . Since neither malarianor the fungus is transmitted vertically in the simplified modelall new-born mosquitoes (indicated by κ) are susceptible. . . 122Figure 5.2 Life-stage structured model. In this model mosquitoes producelarvae at rate κc. Larvae may be fungal carriers (LF ) or fungus-free (LS) and undergo density-dependent competition (see text)with intensity parameter κL. Larvae mature to produce adultmosquitoes at rate m. The parameter ξ determines the degreeof vertical transmissibility of the fungal pathogen. . . . . . . 124Figure 5.3 Prevalence of malaria in humans and total number of mosquitoesfor varying fungus deployment rate. The steady state humanmalaria prevalence and the total mosquito population, both rel-ative to baseline, are plotted against the fungus exposure inten-sity α , with fixed fungal pathogen virulence σ = 0.1 day−1.As expected, quantities decrease when α increases. Note that,once α is large enough so that R0 < 1 and malaria is eradi-cated, he remains constant at 0. Full details of all other chosenparameter values are given in Appendix C. . . . . . . . . . . 128xviiFigure 5.4 Malaria prevalence in humans varying over fungal pathogenvirulence and deployment rate. The heat maps (top row) in-dicate the endemic malaria prevalence in humans he, relativeto baseline where no fungus is applied, for the given param-eters, the graphs (bottom row) show a one-dimensional pro-jection of the heat maps, for a fixed fungal application (spray-ing) rate. Two distinct cases can be distinguished: (i) If κ −2µ < 0 (left column) then human malaria prevalence is a de-creasing function of fungal virulence σ and deployment rateα . (ii) If κ − 2µ > 0 (right column), the curve describingthe worst-case fungal virulence σ∗ is superimposed, indicatinga non-monotonic relationship between human malaria preva-lence and σ . Top row: The dark blue region indicates R0 < 1and hence he = 0. Bottom row: one-dimensional slice throughthe heat map above for a fixed value of α = 0.1 day−1 (left)and α = 0.5 day−1 (right), as indicated by the black line in theheat map above. Here, µ = 0.1 day−1, while κ = 0.18 day−1(left) and κ = 0.48 day−1 (right). All other parameter valuesare as given in Appendix C. . . . . . . . . . . . . . . . . . . 131Figure 5.5 Malaria prevalence in humans varying over vertical transmis-sion, deployment rate and fungal virulence. Each subfigureshows the endemic malaria prevalence in humans, relative tothe no-fungus baseline, plotted against the fungal virulenceσ , for five different levels of the fungal application (spray-ing) rate α . The different values of α in each subfigure are{0.05,0.1,0.15,0.2,0.25} days−1, corresponding to curves fromtop to bottom, and the length of the dashing increases with α .Each subfigure represents a different value of the vertical trans-missibility ξ from ξ = 0 (no vertical transmission) to ξ = 1(perfect vertical transmission). All other parameter values areas given in Appendix C. . . . . . . . . . . . . . . . . . . . . 133xviiiFigure C.1 Data fitting for κ . We fit an exponential function for six of thedata points reported in [2] to find an approximation for κ−µ . 197xixGlossaryART antiretroviral therapyBCCDC British Columbia Centre for Disease ControlMSM men who have sex with men, a high-risk group for HIV infection.IDU injecting drug user, a high-risk group for HIV infection.GCO Get Checked OnlineSTI sexually transmitted infectionHIV human immunodeficiency virusSIV simian immunodeficiency viruses, closely related to HIV the natural hostof SIV are non-human primates. Unlike HIV, SIV infections in theirnatural hosts are usually non-pathogenic.ODE ordinary differential equationPDE partial differential equationHIM health Initiative for MenIRS indoor residual sprayingDDT dichlorodiphenyltrichlo-roethanePDF Portable Document FormatBC British ColumbiaxxAIDS acquired immunodeficiency syndromeCD4 cluster of differentiation 4, a glycoprotein found on the surface ofimmune cells that HIV requires to infect a cellxxiAcknowledgmentsThis thesis would not have been possible without the support of many great peoplethroughout the years.First and foremost I want to thank my family for supporting my wish to seekthe best education and work with the most exciting group, even when that meantthat I would be on the other side of the planet for several years.Thank you Isabell Graf for being on my side and supporting me, especiallyduring the difficult and most busy times. Without your help and inspiration thisjourney would not have been possible.I want to thank my supervisor Daniel Coombs for giving me the opportunityto work in his research team and for his support, encouragement, and guidancethroughout. I remember countless inspiring conversations full of ideas and energy,always with a healthy portion of humor. It makes me proud to have such a smartand driven Doktorvater, and I hope to can repay some of your trust with the workin this thesis.Thank you to my supervisory committee Leah Keshet, Rachel Kuske, BrianWetton and Ruy Ribeiro for your valuable input and advice.My experience at UBC would not have been nearly as pleasant without manyfriends that I was fortunate to meet and work with for several years. I’m excited tofollow your next adventures: Carmen Bruni, Christina Koch, Michael Lindstrom,Iain Moyles, William Thompson and, of course, Alejandra Donajı´ Herrera Reyes!I am grateful for financial support from UBC, the International Graduate Train-ing Centre by the Pacific Institute for the Mathematical Sciences, and the CanadianInstitute of Health Research.xxiiChapter 1Introduction1.1 Mathematical modeling of infectious diseasesThe main goal of mathematical biology is to obtain insights into biological sys-tems that lead to deeper understanding and useful predictions. To do so requiresdescribing the biological system in a mathematical manner, using well-defined as-sumptions and simplifications, analyzing the resulting mathematical problem, andinterpreting its results in the biological context. This approach is most powerful insystems that are difficult to study experimentally, in particular when facing tech-nical limitations or ethical considerations. In such situations mathematical modelscan be used to surface otherwise hidden dynamics and predict the impact of vari-ous alterations on the study system or variables of interest. Therefore it is naturaland useful to apply mathematical models to study infectious diseases, which canbroadly be classified into two categories.Within-host models study the dynamics within a single host or individual, suchas the interaction of pathogens with the immune system or the signaling pathwaysresponsible for the function of immune cells. Typically the system is difficult tomeasure directly, but some general interaction principles that govern the dynamicsare known or proposed. By translating these general principles into well-definedrules, mathematical models are able to reveal hidden dynamics, increase the under-standing of the underlying biological system, and ultimately provide suggestionsfor new ways to fight the infection. One highlight of within-host infectious disease1modeling is a story from the early days of studying the human immunodeficiencyvirus (HIV). Two teams of experimentalists and theoreticians had formed: GeorgeShaw with Martin Novak and David Ho with Alan Perelson. These teams publishedtwo historic papers [52, 111] in 1995 that finally refuted a false understanding ofHIV dynamics and ultimately led to new era in fighting the infection. At that timeit was known that the viral load and number of T helper cells (and more generallycluster of differentiation 4 (CD4) cells, the main target of HIV) of an HIV-infectedindividual was roughly constant for many years until eventual disease progression,which was believed to be indicative of slow and static within-host dynamics. In thestudies patients who received the recently developed first generation of antiretrovi-ral therapy (ART) were analyzed. The time-series of the viral load of the patientswas measured and showed an exponential decline with rate of about 0.6 day−1, butit was unclear how this result should be interpreted and what it implied. So a sim-ple two-dimensional system of ordinary differential equations (ODES) was set-upto describe the hidden dynamics under ART:dT ∗dt=−δT ∗,dVdt= pT ∗− cV,(1.1)where infected target cells T ∗ die at rate δ and produce virions at rate p, whilevirions are cleared at rate c. Being a linear system the solution of the change ofviral load is quickly found to beV (t) =V0ce−δ t −δe−ctc−δ ≈V0e−δ t . (1.2)The approximation is valid because the viral clearance rate was known to be muchfaster than the death rate of infected cells, c δ . This shows that the observed ex-ponential decay rate corresponds to the death rate of infected target cells, which arethus found to have an average half-life of ln(2)/0.6 ≈ 1.2 days only! This game-changing realization, that millions of an infected person’s CD4 cells are killed andreplaced every day, finally refuted the theory that disease progression is slow be-cause “not much is happening”. In particular, those results imply that HIV is very2susceptible to interference in the viral life cycle and thus inspired further searchfor new ART agents. When several anti-HIV drugs were combined to avoid theevolution of resistance, a new era in the fight against HIV infection had begun. In1996, for the first time, an HIV diagnosis was no longer a death-sentence. Thisforms a remarkable example of how a simple mathematical model was able to helpimprove the lives of millions of people.The second broad category of infectious-disease models are between-host mod-els, where the focus is on the dynamics of how an infection spreads in a population.These models are often developed with the aim of measuring the contribution ofcertain transmission channels, predicting the impact of health interventions, and ul-timately suggesting optimal resource allocation. In the ideal case such models cancontribute to policy decisions and facilitate a fact-based balancing of competingpublic-health priorities. One of the first such mathematical models that the authorof this thesis encountered was Predicting the epidemiological impact of antiretro-viral allocation strategies in KwaZulu-Natal: the effect of the urban–rural divideby David Wilson, James Kahn and Sally Blower [115], which also inspired theauthor’s first publication [65]. The pure model’s ethically questionable predictionis that focusing all resources in the cities should have the optimal public-healthoutcome, which is an important fact that mathematical modeling can make the po-litical leaders aware of when they design the best allocation strategies. Anotherclassic example of mathematical modeling is the very first malaria model by SirDonald Ross [95]. The pioneer of identifying the mechanism by which malariaspreads developed and used epidemiological models to quantify and extend hislaboratory findings. His models were also used to estimate the cost-effectivenessof reducing the mosquito population as a counter-measure to prevent new humanmalaria cases. Ross received the 1902 Nobel Prize in Medicine for his discoveriesin the transmission of malaria, but considered his mathematical models as his mostimportant scientific contribution [58].In this thesis we use mathematical models to reveal hidden within-host HIVdynamics in the first days after exposure, quantify the population-level impact andcost-effectiveness of facilitating HIV testing in Vancouver, and reveal how to opti-mally engineer a recently developed anti-malarial agent. In order to understand thebackground and motivation of these models we first give a more detailed introduc-3tion into the biology of HIV and malaria.1.2 The biology and modeling of the humanimmunodeficiency virusHIV causes the acquired immunodeficiency syndrome (AIDS), which is responsi-ble for an estimated 39 million deaths since its official discovery in 1983. Despiteenormous progress since the 1980’s, we still do not have a potent response to thisworldwide epidemic. The number of annual AIDS related deaths is still in the mil-lions, no cure (neither clinical, nor functional) has been found, and despite enor-mous effort no broadly effective vaccine has been developed to date. Major reasonsfor these shortcomings include the immense diversity of HIV due to its high muta-tion rate, the many ways HIV can be transmitted, e.g., sexually, via contaminatedblood (transfusions, needle sharing, occupational) or from mother to child (duringpregnancy, birth, or even breastfeeding), the lack of a good animal model, socialstigma and false beliefs especially in some countries of the developing world, andthe severe resource limitations in the countries that are most affected.The main targets of HIV are helper T-cells. Ironically and tragically, these cellsplay an important role in regulating the adaptive immune response, which is re-sponsible for fighting foreign antigens. Infected T-cells die at a heightened rateand, in an untreated individual, their loss can not be compensated for. Hence thenumber of T-cells drops over the course of infection until the adaptive immune sys-tem is so compromised that opportunistic infections can take hold to cause diseaseand eventual death.In order to stop the disease progression we have to understand the viral life-cycle. A HIV particle enters a target cell by binding to the CD4 receptor, as well asa chemokine reception, most commonly CCR5 or CXCR4. The binding initiatesfusion with the cell membrane so that the genetic material of the virus can enter thehost cell. Next, reverse transcriptase transcribes the viral RNA in DNA which isthen transported to the cell’s nucleus and integrated in the host DNA. The discoveryof reverse-transcriptase was a paradigm shift that resulted in a Nobel prize – up tothis point the central dogma of molecular biology was that information flows fromDNA to RNA to protein, but not in the reverse direction. This process is also4very error-prone and the reason for HIV’s high mutation rate that allows the virusto escape the host’s immune response and quickly develop drug resistance. Theintegrated viral DNA gets transcribed into new viral RNA that leaves the nucleusto be assembled to new viral particles. These new virions are soon released bybudding or bursting and go on to find new host cells to infect.In this thesis we study the early in vivo viral dynamics of the first few daysfollowing HIV exposure (Chapter 2 and Chapter 3). In most cases early HIV in-fection has very mild or no symptoms, so that many people are not aware of theirinfection. In the case when someone reports a recent possible exposure to the virusit can be difficult to confirm or exclude infection when the virus population maynot have yet grown to a detectable level. This uncertainty is a source of anxiety forclinicians and patients alike [103], and catching infections early can be beneficialfor the individual as well as the population in general:• Evidence from nonhuman primates indicates that HIV reservoirs may be es-tablished very early after exposure [29], and that the viral set point, which isestablished a few weeks after exposure, is an important factor in predictingtime to progression to AIDS [78]. Hence an early intervention that failed toprevent infection may still have a positive long-term effect if the seeding ofthe HIV reservoir had been disrupted or if the viral set point was lowered.• The importance of early HIV infection on a population level is highlighted bythe fact that the proportion of new infections attributed to individuals in theearly stage of infection is disproportionately high, even if the exact numericalestimates vary, see Figure 1.1. One reason for this is that recently infectedindividuals have a large initial viral load, which increases the likelihood oftransmitting the infection to a susceptible partner.Due to the low probability that a single exposure leads to infection, and sincethe number of virions and cells initially involved is small, the early phase is verydifficult to study clinically. Therefore, this is an area where mathematical modelscan make major contributions to gaining new insights that would be difficult orimpossible to obtain otherwise. In fact, the relatively low number of virions andcells may allow approaches that would be numerically unfeasible in more advanced50.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0Proportion of New Infections Caused by Early InfectionsEurope (MSM)U.S. (MSM)U.S. (heterosexuals or MSM)Sub-Saharan Africa (heterosexuals)Hayes and White, 2006Abu-Raddad and Longini, 2008Salomon and Hogan, 2008Hollingsworth et al., 2008Powers et al., 2010Pinkerton, 2007Prabhu et al., 2009Jacquez et al., 1994Pinkerton and Abramson, 1996Koopman et al., 1997Kretzschmar and Dietz, 1998Xiridou et al., 2004Figure 1.1: Importance of acute HIV infection in new transmissions. Modi-fied from [20].stages of the infection. The first project of this thesis is motivated by two practicalquestions from clinicians at HIV testing clinics, “What is the expected length oftime from exposure until the virus grows to a detectable level?” and “When shoulda confirmatory test be scheduled to catch a real infection as early as possible andsimultaneously exclude infection if negative?”.Having studied the within host viral dynamics around an HIV test we investigatein another project the impact of testing on the disease prevalence in the population.When infected individuals are aware of their infection they can adjust their riskbehaviour to reduce the likelihood to transmit the infection onwards. Therefore,increasing the testing rate can be a viable strategy to decrease the disease incidencein a population. This is particularly true in risk groups like the Vancouver men whohave sex with men (MSM) community, where prevalence is high and awareness ofinfection is sufficiently low that many transmission events occur every year. Therecently implemented Get Checked Online (GCO) program facilitates HIV testingby providing printable lab forms and test results online. We develop mathematicalmodels to predict the population-level impact of GCO, which we parameterize withsurvey data from the at-risk population in question.61.3 Old and new ways to combat and model malariainfectionMalaria is an infectious disease which is caused by the Plasmodium parasite, whichaffects the red blood cells and other tissues of its host. There are many species ofmalaria, but among those infecting humans the most common are Plasmodiumfalciparum and Plasmodium vivax [94].According to the WHO [114], malaria is endemic in over 100 countries and40% of the world’s population live in malaria-endemic areas. In many developingcountries the disease is the leading cause of illness and death. Despite a slightlydecreasing trend, there are still more than 225 million annual malaria cases, causingalmost 800,000 deaths, which corresponds to 2.23% of all deaths worldwide. 90%of the malaria-caused deaths occur in sub-Saharan Africa, with young children andpregnant women among the groups that are most affected.The dominant mode of parasite transmission between humans is facilitatedby mosquitoes of the Anopheles genus. Most mosquito genera cannot actuallytransmit malaria between humans and only female mosquitoes bite, as they requireblood meals for the development of their eggs. The life-cycle of the malaria para-site is surprisingly complex: Upon biting a human, an infected mosquito passes onthe parasite as sporozoites through its saliva, where they travel through the blood-stream to the liver. After an incubation period that can range from several daysto several months the parasite reaches the merozoite stage where it begins to in-vade and rupture red blood cells as it reproduces. Once it has begun to infect redblood cells, the merozoite stage progresses to the gametocyte stage where the par-asite develops into male and female gametocytes, which can be transmitted back tomosquitoes. When an infected female mosquito bites a human in this stage, the fe-male gametes are fertilized and develop into oocysts on the wall of the mosquito’sgut. Over approximately ten days the oocyst ruptures and immature sporozoitesleave the gut and enter the salivary glands of the mosquito where they mature andcan then be transmitted to a susceptible human again.The first mathematical models for malaria transmission were two-dimensionalcompartment models of the infected human and mosquito population. The veryfirst model was developed by Ross in 1911 [94], which was later extended by7Macdonald [73] and Anderson and May [6], among others. More recently Chit-nis [18, 19] developed a series of SEIR malaria models where many populationand disease dynamic effects are considered in great detail. Others have adjustedand extended these mathematical models to include compartments which distin-guish between infected and infectious humans and mosquitoes and to reflect thefact that humans can become (temporarily) immune or treated, investigate the im-pact of indoor residual spraying include spatial heterogeneities and allow for time-dependent parameters to account for environmental factors such as rainfall andhumidity [4, 64, 99, 101].The most straightforward way to fight human malaria infection is to removemosquitoes. Since mosquitoes often remain indoors for some time after a bloodmeal a very promising strategy is indoor residual spraying (IRS) of pesticides (see,e.g., [101] for a simple mathematical model), which had great success in severallocations around the world and was even able to eradicate malaria from certain ar-eas. For example, the National Malaria Eradication Program was started in 1947and eradicated malaria in the United States by 1951, and similar stories can betold from regions in India, Sri Lanka and other countries. More historical infor-mation can be found in [47], while [114] is a good starting point for more recentdevelopments.However, pesticides can be toxic for humans if taken in large quantities orwhen they contaminate agricultural land. For this reason the popular pesticidedichlorodiphenyltrichlo-roethane (DDT) has been banned in most countries by theStockholm Convention 2004. Another disadvantage of pesticides is that mosquitoescan quickly develop resistance, sometimes even within a timescale of months to afew years (see e.g. [6, 10, 56, 109, 114]). Largely due to these difficulties no newpesticides have been approved for malaria control since the 1970’s [114].Our modeling work is inspired by a recent Science paper [31], that proposeda new way of fighting the disease. The authors engineered a Metarhizium aniso-pliae fungus strain that can neutralize malarial sporozoites in the mosquito vector,preventing onward transmission to humans. In laboratory experiments their engi-neered fungus was able to dramatically reduce the sporozoite counts in the salivaryglands of mosquitoes, making malaria-infected mosquitoes less infectious to hu-mans. This new pathogen is particularly appealing because it does not increase the8mosquito’s death rate until later life-stages when most reproduction has happened,so we do not expect a rapid development of fungus-resistance in the mosquito pop-ulation. Further, since this fungus can be engineered in the laboratory we may beable to modify its induced death rate to maximize the intervention’s impact on thehuman malaria prevalence.Increasing the virulence is likely to induce fungus-resistance, but even if thiseffect is neglected the optimal virulence is not obvious: On the one hand, the off-spring of fungus-infected mosquitoes are potential vectors for transmitting malaria,so increasing the virulence to reduce the total size of the mosquito population couldbe beneficial. On the other hand, it’s the number of malaria-infected mosquitoesthat drives the human epidemic, not the total number of mosquitoes. Since fungus-infected and malaria-infected mosquitoes compete for the same resources it maybe more beneficial to lower the virulence of the fungus so that the fungus-infectedmosquitoes survive longer to compete with susceptible and malaria-infected mos-quitoes.To quantify these effects and trade-offs we built a mathematical model thatincludes humans and mosquitoes and larvae, and investigate how the prediction ofthe human malaria prevalence changes when fungus parameters are varied. Henceour model can be used to guide the future development of this engineered pathogen,and ultimately help developing new ways to fight malaria infection.1.4 How this thesis is structuredIn this thesis we present three case studies where mathematical models reveal newinsights into the dynamics of HIV and malaria infection. Over the last couple ofyears we extended well-known results about continuous-time branching processesto model and efficiently analyze the dynamics of the viral load in early HIV in-fection. We give a coherent analysis of these methods in Chapter 2. One of thekey clinical questions in the research of early HIV infection is the optimal tim-ing of early testing, in particular, for how many days after exposure the vial loadremains too small to be detectable. Our modeling work in Chapter 3 uses novelmathematical models and viral-load time series data to quantify the length of this,so-called, eclipse phase, and also provides quantitative recommendations for tim-9ing of follow-up tests. In the following Chapter 4 we model the population-levelimpact of Get Checked Online, a program that recently launched in Vancouverand aims to reduce HIV incidence by simplifying how HIV tests are scheduled andhow test results are delivered. In Chapter 5 we investigate the effectiveness of arecently proposed anti-malaria fungus and how to engineer its characteristics tooptimize the impact in reducing the human population-level malaria prevalence.Finally, we conclude with a discussion of future research directions of our workand mathematical biology in general.This thesis has three appendices: In Appendix A we analyze variants of thewithin-host HIV models presented in Chapter 2 that include infected cells, infec-tious virions and non-infectious virions. Appendix B provides additional detailson how the time series were pre-processed in Chapter 3, and also shows the modelpredictions for each of the different patients. Appendix C gives the detailed proofsof mathematical statements made in Chapter 5 and explains how the model param-eters were obtained from the data.10Chapter 2Mathematical background ofbranching processesThis chapter introduces the theory of continuous-time branching processes, with afocus on their application to early HIV infection. We are going to derive impor-tant properties and formulations which we will apply to a case study in Chapter 3.In contrast to classical textbooks on this topic [39, 46, 59, 60] we do not aim toformulate our findings in the most general way. Instead we follow the practicalneeds of the application and research questions that we are going to answer withthis set of mathematical tools. Our approach allows us to avoid the technical for-mulations seen elsewhere that are aimed at a statistical and stochastical audience,and hopefully makes the techniques of this chapter easily accessible to the broadermathematical modeling community. Having this community in mind we will de-rive an implementation-ready formulation of all the main results that can readilybe implemented in a numerical computing environment like MATLAB or PYTHON.Even though none of the individual mathematical results presented here are newin a strict sense, they have never been combined, interpreted and applied in thisway to be suitable for within-host viral dynamics modeling and to ultimately helpanswer import clinical questions in this area of research today.112.1 IntroductionOver the previous years the Coombs HIV group (Alejandra Herrera, Bernhard Kon-rad, Daniel Coombs and Jessica Conway) has worked on translating theoreticalknowledge about branching processes into a more practical form that is ready toimplement in a numerical computing environment like MATLAB or PYTHON. Wealso extended some known results and combined them in new ways to suit ourapplication to within-host HIV modeling. The first application of these techniqueswas the modeling of HIV dynamics of patients on treatment, see [21]. The key stepsused for this foundation are summarized in Section 2.4 and Section 2.5, and fur-ther extensions of this method has allowed us to study several HIV-related researchquestions [22, 50, 51]. One major benefit of the tools developed here is that thepopular Gillespie algorithm, which is computationally very time consuming, canbe avoided entirely for branching processes. Unfortunately, though, the methodsof this chapter only apply to processes that satisfy the branching property.We start by analyzing the birth-death process in great detail. The key ideas andmathematical justifications for more complex multi-type branching processes arevery similar, but unlike these more complicated models the single-type branchingprocess admits an analytical solution which is convenient to verify our more gen-eral techniques and results. We first define our notation and state the assumptionsthat we make for our analysis. Then we derive the Kolmogorov differential equa-tions, also called the master equations, for the probability of each possible state ofthe system at any time t. As key tool in the analysis of branching processes wethen introduce the probability generating function and derive its important proper-ties. Rewriting the Kolmogorov differential equations in terms of the probabilitygenerating function we obtain a system of partial differential equations (PDES) anda ODE, respectively. Here is where the branching property is used to simplify theinfinite system of ODES to a finite system of ODES, which implies that the proba-bility generating function can readily be approximated by your favorite numericalODE solver. Using the Cauchy-Euler integral formula we then find an integral ex-pression for the desired corresponding probability distribution.With this theoretical underpinning we then turn our attention to research ques-tions in early HIV infection: calculating the probability that the size of the virus12population is above a detection threshold, and calculating the time from exposureto detectability of infection. In the latter case we see that conditioning the modelon non-extinction is critical for estimating the length of this time period, and sowe derive the mathematical framework to handle this variant. We then repeat theanalysis for multi-type branching processes to show how the techniques are to beadjusted to handle more sophisticated models.2.2 The birth-death modelThe birth-death model is a classical example of a branching process and intro-duced in many textbooks, e.g. [39, 60, 67]. In this process the random variable Nis integer-valued and events, or reactions, occur at random times drawn from expo-nential distributions. We define the birth and death rates as b and d, respectively.Then the system can be represented schematically asindividual is born N b−→ N+1,individual dies N d−→ N−1.The random variable N counts the number of individuals in the population at timet. We define the probability of having n individuals at time t ≥ τ , given an initialpopulation of n0 individuals at time τ:P(n,n0, t,τ) := P(N(t) = n |N(τ) = n0).Our first assumption is that the system behaves like a stationary Markov chain.That is, the future is independent of the past, given the present (Markov prop-erty)and P(n,n0, t,τ) only depends on the difference t− τ , not the absolute time:P(n,n0, t,τ) = P(n,n0, t− τ) (stationary).The second assumption is that the probability of an event in a population of asingle individual in the time span of length h is, to first order, proportional to thereaction rate and the duration h:P(2,1,h) = bh+o(h)P(0,1,h) = dh+o(h)13P(1,1,h) = 1− (b+d)h+o(h)The probability of more than one event is assumed to be o(h). Here o(h) denotesfunctions f for which limh→0f (h)h = 0. When we further assume that individualsact independently we can generalize this assumption to a population of size n.For example, a net gain of one individual in a time interval of length h occursexactly when one individual gives birth and no other event occurs. All other waysto achieve a net-gain of one individual are of order o(h). ThereforeP(n+1,n,h) = n(bh+o(h))(1− (b+d)h+o(h))n−1+o(h)= nbh+o(h),and similarly, for a net loss of one individual,P(n−1,n,h) = n(dh+o(h))(1− (b+d)h+o(h))n−1+o(h)= ndh+o(h).Note also that the two assumptions together imply that the waiting time to the nextevent is exponentially distributed. Indeed, let T1 be the time at which the first newindividual is born, and define the waiting time W (t) = P(T1 ≥ t). By definitionW (0) = P(T1 ≥ 0) = 1 and using the assumptions we findW (t+h) = P(T1 ≥ t+h) = P(T1 ≥ t)P(T1 ≥ t+h |T1 ≥ t)= P(T1 ≥ t)P(T1 ≥ h |T1 ≥ 0)=W (t)W (h)=W (t)(1−bnh+o(h)).Subtracting W (t) on both sides and then dividing by h and letting h tend to zerothis implies W ′(t) =−bnW (t). Solving this differential equation we find that W (t)= e−bnt , and hence the waiting time for the birth event is exponentially distributed.The death event is handled analogously. Therefore, the waiting time until the nextevent is also exponentially distributed, as the minimum of exponentially distributedrandom variables.142.3 Gillespie’s Algorithm - a powerful but costlystochastic simulation algorithmDeveloped by Doob [27] as early as 1945, Gillespie’s algorithm became popularin 1977 when Gillespie published what became a landmark paper for stochasticsimulations [37]. The algorithm realizes an exact solution path of the evolutionof the population size over time. It works equally well for branching processesand more complicated Markov processes where the waiting time for reactions isexponentially distributed, and is a very popular algorithm in many different areasof mathematical biology and beyond. Unlike most comparable procedures, everyreaction is explicitly simulated and no small time steps are approximated by largertime steps of fixed length. Gillespie himself was motivated by chemical reactionsof spatially uniformly mixed species in a fixed volume. Therefore a possible reac-tion is sometimes referred to as reaction channel.The algorithm works as follows. At time t calculate the rate of each possible re-action p j, for j = 1, . . . ,n. Since the waiting time for each reaction is exponentiallydistributed with parameter p j, the time until the next reaction is also exponentiallywith parameter p0 =∑nj=1 p j, as the minimum of exponentially distributed randomvariables. Given this rate the time until the next event is obtained by drawing arandom number r1 from an exponential distribution with parameter p0, that is, thetime of the next event is t + r1. The likelihood that the next event is reaction jis proportional to its relative probability p j/p0, so draw a second random num-ber that is distributed according to these probabilities. In practice this is achievedby drawing a uniformly distributed second random number r2 and updating thepopulation size according to the k-th reaction, where k is the integer that satisfies∑k−1j=1 p j/p0 < r2 ≤ ∑kj=1 p j/p0. Repeat the procedure at t = t + r1 until a desiredend-time or population size is reached.Since each simulation is just one possible realization of the underlying stochas-tic process, usually many thousand or millions of simulations have to be run toobtain meaningful summary statistics. This becomes particularly time-consumingwhen reactions occur very frequently. This is a common problem when the popu-lation size, and hence the reaction rates become very large. Another problem withthe basic version of Gillespie’s algorithm is that many simulations have to be run150 5 10 15 2010−210−1100101102days after exposurePlasmavirusRNA(copies/ml)Figure 2.1: Sample paths of the stochastic birth-death process, started witha population size of 100 and ran until a desired threshold is reached.Birth rate b = 23.9 day−1, death rate d = 23 day−1 and threshold375,000. This threshold corresponds to the HIV detection limit of 50RNA copies/ml, at 2 RNA copies per virion in a human with 15L ofextracellular fluid.to observe rare events. Solutions to these problems, such as a variety of “leaping”methods as well as importance sampling, have been suggested and remain an activearea of research [9, 16, 26, 38, 55, 68, 72, 79, 120]. Figure 2.1 shows the resultof four Gillespie simulations of the birth-death process. In the remainder of thischapter we avoid Gillespie’s algorithm altogether and instead derive a mathemati-cal method to obtain the probability distribution more directly.162.4 Derivation of the master equationsOur goal is to calculate the probability P(n,n0, t) for all times t and populationsizes n. Note that it suffices to consider a fixed initial population size n0, that is,P(n,n0,0) = 1n,n0 , where 1a,b is the indicator function which is 1 when a = b and0 otherwise. Indeed, if the initial condition is distributed according to a probabilitydistribution (ρn0)n0≥0 then P(N(t) = n |N(0) = ρn0) = ∑∞n0=0 P(n,n0, t)ρn0 . Thefirst step towards solving for P(n,n0, t) is to consider a time interval (0, t +h) andsplit it into a long step (0, t) and a short step (t, t+h). Then, for the total populationsize to change from n0 to n in (0, t+h), it could have been at any population size kat time t and then transitioned from k to n in the remaining time. This leads to theChapman-Kolmogorov equationP(n,n0, t+h) =∞∑k=0P(k,n0, t)P(n,k,h)= P(n−1,n0, t)P(n,n−1,h)+P(n+1,n0, t)P(n,n+1,h)+P(n,n0, t)P(n,n,h)+o(h)= b(n−1)hP(n−1,n0, t)+d(n+1)hP(n+1,n0, t)+(1− (b+d)nh)P(n,n0, t)+o(h).Next, we subtract P(n,n0, t) from both sides, divide the resulting equation by h andlet h→ 0, keeping in mind that limh→0 o(h)/h = 0, to obtainddtP(n,n0, t) = limh→0P(n,n0, t+h)−P(n,n0, t)h= b(n−1)P(n−1,n0, t)+d(n+1)P(n+1,n0, t)− (b+d)nP(n,n0, t),P(n,n0,0) = 1n,n0 .(2.1)This equation is a forward master equation, or Kolmogorov forward equation. Itcan nicely be interpreted as a balance equation: [rate of change of state n] = [sumof reactions to get into state n] - [sum of reactions to leave state n].In the above we could have also chosen to split the interval (0, t + h) into asmall step (0,h) followed by a larger step (h, t + h). In order for the population17size to change from n0 at time 0 to n at time t +h it could have been at any size kat time h, which leads to the Chapman-Kolmogorov equationP(n,n0, t+h) =∞∑k=0P(k,n0,h)P(n,k, t)= P(n0+1,n0,h)P(n,n0+1, t)+P(n0−1,n0,h)P(n,n0−1, t)+P(n0,n0,h)P(n,n0, t)+o(h)= bn0hP(n,n0+1, t)+dn0hP(n,n0−1, t)+(1− (b+d)n0h)P(n,n0, t)+o(h).We again subtract P(n,n0, t) from both sides, divide the resulting equation by h andlet h→ 0, keeping in mind that limh→0 o(h)/h = 0, to obtainddtP(n,n0, t) = bn0P(n,n0+1, t)+dn0P(n,n0−1, t)− (b+d)n0P(n,n0, t),P(n,n0, t) = 1n,n0 .(2.2)This equation is called the backward master equation, or Kolmogorov backwardequation.The two sets of master equations are equivalent systems of infinitely manycoupled ODES. In very special cases, e.g. in the pure birth or pure death process,these equations can be solved recursively for P. The key to finding P for moresophisticated models is the probability generating function, which we introduce inthe next section.2.5 The probability generating functionWe gain a lot of insight into our model when we can solve Kolmogorov’s forwardor backward differential equation. Unfortunately, a straightforward approach isnot possible as both formulations describe a system of infinitely many, highly in-terconnected linear ODES, and we generally do not have a natural first equation wecan solve to proceed inductively. Instead we solve all equations at once using theprobability generating function, a power-series expansion with the probabilities asits coefficients.182.5.1 Definition and basic propertiesLet D = {z ∈ C : |z| ≤ 1} and define the multi-variable probability generatingfunctionG : N0× [0,∞)×D→ D, (n0, t,z) 7→∞∑n=0P(n,n0, t)zn. (2.3)If we again let N be the random variable of the number of individuals at time t ina population that started with n0 individuals at time t = 0 we can write the prob-ability generating function as G(n0, t,z) = E[zN ]. This observation is particularlyuseful for proving mathematical properties of the probability generating function.Further note that the right hand side is well defined and converges absolutely by thetriangle inequality since ∑∞n=0 P(n,n0, t) = 1 holds for all t ∈ [0,∞). In particular,we have that G(n0, t,1) = 1. The probability generating function has a lot of usefulproperties:1. First and foremost, knowing the probability generating function is equivalentto knowing the probabilities P, in which we are interested.1 To obtain P fromG we make use of the identity∂ k∂ zkzn = n!(n−k)! zn−k, if k ≤ n,0, if k > n,so that when z = 0 is plugged in we have∂ kzn∂ zk∣∣∣∣z=0= n!1n,k.Therefore, we can obtain P(n,n0, t) by n-time differentiation of the definitionG(n0, t,z) = ∑∞n=0 P(n,n0, t)zn:P(n,n0, t) =1n!∂ nG(n0, t,z)∂ zn∣∣∣∣z=0. (2.4)2. Setting n = 0 in the identity above, we obtain the likelihood P(0,n0, t) that1This is the main reason why G is sometimes called the “wonderful function” [67].19the population is extinct at time t as G(n0, t,0).3. We obtain the mean value of the population size by evaluatingE[N] =∞∑n=0nP(n,n0, t) =∞∑n=0nP(n,n0, t)1n−1 =∂G(n0, t,z)∂ z∣∣∣∣z=1. (2.5)4. In fact, we can calculate any higher order moments of N by taking the corre-sponding number of derivatives. For example, taking two derivatives yields∂ 2G(n0, t,z)∂ z2∣∣∣∣z=1=∞∑n=0(n2−n)P(n,n0, t) = E[N2]−E[N],which implies that the variance of N is given byVar(N) = E[N2]− (E[N])2 = (E[N2]−E[N])+E[N]− (E[N])2=(∂ 2G(n0, t,z)∂ z2+∂G(n0, t,z)∂ z−(∂G(n0, t,z)∂ z)2)∣∣∣∣∣z=1.2.5.2 The differential equation formulationsJust as there are two master equations, there are also two differential equations thatthe probability generating function satisfies. The forward master equation leads toa PDE, while the backward master equation leads to a system of infinitely manyODES. Starting with the forward master equation (2.1)ddtP(n,n0, t) = b(n−1)P(n−1,n0, t)+d(n+1)P(n+1,n0, t)− (b+d)nP(n,n0, t)multiply both sides by zn and sum over all n ∈ N0 to obtain∞∑n=0ddtP(n,n0, t)zn =∞∑n=0(b(n−1)P(n−1,n0, t)zn+d(n+1)P(n+1,n0, t)zn− (b+d)nP(n,n0, t)zn).20We now rewrite this term-by-term, making use of the fact that the probability of anegative population size is zero, P(n,n0, t) = 0 for all n < 0.1. ∑∞n=0 ddt P(n,n0, t)zn = ∂G/∂ t,2. ∑∞n=0 b(n−1)P(n−1,n0, t)zn = b∑∞k=0 kP(k,n0, t)zk+1 = bz2∂G/∂ z,3. ∑∞n=0 d(n+1)P(n+1,n0, t)zn = d∑∞k=0 kP(k,n0, t)zk−1 = d∂G/∂ z,4. ∑∞n=0(b+d)nP(n,n0, t)zn = (b+d)z∑∞k=0 kP(k,n0, t)zk−1 = (b+d)z∂G/∂ z.Combining the results above we obtain the PDE formulation for the probabilitygenerating function∂G(n0, t,z)∂ t=(bz2+d− (b+d)z) ∂G(n0, t,z)∂ z,G(n0,0,z) = zn0 .(2.6)Applying the same procedure to the backward master equation (2.2) instead wefind∞∑n=0ddtP(n,n0, t)zn =∞∑n=0(bn0P(n,n0+1, t)zn+dn0P(n,n0−1, t)zn− (b+d)n0P(n,n0, t)zn).Notice that, unlike for the forward equations, there is no need to shift the indices,so we obtain directly∂G(n0, t,z)∂ t= bn0G(n0+1, t,z)+dn0G(n0−1, t,z)− (b+d)n0G(n0, t,z),G(n0,0,z) = zn0 .(2.7)This is an infinite system of ODES. The crucial step and a key asset of branchingprocesses is that we can reduce this infinite system to a finite system of ODES byusing the branching property: Individual branches act independently. Let N1, N2be two independent birth-death processes that both start with a single individual.21Then, using the independence in the third step, we can calculate directly:E[zN1+N2 ] =∞∑n=0P(N1+N2 = n)zn=∞∑n=0n∑k=0P(N1 = k, N2 = n− k)zn=∞∑n=0n∑k=0P(N1 = k)P(N2 = n− k)zn=∞∑n=0∞∑k=0P(N1 = k)zkP(N2 = n− k)zn−k=∞∑k=0P(N1 = k)zk∞∑n=0P(N2 = n− k)zn−k=(∞∑k=0P(N1 = k)zk)(∞∑`=0P(N2 = `)z`)= E[zN1 ]E[zN2 ].Generalizing this to a population of size n0 we obtain thatG(n0, t,z) = (G(1, t,z))n0 (2.8)for all n0 ∈ N0. It therefore suffices to solve (2.7) for G(1, t,z) only:∂G(1, t,z)∂ t= bG2(1, t,z)+d− (b+d)G(1, t,z),G(1,0,z) = z.(2.9)2.5.3 Calculating the probability distribution from the probabilitydensity functionWe now have two differential equations for the probability density function, thePDE (2.6) and the ODE (2.9). The PDE route is more general, because it can alwaysbe derived for more general stochastic processes. However, PDES are much moredifficult to solve, even numerically. To derive the ODE we used the extra assump-tion of the branching property, and obtained a standard ODE whose solution can22easily be approximated numerically. In fact, in the special case of the birth-deathprocess either equation can be solved analytically: The PDE by using the methodof characteristics, the ODE is a Riccati differential equation. Either way, we obtainthe analytical solution of the probability generating function for the birth-deathprocess asG(n0, t,z) =(σ(t)−1+(γ−σ(t))zγσ(t)−1+ γz(1−σ(t)))n0, (2.10)where γ = b/d 6= 1 and σ(t) = e(b−d)t , see e.g., [39].Now that we know the probability generating function it is time to get back theprobability distribution of the population size. Recall from (2.4) that the probabilitydistribution can be obtained by evaluating the corresponding derivative of G at z =0. Again, in this special case we can obtain an analytical expression for P(n,n0, t):P(n,n0, t) =min(n0,n)∑j=0(n0j)(n0+n− j−1n0−1)αn0− jβ n− j(1−α−β ) j,where α = σ(t)−1γσ(t)−1 and β = γα , again see e.g., [39].It is great to have an analytic expression for P(n,n0, t), but the large sum andhuge factorial factors make the above formula unsuitable for numerical algorithms,unless n and n0 are fairly small. Further, such an analytic solution is only possible ifthe analytic solution of the generation function G is available, which is not the casein general. However, a numerical approximation of the corresponding generatingfunction of any branching processes is always available by numerically solving thecorresponding ODE. Hence we set the analytical solutions for G and P(n,n0, t)aside for now, and derive a computationally efficient method to find the probabilitydistribution that works for more general branching processes.An accurate numeric approximation of the solution to the ODE formulation(2.9) is easy to obtain, so we focus on how to translate that to the probability distri-bution. We could just use (2.4) straight out and start taking derivatives. However,numerical differentiation is unstable, especially when thousands or even millionsof derivatives are required. Instead, numerical integration is stable, so we remem-ber Cauchy’s integral formula from complex analysis that links differentiation with23integration:dn fdxn∣∣∣∣x=0=n!2pii∮Cf (z)(z−a)n+1 dz.We choose f (z) = fn0,t(z) =G(n0, t,z), which is a holomorphic function inside thecomplex unit circle and continuous on its closure. Since we eventually want toevaluate the derivatives at a = 0 we let C be the circle with radius 1 around theorigin in the complex plane and obtainP(n,n0, t) =1n!∂ nG(n0, t,z)∂ zn∣∣∣∣z=0=1n!(n!2pii∮CG(n0, t,z)zn+1dz)=12pi∫ 2pi0G(n0, t,eiϕ)e−inϕdϕ,where we substituted z = eiϕ . Next we split the integral at pi and substitute α= 2pi−θ in the second summand. Finally, G(1, t,z) = ∑n P(n,n0, t)zn = G(1, t,z),ez = e−z, and 2Re(z) = z+ z leads toP(n,n0, t) =1piRe(∫ pi0G(n0, t,eiϕ)e−inϕdϕ). (2.11)This is the single most important formula of this section, because it gives us a nu-merically effective formula to obtain the probabilities of interest, without havingto rely on Gillespie simulations. In Figure 2.2 we see that the probability as cal-culated using (2.11) matches the aggregated results from Gillespie simulation verywell, but is computationally much cheaper. The “trick” of using Cauchy’s integralformula to avoid numerical differentiation became popular in the late 60’s, but toour knowledge it was first employed on the generating function of a process thatmodels HIV dynamics by Conway and Coombs [21].2.6 Mean behaviour of the stochastic processIn a branching process the average of the random variable is the solution to the cor-responding deterministic ODE. The typical approach is to consider the ODE first,240 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5−1012345678x 10−3 Gillespiegen. fctn0 0.05 0.1 0.15 0.2−202468x 10−3Figure 2.2: The probability P(150,100, t) of population size N(t) = 150 attime t for a population that starts at N(0) = 100 individuals, with deathrate d = 23 day−1 and birth rate b= 23.9 day−1. The blue line is the ag-gregate from Gillespie simulations, the red line is obtained by integrat-ing the probability generating function as described in Equation (2.11).and then translate the process into its stochastic variant. However, with the proba-bility generating function we can also go the other way. This allows a verificationthat the stochastic variant matches the process that the ODE describes, and, equallyimportantly, the derivation of an expression for the deterministic mean behaviourin cases where this is not immediately obvious.To begin with, we verify that the mean behaviour of the birth-death processindeed corresponds to the deterministic ODE. We fix n0 and t, and recall from (2.5)E[N] =∑nnP(n,n0, t)∂G(n0, t,z)∂ z∣∣∣∣z=1.From the analytical solution (2.10) of the generating function of the birth-deathprocess we easily verify that indeed E[N] = n0e(b−d)t , that is, E[N] solves the ODE25˙E[N] = (b−d)E[N], E[N](0) = n0.In fact, even if the analytical solution of the probability were not available wecould still derive the ODE of the mean of the stochastic process. Set n0 = 1, let f (t)= E[N1(t)] =∂G(1,t,z)∂ z∣∣∣z=1and take the time-derivative to obtaind fdt=ddt(∂G(1, t,z)∂ z∣∣∣∣z=1)=∂∂ zddtG(1, t,z)∣∣∣∣z=1=∂∂ z(bG2(1, t,z)+d− (b+d)G(1, t,z))∣∣∣∣z=1= 2b∂G(1, t,z)∂ z∣∣∣∣z=1− (b+d) ∂G(1, t,z)∂ z∣∣∣∣z=1= (b−d) f (t)with initial condition f (0) = ∂G(1,0,z)∂ z∣∣∣z=1= 1. The solution to this differentialequation is given by f (t) = E[N1(t)] = e(b−d)t . When we extend this result to aninitial population size of n0 we find that E[N(t)] =∂G(n0,t,z)∂ z∣∣∣z=1= n0e(b−d)t , whichagrees with the solution we found earlier.2.7 Calculating cumulative probabilitiesWe can also quickly calculate the probability that the total population size is aboveor below a certain threshold. Having the detection limit of an HIV test in mind wecall this threshold dL and want to know the probability of being above dL at timet. This random variable tells us when the HIV test of an infected individual wouldbe positive, and is therefore of great importance for the clinical questions on thelength of the eclipse phase that we will discuss in Chapter 3.The straightforward way to calculate the probability that the detection limitis below the threshold is to sum all probabilities of being at any value n, forn = 0,1, . . . ,dL− 1. For large values of dL, which is the case for the detectionlimit dL, calculating this cumulative probability involves hundreds of thousands ofsummands. Instead, a slight algebraic manipulation allows us to replace this large26sum of integrals with a single integral:P(N(t)< dL |N(0) = n0) =dL−1∑n=0P(n,n0, t)=dL−1∑n=0(1piRe∫ pi0G(n0, t,eiϕ)e−inϕdϕ)=1piRe∫ pi0G(n0, t,eiϕ)dL−1∑n=0(e−iϕ)ndϕ=1piRe∫ pi0G(n0, t,eiϕ)1− e−idLϕ1− e−iϕ dϕ.Conveniently, a slight adjustment of the integrand suffices to turn the calculationfrom an individual probability to the cumulative probability. On a technical note,if the numerical integrator evaluates the above integral at the left endpoint ϕ = 0,each summand in the geometric series is unity, and hence at this one time point theintegrand needs to be replaced by G(n0, t,1)dL.2.8 The probability of extinction and the basicreproduction number R0In order to calculate the probability of extinction, again consider the process thatstarts with a single individual. Let qs = P(0,1,s) and q = lims→∞ qs be the prob-ability that the population is extinct at time s and eventually, respectively. Notethat q is well-defined because qs is increasing in s and bounded by 1. Next, let tbe the time when the initial individual dies. The corresponding waiting time W (τ)= P(t ≥ τ) is exponentially distributed with parameter d, the death rate. It followsthatqs = P(0,1,s)= P(extinction at s | t > s)×P(t > s)+P(extinction at s | t ≤ s)×P(t ≤ s)= 0× e−ds+∞∑n=0P(n,1, t)qns−t(1− e−ds).(2.12)27The last line requires justification. If the initial individual did not die by times, then the population could not have gone extinct. Otherwise, we condition onthe population size at time t, and require that each of the identical and independentoffspring branching processes goes extinct in the remaining time span s−t. Lettings go to infinity yieldsq = lims→∞qs = lims→∞∞∑n=0P(n,1, t)qns−t(1− e−ds) =∞∑n=0P(n,1, t)qn = G(1, t,q).(2.13)We now want to show that q is the smallest positive number x that satisfies G(1, t,x)=x. To this end, define the helper function h(x) = G(1, t,x)− x, which has the fol-lowing properties1. h(0) = P(0,1, t)≥ 0, h(1) = 0,2. h′(0)≤ 0, h′(1) = E[N]−1,3. h is convex, h′′(x)≥ 0.So x= 1 is always a root of h and since h is convex it has at most one additional rootin [0,1), see Figure 2.3. In fact, this additional root exists if and only if h′(1) =E[N]− 1 > 0 which corresponds to the case when the population is expected togrow on average.If we assume E[N] ≤ 1, then the only root of h in [0,1] is 1, so since q ∈[0,1] and h(q) = 0 we have q = 1. This case corresponds to guaranteed extinction.Alternative, assume E[N]> 1, so that the population grows on average. Then h hasan additional root in [0,1], which we denote by x∗ < 1. Since q≥ 0 is also root ofh we obtain q≥ x∗. From the convexity of h it follows that h(x)≥ 0 for 0 < x≤ x∗and h(x)< 0 for x∗ < x < 1. Since qs is increasing qs−t ≤ qs, so that (2.12) yieldsqs =∞∑n=0P(n,1, t)qns−t(1− e−ds)≤∞∑n=0P(n,1, t)qns (1− e−ds) = G(1, t,qs),or, equivalently, h(qs)≥ 0. Therefore qs ≤ x∗ for all s≥ 0, and by continuity of qswe obtain q = lims→∞ qs ≤ x∗. Therefore q = x∗ is the indeed that smallest root of280 0.5 1x00.51h(x)x ∗ = 1qsh(qs )>0(a) The helper functionh(x) =G(1, t,x)−x has only a single rootx∗ = 1 in [0,1] if h′(1) = E[N]− 1 ≤ 0.In this case q = 1 and extinction isguaranteed.0 0.5 1x00.51h(x)x ∗qsh(qs )>0(b) The helper functionh(x) = G(1, t,x) − x has two rootsin [0,1] if h′(1) = E[N] − 1 > 0. Inthis case q < 1 and the population maysurvive indefinitely.Figure 2.3: Whether the population necessarily ultimately goes extinction de-pends on whether the average growth rate E[N] is larger that 1.h, as claimed. In summary, if the population grows on average we have q < 1, thatis, extinction is not guaranteed and the population may survive indefinitely.Taking the time-derivative on both sides of (2.13) we see that the probabilityof extinction corresponds to the steady states of the ODE (2.9) of the probabilitygenerating function. In our case this yields0 = bq2+d− (b+d)q ⇐⇒ q = 1 or q = d/b. (2.14)When the death rate is not exceeded by the birth rate, d/b≥ 1, we have q = 1 andextinction is guaranteed. Otherwise q = d/b < 1 and there is a positive probabilityof 1− d/b that the population survives indefinitely. Further note that, since eachindividuals act independently due to the branching property, the probability thata population of size n individuals goes extinct equals qn, the n-th power of theprobability that a population of a single individual goes extinct.The basic reproduction number R0 is defined as the expected number of de-scendants of a single individual. In the birth-death process each individual givesbirth at rate b over their expected life-span of 1/d, hence R0 = b/d. For a moresystematic derivation investigate the stability of the trivial steady state of the cor-29responding ODE. Here N˙ = (b−d)N, which has the trivial steady state N = 0 andis stable if and only if R0 = b/d < 1.2.9 Conditional on non-extinctionIn a stochastic process where the “extinct state” is absorbing there is always apositive probability that the population goes extinct, regardless of the basic repro-duction number R0. If R0 ≤ 1, however, the population almost surely goes extincteventually. In the example of HIV, most exposures do not lead to infection, thatis, the viral population goes extinct. However, extinction is not guaranteed andhence 1 < R0 = b/d and the average growth rate b−d is positive. However, herethe infection bias becomes critical: only cases where exposure did in fact lead toinfection are clinically observed! This means that we have to adjust our stochasticmodel to reflect this bias when we are fitting it to clinical data.In Gillespie simulations it is easy to bias the calculations accordingly – sim-ply disregard all realizations that went extinct eventually. The effect of modifyingR0 = b/d (and hence the likelihood of extinction q = d/b) while keeping the av-erage slope b− d constant and simultaneously conditioning on non-extinction ishighlighted in Figure 2.4, where we use Gillespie simulations with different pa-rameters to estimate the time until a fixed population size is reached.To better understand the effect of conditioning on non-extinction we derive amethod to calculate the mean of the conditioned process without having to fallback to extensive Gillespie simulations. We are interested in the probability thatthe population reaches size n at time t under the additional condition that it doesnot go extinct later:P(N(t) = n |N(∞) 6= 0,N(0) = n0).Note that N(∞) = 0 if and only if N(s) = 0 for some s ≥ 0 (the state space isdiscrete). Also note thtamer conditioning on an event that has probability zero isnot a valid operation. Hence, none of the calculations below make sense if R0 < 1and extinction is guaranteed.Since the event we condition on is in the future, but the Markov property worksfor events in the past, we use Bayes theorem P(A|B,C) = P(B|A,C)P(A|C)P(B|C) to rewrite300%25%50%75%100%5 10 15 20Days until population size is reachedPercentage of simulationsextinction likelyextinction unlikelyFigure 2.4: Distributions of the time until a population size of 375,000 isreached, obtained from Gillespie simulations of the birth-death processwith b− d = 0.9 day−1. Paths that did not reach the desired popula-tion size were discarded, that is, the processes are conditioned on non-extinction. Different death rates d = 9× 104 day−1 (red) and d = 23day−1 (blue) result in a different likelihood of extinction q = d/b. Thelarger the likelihood of extinction, the faster the conditioned processreaches the desired population size.the above asP(N(t) = n |N(∞) 6= 0,N(0) = n0)= P(N(t) = n |N(0) = n0)P(N(∞) 6= 0 |N(t) = n,N(0) = n0)P(N(∞) 6= 0 |N(0) = n0) .We recognize the first term as our original, unconditioned probability from earlier.For this we know how to calculate the probability generating function. The nu-merator can be simplified to P(N(∞) 6= 0|N(t) = n), due to the Markov propertyof P that history can be neglected if the present state is known, and then further toP(N(∞) 6= 0|N(0) = n), due to the time invariance of P that only the relative timedifference between the two events matters, not their absolute time. Finally, thecomplementary event that a population of size n does not go extinct is very easy to31calculate.P(N(∞) 6= 0 |N(0) = n) = 1−P(N(∞) = 0 |N(0) = n) = 1−qn,where qn and q are the probabilities that a population of size n and 1 go extinct,respectively. Plugging this into our equation above we obtainP(N(t) = n |N(∞) 6= 0,N(0) = n0) = P(N(t) = n |N(0) = n0) 1−qn1−qn0=11−qn0 (P(n,n0, t)−P(n,n0, t)qn)and therefore, the generating function G˜ of the process that is conditioned on notgoing extinct isG˜(n0, t,z) =∑n(11−qn0 (P(n,n0, t)−P(n,n0, t)qn))zn=11−qn0 ∑n(P(n,n0, t)zn−P(n,n0, t)(qz)n)=G(n0, t,z)−G(n0, t,qz)1−qn0 .Hence, we can directly obtain G˜ once we know G, the generating function of theunconditioned process. Finally, all we need to do to find the conditional probabilitydistribution P˜ is to replace G with G˜ in the integral equation (2.11) for P.2.10 Mean behaviour and cumulative probabilities forthe conditioned processIt is also possible to extend the calculations for the mean behaviour and cumulativeprobabilities to the process that is conditioned on non-extinction.2.10.1 Mean behaviourWe are interested in the mean behaviour of the birth-death process that is condi-tioned on not going extinct. A corresponding ODE is not obvious, so we let N˜ bethe random variable that counts the number of individuals in the birth-death pro-32cess conditioned on non-extinction. As before, we first use the analytical solutionof the probability generating function to obtainE[N˜] =∂ G˜(n0, t,z)∂ z∣∣∣∣z=1=11−qn0∂ (G(n0, t,z)−G(n0, t,qz))∂ z∣∣∣∣z=1=11−qn0(E[N]− ∂G(n0, t,qz))∂ z∣∣∣∣z=1)=11−qn0(E[N]−n0qn0e−(b−d)t)=n0(e(b−d)t −qn0e−(b−d)t)1−qn0 .Note that in the limit q→ 0, where non-extinction of the unconditioned processbecomes guaranteed, the means of the conditioned and unconditioned processescoincide, E[N˜]→ E[N] (q→ 0). Further note thatE[N˜]→ E[N]1−qn0 (t→ ∞),that is, the growth rates of the unconditioned and conditioned process eventuallyconverge. In Figure 2.5 we see that in cases where extinction is very likely a naiveextrapolation of the growth curve can lead to large error in the extrapolation ofthe time of exposure. This is because those paths that do not go extinct typicallywere able to initially grow much faster than average. Therefore, these paths do notneed as much time to reach the detection level as one might have estimated froman unconstrained model fit. In short: this infection bias leads to an earlier estimatefor the time of exposure, and hence to a shorter estimate of the length of the eclipsephase.As with the unconditioned process it is valuable to re-derive a ODE for E[N˜]that does not use the analytical solution of the probability generating function,so that the method can be extended to processes where an analytical solution isnot available. Starting with the equation for E[N˜] above we see that we need tocalculate f (t) = ∂G(n0,t,qz)∂ z∣∣∣z=1. The calculation is simplified if we first substitute x33−4 −2 0 2 4 6 8100101102103104105timepopulation size ObservableNot observablemean of unconditioned processmean of conditioned processnaive extrapolationFigure 2.5: Mean of the unconditional E[N] (in blue) and conditional E[N˜](in red) process, in the case where extinction is very likely, q ≈ 96%.We see a dramatic difference between the means, which can lead todrastically wrong estimates of the initial time of the process (e.g., timeof HIV exposure) when a naive fit (black line) is extrapolated to E[N˜] =1. Parameters: b = 23.9 day−1, d = 23 day−1, n0 = 1.= qz to obtainf (t) =∂G(n0, t,qz)∂ z∣∣∣∣z=1= q∂G(n0, t,x)∂x∣∣∣∣x=q.Next, we take the time derivative on both sides and use the PDE formulation (2.6).ddtf (t) = qddt∂∂xG(n0, t,x)∣∣∣∣x=q= q∂∂xddtG(n0, t,x)∣∣∣∣x=q= q∂∂x((bx2+d− (b+d)x) ∂∂xG(n0, t,x))∣∣∣∣x=q34= q (2bq− (b+d)) ∂∂xG(n0, t,x)∣∣∣∣x=q+q (bq2+d− (b+d)q) ∂2∂x2G(n0, t,x)∣∣∣∣x=q.Note that in the second summand we see the same term as on the right hand sideof the PDE (2.6), with z = q. Since the extinction probability q is such that theleft hand side ∂∂ t G(n0, t,q) = 0. Therefore the second summand evaluates to zero.Plugging in q = d/b we obtainddtf (t) =−(b−d) f (t), f (0) = ∂∂ zG(n0,0,qz)∣∣∣∣z=1=∂∂ z(qz)n0∣∣∣∣z=1= n0qn0 .The solution to this differential equation is f (t) = n0qn0e−(b−d)t , and matches theresult obtained from the analytical solution above.Note that we could also use Cauchy’s integral formula to evaluate the derivatef (t) = ∂G(n0,t,qz)∂ z∣∣∣z=1. Since extinction is not guaranteed we have q< 1 and thus qzis in the interior of the unit circle where G(n0, t, ·) is analytic. Hence, C can againbe the path along the boundary of the unit circle and we could calculate the partialderivative of G(n0, t,qz) with respect to z at z = 1 as∂G(n0, t,qz)∂ z∣∣∣∣z=1=∂G(n0, t,qz)∂ (qz)∂ (qz)∂ z∣∣∣∣z=1= q12pii∫CG(n0, t,w)(w−q)2 dw=q2pi∫ 2pi0G(n0, t,eiϕ)eiϕ(eiϕ −q)2 dϕ.2.10.2 Cumulative probabilitiesFinally, we might also be interested in calculatingP(N(t)< dL |N(∞) 6= 0, N(0) = n0),the probability that the population size is below the threshold dL, conditioned onnon-extinction of the population. This is straightforward when we use the proba-35bility generating function of the conditioned process:P(N(t)< dL |N(∞) 6= 0, N(0) = n0)=dL−1∑n=0P(N(t) = n |N(∞) 6= 0 , N(0) = n0)=dL−1∑n=01piRe(∫ pi0G˜(n0, t,eiϕ)e−inϕdϕ)=1piRe(∫ pi0G(n0, t,eiϕ)−G(n0, t,qeiϕ)1−qn01− e−idLϕ1− e−iϕ dϕ).2.11 The T ∗-V modelThe techniques developed in the sections above are not exclusive to the birth-deathprocess. Indeed, they can be extended to processes with more than one type, so-called multi-type branching processes. The steps required to obtain the correspond-ing results are very similar to the above, so instead of showing every detail wehighlight how the techniques are generalized. The model of this section is targetedtowards HIV infection and will as such consider HIV particles V and T-lymphocytesas target cells T . HIV infects target cells to turn them into virus-producing, produc-tively infected cells, which we denote with a superscript star.The T ∗-V model is one of the simplest multi-type branching processes thatdescribes the basic mechanism of HIV infection: Virions infect target cells at ratekT and are cleared at rate c, while infected target cells die at death rate δ andproduce virions with production rate p. The model can be summarized in ODEform asT˙ ∗ = kTV −δT ∗,V˙ = pT ∗− (c+ kT )V,(2.15)with T ∗(0) = n0 and V (0) = v0. We are particularly interested in models of earlyHIV infection, where the virus population size is relatively small and only a fewtarget cells are infected. Because of this our approximation of a constant pool ofuninfected target cells T is valid, and, unlike other classical HIV models, we do nothave to add a separate equation for T . This assumption implies that (2.15) is linear,36and so the underlying stochastic process is a branching process. Another contrastto classical HIV models is the additional −kTV term to explicitly account for theone virion lost when a new cell is infected. This is done because even a singlevirion matters when the total number of virions is small.For the branching process, let n be the number of infected cells, v be the totalnumber of virions, and n0, v0 be the initial conditions, respectively. We want tofind the probabilityP(n,v,n0,v0, t) = P((T ∗,V )(t) = (n,v) |(T ∗,V )(0) = (n0,v0)).2.11.1 The master equationsAs before we make the assumption that the process is stationary, and that the prob-abilities of all the possible events in a time span of length h are, to first order,proportional to their rate and the duration of h:P(n,v,n+1,v,h) = δ (n+1)h+o(h),P(n,v,n,v−1,h) = pnh+o(h),P(n,v,n−1,v+1,h) = kT (v+1)h+o(h),P(n,v,n,v+1,h) = c(v+1)h+o(h),while the probability of more than one event is taken to be o(h).From here we use the Chapman-Kolmogorov equations similarly to the birth-death model to calculateP(n,v,n0,v0, t+h) = P(n+1,v,n0,v0, t)P(n,v,n+1,v,h)+P(n,v−1,n0,v0, t)P(n,v,n,v−1,h)+P(n−1,v+1,n0,v0, t)P(n,v,n−1,v+1,h)+P(n,v+1,n0,v0, t)P(v,n,n,v+1,h)+P(n,v,n0,v0, t)P(n,v,n,v,h)+o(h)= δ (n+1)hP(n+1,v,n0,v0, t)+ pnhP(n,v−1,n0,v0, t)+ kT (v+1)hP(n−1,v+1,n,v, t)37+ c(v+1)hP(n,v+1,n0,v0, t)+(1−bh)P(n,v,n0,v0, t)+o(h),which leads to the forward master equation:ddtP(n,v,n0,v0, t) = δ ((n+1)P(n+1,v,n0,v0, t)−nP(n,v,n0,v0, t))+ p(nP(n,v−1,n0,v0, t)−nP(n,v,n0,v0, t))+ kT ((v+1)P(n−1,v+1,n0,v0, t)− vP(n,v,n0,v0, t))+ c((v+1)P(n,v+1,n0,v0, t)− vP(n,v,n0,v0, t)),P(n,v,n0,v0,0) = 1n,n01v,v0 .(2.16)Using the opposite time-step in the Chapman-Kolmogorov equations leads us toP(n,v,n0,v0, t+h) = P(n0−1,v0,n0,v0,h)P(n,v,n0−1,v0, t)+P(n0,v0+1,n0,v0,h)P(n,v,n0,v0+1, t)+P(n0+1,v0−1,n0,v0,h)P(n,v,n0+1,v0−1, t)+P(n0,v0−1,n0,v0,h)P(n,v,n0,v0−1, t)+P(n0,v0,n0,v0,h)P(n,v,n0,v0, t)+o(h)= δn0hP(n,v,n0−1,v0, t)+ pn0hP(n,v,n0,v0+1, t)+ kT v0hP(n,v,n0+1,v0−1, t)+ cv0hP(n,v,n0,v0, t)+(1−bh)P(n,v,n0,v0, t)+o(h),from which we obtain the backward master equation asddtP(n,v,n0,v0, t) = δn0(P(n,v,n0−1,v0, t)−P(n,v,n0,v0, t))+ pn0(P(n,v,n0,v0+1, t)−P(n,v,n0,v0, t))+ kT v0(P(n,v,n0+1,v0, t)−P(n,v,n0,v0, t))+ cv0(P(n,v,n0,v0−1, t)−P(n,v,n0,v0, t)),P(n,v,n0,v0,0) = 1n,n01v,v0 .(2.17)382.11.2 The probability generating functionThe probability generating function is now a function of two complex variablesinstead of one:G : N20× [0,∞)×D2→ D, (n0,v0, t,z1,z2) 7→∞∑n=0∞∑v=0P(n,v,n0,v0, t)zn1zv2.(2.18)As before, all the information about the branching process is obtainable from theprobability generating function.1. To calculate the marginal probability distributions, let T ∗n (t) be the probabil-ity of having n infected T-cells at time t, i.e. T ∗n (t) := ∑∞v=0 P(n,v,n0,v0, t).Then we obtainT ∗n (t) =1n!∂ nG(n0,v0, t,z1,1)∂ zn1∣∣∣∣z1=0.Similarly, letting Vv(t) be the probability of having v virus particles at timet, i.e. Vv(t) := ∑∞n=0 P(n,v,n0,v0, t), we obtain thatVv(t) =1v!∂ vG(n0,v0, t,1,z2)∂ zv2∣∣∣∣z2=0.2. In particular, the probability that all infected cells are extinct at time t isgiven by ∑∞v=0 P(0,v,n0,v0, t) = T ∗0 (t) =G(n0,v0, t,0,1), and the probabilityof the virus to be extinct at time t is given by ∑∞n=0 P(n,0,n0,v0, t) = V0(t)= G(n0,v0, t,1,0).3. The mean value of the number of infected cell and virus particles is calcu-lated asE[T ∗] =∞∑n=0nT ∗n (t) =∂G(n0,v0, t,z1,1)∂ z1∣∣∣∣z1=1,E[V ] =∞∑v=0vVv(t) =∂G(n0,v0, t,1,z2)∂ z2∣∣∣∣z2=1,39respectively.4. The variance and all higher moments are calculated analogously to a single-type branching process.Next, we derive the PDE and ODE formulation of the probability generatingfunction. As before, we start with the forward master equation (2.16), multiplyboth sides by zn1zv2 and sum over all n and v to find∞∑n=0∞∑v=0ddtP(n,v,n0,v0, t)zn1zv2 =∞∑n=0∞∑v=0zn1zv2[δ((n+1)P(n+1,v,n0,v0, t)−nP(n,v,n0,v0, t))+ p(nP(n,v−1,n0,v0, t)−np(n,v,n0,v0, t))+ kT((v+1)P(n−1,v+1,n0,v0, t)− vP(n,v,n0,v0, t))+ c((v+1)P(n,v+1,n0,v0, t)− vP(n,v,n0,v0, t))].We now rewrite this term-by-term, making use of the fact that the probability van-ishes whenever one of the species has a negative number of individuals.1. ∑∞n=0∑∞v=0 ddt P(n,v,n0,v0, t)zn1zv2 = ∂G/∂ t.2. δ ∑∞n=0∑∞v=0(n+1)P(n+1,v,n0,v0, t)zn1zv2= δ ∑∞n=0∑∞v=0 nP(n,v,n0,v0, t)zn−11 zv2 = δ (∂G/∂ z1).3. δ ∑∞n=0∑∞v=0 nP(n,v,n0,v0, t)zn1zv2 = δ z1(∂G/∂ z1).4. p∑∞n=0∑∞v=0 nP(n,v−1,n0,v0, t)zn1zv2 = pz2∑∞n=0∑∞v=0 nP(n,v,n0,v0, t)zn1zv2= pz1z2(∂G/∂ z1).5. p∑∞n=0∑∞v=0 nP(n,v,n0,v0, t)zn1zv2 = pz1(∂G/∂ z1).6. kT ∑∞n=0∑∞v=0(v+1)P(n−1,v+1,n0,v0, t)zn1zv2= kT ∑∞n=0∑∞v=0 vP(n,v,n0,v0, t)zn+11 zv−12 = kTλ z1(∂G/∂ z2).7. kT ∑∞n=0∑∞v=0 vP(n,v,n0,v0, t)zn1zv2 = kT z2(∂G/∂ z2).408. c∑∞n=0∑∞v=0(v+1)P(n,v+1,n0,v0, t)zn1zv2= c∑∞n=0∑∞v=0 vP(n,v,n0,v0, t)zn1zv−12 = c(∂G/∂ z2).9. c∑∞n=0∑∞v=0 vP(n,v,n0,v0, t)zn1zv2 = cz2(∂G/∂ z2).We thus arrive at the following PDE for the probability generating function of theT ∗-V model:∂G(n0,v0, t,z1,z2)∂ t= [δ (1− z1)+ pz1(z2−1)] ∂G(n0,v0, t,z1,z2)∂ z1+[kT (z1− z2)+ c(1− z2)] ∂G(n0,v0, t,z1,z2)∂ z2 ,G(n0,v0,0,z1,z2) = zn01 zv02 .(2.19)Multiplying both sides of the backward master equation (2.17) with zn1zv2 andsumming over all n and v we find∂G(n0,v0, t,z1,z2)∂ t= δn0(G(n0−1,v0, t,z1,z2)−G(n0,v0, t,z1,z2))+ pn0(G(n0,v0+1, t,z1,z2)−G(n0,v0, t,z1,z2))+ kT v0(G(n0+1,v0−1, t,z1,z2)−G(n0,v0, t,z1,z2))+ cv0(G(n0,v0−1, t,z1,z2)−G(n0,v0, t,z1,z2)),G(n0,v0,0,z1,z2) = zn01 zv02 .(2.20)The branching property in the case of this multi-type process isG(n0,v0, t,z1,z2) = (G(1,0, t,z1,z2)n0)(G(0,1, t,z1,z2)v0) .We will abbreviate G1(t) := G(1,0, t,z1,z2) and G2(t) := G(0,1, t,z1,z2). Usingthe branching property we can reduce the system of infinitely many ODES (2.20)41to the following two-dimensional system of ODES∂G1(t)∂ t= δ (1−G1(t))+ p(G1(t)G2(t)−G1(t)),∂G2(t)∂ t= kT (G1(t)−G2(t))+ c(1−G2(t)),G1(0) = z1,G2(0) = z2.(2.21)To obtain the marginal probability distributions, e.g., of the number of virusparticles Vv(t) we use the very same steps as in the single-type process, namelyCauchy’s integral formula with simple positively oriented closed circle with radiusone around the origin, and the substitution α = 2pi−θ , to findVv(t) =1piRe(∫ pi0G(n0,v0, t,1,eiθ )e−ivθ dθ). (2.22)2.11.3 Calculating joint probabilitySo far we have restricted ourselves to marginal probabilities. This is not required,we can also calculate joint probabilities. Using the definition of the probabilitygenerating function,P(n,v,n0,v0, t) =1v!∂ v∂ zv2(1n!∂ n∂ zn1G(n0,v0, t,z1,z2)∣∣∣∣z1=0)∣∣∣∣∣z2=0=1v!∂ v∂ zv2(12pii∫CG(n0,v0, t,z1,z2)zn+11dz1)∣∣∣∣∣z2=0=12piv!∂ v∂ zv2(∫ 2pi0G(n0,v0, t,eiϕ ,z2)e−inϕdϕ)∣∣∣∣z2=0=1(2pi)2i∫C∫ 2pi0 G(n0,v0, t,eiϕ ,z2)e−inϕdϕzv+12dz2=1(2pi)2∫ 2pi0∫ 2pi0G(n0,v0, t,eiϕ ,eiψ)e−inϕe−ivψdϕdψ.42We can simplify this to reduce the interval we need to integrate over. The price isthat there will be two slightly different integrands. To begin with, writeP(n,v,n0,v0, t) =1(2pi)2∫ 2pi0∫ 2pi0G(n0,v0, t,eiϕ ,eiψ)e−inϕe−ivψdϕdψ=1(2pi)2(∫ pi0∫ pi0f dϕdψ︸ ︷︷ ︸=A+∫ 2pipi∫ pi0f dϕdψ︸ ︷︷ ︸=B+∫ pi0∫ 2pipif dϕdψ︸ ︷︷ ︸=C+∫ 2pipi∫ 2pipif dϕdψ︸ ︷︷ ︸=D).Substituting we find that D = A and C = B, the complex conjugate. Indeed, startingwith D we substitute ϕ ′ = 2pi−ϕ and ψ ′ = 2pi−ψ . ThenD =∫ 0pi∫ 0piG(n0,v0, t,e−iϕ′,e−iψ′)einϕ′eivψ′(−dϕ ′)(−dψ ′)=∫ pi0∫ pi0G(n0,v0, t,eiϕ′,eiψ ′)e−inϕ ′e−ivψ ′dϕ ′dψ ′= A,where we use the fact that P(n,v,n0,v0, t) is real and henceG(n0,v0, t,z1,z2) =∑n∑vP(n,v,n0,v0, t)zn1zv2=∑n∑vP(n,v,n0,v0, t)zn1zv2= G(n0,v0, t,z1,z2).Accordingly one can show that C = B, sinceG(n0,v0, t,z1,z2) =∑n∑vP(n,v,n0,v0, t)zn1zv2=∑n∑vP(n,v,n0,v0, t)zn1zv2= G(n0,v0, t,z1,z2).43Consolidating these results we find thatP(n,v,n0,v0, t) =1(2pi)2(A+A+B+B) =12(pi)2Re(A+B).Finally, substituting φ ′ = 2pi−ψ in B we obtain that the joint probability is givenbyP(n,v,n0,v0, t) =12pi2Re[∫ pi0∫ pi0{G(n0,v0, t,eiϕ ,eiψ)e−inϕe−ivψ+G(n0,v0, t,eiϕ ,e−iψ)e−inϕeivψdϕdψ}].(2.23)2.11.4 Mean behaviour of the stochastic processIn order to calculate the mean number of virions we recallE[V ] =∑vvP(V = v) =∑vv(∑nP(n,v,n0,v0, t))=∂G(n0,v0, t,z1,z2)∂ z2∣∣∣∣(z1,z2)=(1,1).We will derive an ODE for ∂G(n0,v0,t,z1,z2)∂ z2 . For this, we take a time-derivative of theexpression, use the PDE formulation (2.19) and then swap the partial derivatives, tofind∂∂ t∂G(n0,v0, t,z1,z2)∂ z2=∂∂ z2∂G(n0,v0, t,z1,z2)∂ t=∂∂ z2[(δ (1− z1)+ pz1(z2−1)) ∂∂ z1 G+(kT (z1− z2)+ c(1− z2)) ∂∂ z2 G]= pz1∂G∂ z1+(δ (1− z1)+ pz1(z2−1)) ∂2G∂ z2z1− (c+ kT )∂G∂ z2+(kT (z1− z2)+ c(1− z2))∂2G∂ z22.44Evaluating at (z1,z2) = (1,1) we obtain∂∂ t∂G(n0,v0, t,z1,z2)∂ z2∣∣∣∣(z1,z2)=(1,1)= p∂G(n0,v0, t,z1,z2)∂ z1∣∣∣∣(z1,z2)=(1,1)− (c+ kT ) ∂G(n0,v0, t,z1,z2)∂ z2∣∣∣∣(z1,z2)=(1,1),and similarly∂∂ t∂G(n0,v0, t,z1,z2)∂ z1∣∣∣∣(z1,z2)=(1,1)= kT∂G(n0,v0, t,z1,z2)∂ z1∣∣∣∣(z1,z2)=(1,1)−δ ∂G(n0,v0, t,z1,z2)∂ z2∣∣∣∣(z1,z2)=(1,1).Hence, the time-dependent functions f1(t) =∂G(n0,v0,t,z1,z2)∂ z1∣∣∣(z1,z2)=(1,1)and f2(t) =∂G(n0,v0,t,z1,z2)∂ z2∣∣∣(z1,z2)=(1,1), which is what we want to calculate, indeed satisfy thesame ODE (2.15) that we started with:f˙1 = kT f2−δ f1,f˙2 = p f1− (c+ kT ) f2,(2.24)with initial conditions f1(0) =∑n∑v nP(n,v,n0,v0,0) = n0 and f2(0) = v0. Solvingthis ODE gives f2(t) = E[V (t)].2.11.5 Extinction probability, R0 and rWe obtain the probability of extinction by finding the steady states of (2.21), whichareq1 = 1, q2 = 1, or q1 =δpc+ kTkT, q2 =δp+cc+ kT.The interpretation is that q1 is the probability that the process goes extinct if startedwith a single cell, while q2 is the probability that the process goes extinct if startedwith a single virion.The basic reproduction number R0 for this model is the expected number of45new infected cells that are descendants of a single infected cell. Since virionsinfect target cells at rate kT and have an average life-span on 1/(c+ kT ), whiletarget cells produce virions at rate p over their average life span 1/δ we obtainR0 =pkTδ (c+ kT ). (2.25)Alternatively, R0 can be obtained by finding the criterion for the trivial steady stateof the original linear ODE to be stable, which leads to the same result.Further, we get the initial growth rate r as the largest real part of the eigenvaluesof the matrix given by[T˙ ∗V˙]=[−δ kTp −c− kT][T ∗V]with characteristic polynomialλ 2+(δ + c+ kT )λ +δ (c+ kT )− pkT.For R0 > 1 this polynomial has a negative and a positive root, hence the initialgrowth rate is given byr =12[−δ − c− kT +√(δ − c− kT )2+4pkT]. (2.26)2.11.6 Conditioning on non-extinctionWe calculate the probability of observing a viral load of V (t) = v, conditioned onthe process not going extinct. First, calculate the probability of the state (T ∗,V )(t)= (n,v), then sum over all n later. We abbreviate T ∗Vt for (T ∗,V )(t) and the initialconditions T ∗V0 = (n0,v0) with IC. Using Bayes’ ruleP(T ∗Vt = (n,v) |T ∗V∞ 6= 0, IC)= P(T ∗Vt = (n,v) | IC)P(T∗V∞ 6= 0 |T ∗Vt = (n,v), IC)P(T ∗V∞ 6= 0 | IC)46= P(T ∗Vt = (n,v) | IC)1−P(T∗V∞ = 0 |T ∗Vt = (n,v))1−P(T ∗V∞ = 0 | IC)= P(T ∗Vt = (n,v) | IC)1− (q1)n(q2)v1−qn01 qv02.Now, we multiply with zn1zv2 and sum over all n, v to obtain the probability generat-ing function G˜ of the conditioned process,G˜(n0,v0, t,z1,z2) :=∑n∑v(P(T ∗Vt = (n,v) | IC)1− (q1)n(q2)v1−qn01 qv02)zn1zv2=11−qn01 qv02(∑n∑vP(T ∗Vt = (n,v) | IC)zn1zv2−∑n∑vP(T ∗Vt = (n,v) | IC)(q1z1)n(q2z2)v)=G(n0,v0, t,z1,z2)−G(n0,v0, t,q1z1,q2z2)1−qn01 qv02.As in the non-conditioned process, setting z1 = 1 gives the probability generatingfunction of the marginal probability distribution for the number of virions, i.e.G˜(n0,v0, t,1,z2) =G(n0,v0, t,1,z2)−G(n0,v0, t,q1,q2z2)1−qn01 qv02=∑n∑vP(T ∗Vt = (n,v) |T ∗V∞ 6= 0, IC)zv2,so that, as before,∑nP(T ∗Vt = (n,v) |T ∗V∞ 6= 0, IC)=11−qn01 qv021v!∂ v (G(n0,v0, t,1,z2)−G(n0,v0, t,q1,q2z2))∂ zv2∣∣∣∣z2=0=11−qn01 qv021v!(v!2pii∫CG(n0,v0, t,1,z2)−G(n0,v0, t,q1,q2z2)zv+12dz2)=11−qn01 qv0212pi∫ 2pi0(G(n0,v0, t,1,eiϕ)−G(n0,v0, t,q1,q2eiϕ))e−ivϕdϕ=12pi∫ 2pi0G˜(n0,v0, t,1,eiϕ)e−ivϕ dϕ47=1piRe(∫ pi0G˜(n0,v0, t,1,eiϕ)e−ivϕ dϕ).We used the same steps as for the one-state model, and in particular the fact thatG(n0,v0, t,z1,z2) = G(n0,v0, t,z1,z2).2.11.7 Mean behaviour and cumulative probabilities for theconditioned T ∗-V modelNow on to the mean of the conditioned process. Let V˜ be the random variable ofthe number of virus particles of the conditioned process.E[V˜ (t)] =∑vvP(V˜ = v) =∑vv(∑nP(T ∗Vt = (n,v) |T ∗V∞ 6= 0, IC))=∑n∑vP(T ∗Vt = (n,v) |T ∗V∞ 6= 0, IC)1nv1v−1=∂ G˜(n0,v0, t,z1,z2)∂ z2∣∣∣∣(z1,z2)=(1,1)=11−qn01 qv02[∂G(n0,v0, t,z1,z2)∂ z2∣∣∣∣(z1,z2)=(1,1)− ∂G(n0,v0, t,q1z1,q2z2)∂ z2∣∣∣∣(z1,z2)=(1,1)].We recognize the former term as the mean of the unconditioned process, whichwe can calculate by solving the ODE (2.15). For the second term we have twopossibilities.Integral formulationWe use q1 < 1, q2 < 1 so that the point we evaluate the probability generatingfunction inside the unit circle, where G is analytic.∂G(n0,v0, t,q1z1,q2z2)∂ z2∣∣∣∣(z1,z2)=(1,1)=∂G(n0,v0, t,q1,q2z2)∂q2z2∂ (q2z2)∂ z2∣∣∣∣q2z2=q2= q212pii∫CG(n0,v0, t,q1,w)(w−q2)2 dw48=q22pi∫ 2pi0G(n0,v0, t,q1,eiϕ)eiϕ(eiϕ −q2)2 dϕ.ODE formulationAs in the unconditioned process, we can derive an ODE formulation for g1(t) =∂G(n0,v0,t,q1z1,q2z2)∂ z1∣∣∣(z1,z2)=(1,1)and g2(t) =∂G(n0,v0,t,q1z1,q2z2)∂ z2∣∣∣(z1,z2)=(1,1)by using theforward PDE (2.19) for G(n0,v0, t,x1,x2). Note thatg1(t) =∂G(n0,v0, t,q1z1,q2z2)∂ z1∣∣∣∣(z1,z2)=(1,1)=∂ (q1z1)∂ z1∂G(n0,v0, t,q1z1,q2z2)∂ (q1z1)∣∣∣∣(q1z1,q2z2)=(q1,q2)= q1∂G(n0,v0, t,x1,x2)∂x1∣∣∣∣(x1,x2)=(q1,q2)g2(t) = q2∂G(n0,v0, t,x1,x2)∂x2∣∣∣∣(x1,x2)=(q1,q2).Taking the time derivative of the above yieldsg˙1(t) = q1∂∂ t∂G(n0,v0, t,x1,x2)∂x1∣∣∣∣(x1,x2)=(q1,q2)= q1∂∂x1[(δ (1− x1)+ px1(x2−1))∂G(n0,v0, t,x1,x2)∂x1+(kT (x1− x2)+ c(1− x2))∂G(n0,v0, t,x1,x2)∂x2]∣∣∣∣∣(x1,x2)=(q1,q2)= q1[(−δ + p(x2−1))∂G(n0,v0, t,x1,x2)∂x1 +0+ kT∂G(n0,v0, t,x1,x2)∂x2+0]∣∣∣∣∣(x1,x2)=(q1,q2)= (p(q2−1)−δ )g1(t)+ kT q1q2 g2(t)= kTq1q2g2(t)− (δ − p(q2−1))g1(t)49g˙2(t) = q2∂∂ t∂G(n0,v0, t,x1,x2)∂x2∣∣∣∣(x1,x2)=(q1,q2)= q2∂∂x2[(δ (1− x1)+ px1(x2−1))∂G(n0,v0, t,x1,x2)∂x1+(kT (x1− x2)+ c(1− x2))∂G(n0,v0, t,x1,x2)∂x2]∣∣∣∣∣(x1,x2)=(q1,q2)= q2[px1∂G(n0,v0, t,x1,x2)∂x1+0− (kT + c)∂G(n0,v0, t,x1,x2)∂x2+0]∣∣∣∣∣(x1,x2)=(q1,q2)= pq2g1(t)− (c+ kT )g2(t).The second-order partial derivatives vanish because the factor multiplying themsimplifies to zero because q1 and q2 are such that ∂∂ t G(n0,v0, t,q1,q2) = 0. Next,let’s calculate the initial condition.g1(0) = q1∂G(n0,v0,0,x1,x2)∂x1∣∣∣∣(x1,x2)=(q1,q2)= q1∂∂x1∑n ∑vP(n,v,n0,v0,0)xn1xv2∣∣∣∣(x1,x2)=(q1,q2)= q1∂∂x1∑n ∑v1(n,v),(n0,v0)xn1xv2∣∣∣∣(x1,x2)=(q1,q2)= q1∂∂x1xn01 xv02∣∣∣∣(x1,x2)=(q1,q2)= q1n0(q1)n0−1qv02 = n0qn01 qv02 ,and correspondingly,g2(0) = q2∂G(n0,v0,0,x1,x2)∂x2∣∣∣∣(x1,x2)=(q1,q2)= q2∂∂x2∑n ∑vP(n,v,n0,v0,0)xn1xv2∣∣∣∣(x1,x2)=(q1,q2)50= q2∂∂x2∑n ∑v1(n,v),(n0,v0)xn1xv2∣∣∣∣(x1,x2)=(q1,q2)= q2∂∂x2xn01 xv02∣∣∣∣(x1,x2)=(q1,q2)= q2v0qn01 (q2)v0−1 = v0qn01 qv02 .Hence in summary, in order to get E[V˜ (t)] we have to first find f2(t) by solving(2.24), then we calculate g2(t) by solving the ODEg˙1(t) = kTq1q2g2(t)− (δ − p(q2−1))g1(t), g1(0) = n0qn01 qv02 ,g˙2(t) = pq2g1(t)− (c+ kT )g2(t), g2(0) = v0qn01 qv02 ,(2.27)(note: δ − p(q2−1) = δ/q1) and plug the results in the equationsE[V˜ (t)] =f2(t)−g2(t)1−qn01 qv02.Since this ODE is linear it is possible to derive an analytical expression for E[V˜ (t)].Finally, note that in the limit q1→ 1, q2→ 1 where extinction becomes a certainty,the ODES (2.15) and (2.27) coincide.The equations for the cumulative probabilities are exactly the same as in thebirth-death process, with the probability generating function corresponding to theconditioned or unconditioned T ∗-V model, respectively.2.12 The T ∗-V -W model with infectious andnon-infectious virionsThe process by which infected cells produce new HIV virions is very error-prone.Indeed, only a fraction Q of virions produced are infectious, where Q is estimatedto be on the order of Q≈ 10−2−10−4 [63, 75, 96]. Non-infectious virions, denotedas W , are not able to infect new target cells and hence are harmless, and since afree virion has a very high clearance rate the non-infectious virus compartment isoften ignored or modelled by adjusting the virus production rate p. However, thepresence of non-infectious virions is recorded in HIV RNA tests, which are unable51to evaluate the functionality of the virus in the assay. The model can be written inODE form asT˙ ∗ = kTV −δT ∗,V˙ = pQT ∗− (c+ kT )V,W˙ = p(1−Q)T ∗− cW,(2.28)with T ∗(0) = n0, V (0) = v0, and W (0) = w0.Due to the uncertainty about the parameters Q and p we decided to not includea non-infectious virus compartment in our models in Chapter 3. Nevertheless, theT ∗-V -W model is worth investigating because it offers new challenges on how tocalculate statistics about the total number of virions V +W ,P(n,v,w,n0,v0,w0, t) = P((T ∗,V,W )(t) = (n,v,w) |(T ∗,V,W )(0) = (n0,v0,w0)).Most of the other mathematical derivations for the T ∗-V -W model are similar tothe T -V model and all details and results are shown in Appendix A.2.13 The T ∗1 -T∗2 -V modelWhen an HIV virion enters a target cell several integration and replication stepsneed to happen before this newly infected cell starts to produce virus particles.This intra-cellular delay is featured in another variant of the classic virus dynamicsmodel, the T ∗1 -T∗2 -V model. Here T∗1 -cells do not yet actively produce new virionswhile T ∗2 -cells do. Hence this model introduces a single new parameter, the lengthof the intra-cellular time delay 1/s and can be written in ODE form asT˙ ∗1 = kTV − sT ∗1 ,T˙ ∗2 = sT∗1 −δT ∗2V˙ = pT ∗2 − (c+ kT )V,with T ∗1 (0) = m0, T∗2 (0) = n0, and V (0) = v0. In this variant each cell that gets in-fected will also eventually become productive, which is a justified approximationbecause a cell’s lifespan is much larger than the intra-cellular delay. The T ∗1 -T∗2 -V model is our model of choice for calculating the length of the eclipse phase in52Chapter 3, because it includes key features of the timing of how the virus popu-lation grows or goes extinct, while keeping a small number of parameters. Themathematical derivations for this model are similar to the other models discussedin this chapter so far, and the results are shown in Chapter 3.2.14 Conclusion and future workIn this chapter we studied single- and multiple-type continuous-time Markov chainbranching processes and derived results for several HIV models. Gillespie’s algo-rithm is a simple and widely-used stochastic simulation algorithm to analyze thesetype of processes. While being straightforward to implement, it is also computa-tionally expensive, especially when analyzing rare events, very fast reaction times,and potentially large populations. Here we derive semi-analytical approaches asalternatives to these extensive computer simulations, and apply them to severalHIV models. The mathematical background for our derivations have mostly beenknown to the statistic, stochastic and numerical community, and fragments can befound in many textbooks. However, we are the first to systematically consolidatethis knowledge so that it can readily be applied to models of latent and early HIVinfection, and more. We have also identified and briefly analyzed the infection bias.This is a critical effect that needs to be considered when estimating the exposuretime, especially when infection is unlikely yet the only available data is from caseswhere infection did occur.We believe that insights from our analysis of the infection bias could also beuseful when estimating the time of the outbreak of epidemics: Only diseases thatinfect a certain number of people can be observed. If such a diseases had a largeprobability of going extinct early, but was in fact able to spread, our analysis maybe susceptible to the infection bias. In particular, a naive back-extrapolation toestimate the time when the outbreak started from observed incidence would predicta date too far in the past if the infection bias is ignored. We are not aware of a studythat has taken this effect in account.Finally, we reiterate that the techniques presented here only work under thebranching assumption that each lineage acts independently. While Gillespie’s al-gorithm can still be used, the methods developed here will not be applicable oth-53erwise. Having said that, our techniques can be generalized in other ways, forexample constant reaction rates can be replaced by time-dependent reaction rates,see [22].54Chapter 3On the duration of the periodbetween exposure to HIV anddetectable infectionThe content of this chapter and the corresponding Appendix B stem from a collab-oration with the British Columbia Centre for Disease Control. I am the lead authorof this joint work with Darlene Taylor, Jessica Conway, Gina Ogilvie and DanielCoombs.Abstract: HIV infection cannot be detected immediately after exposure becauseplasma viral loads are too small initially. The duration of this phase of infection(the “eclipse period”) is difficult to estimate because precise dates of exposure arerarely known. Therefore, the reliability of clinical HIV testing during the first fewweeks of infections is unknown, creating anxiety among HIV-exposed individualsand their physicians. We address this by fitting stochastic models of early HIV in-fection to detailed viral load records for 78 plasma donors, taken during the periodof exposure and infection. We first show that the classic birth-death model doesnot satisfactorily describe early infection. We therefore apply a stochastic modelthat includes infected cells and virions separately. Since every plasma donor inour data eventually becomes infected, we must condition the model to reflect thisbias, before fitting to the data. Applying our best estimates of unknown parameter55values, we estimate the mean eclipse period to be 8-10 days. We further estimatethe reliability of a negative test t days after potential exposure. These results canbe used to inform patients and provide a baseline for understanding the value andtiming of initial and follow-up testing.3.1 Motivation and backgroundRapid and reliable diagnosis of HIV infection is an important factor in optimizingpatient care after possible exposure to the virus. However, diagnosis during thefirst few weeks after exposure is challenging because initially the virus is presentat only very low levels – the inoculumn size is difficult to estimate but certainlyseveral orders of magnitude lower than the detection limit – and immune responsestake time to develop to a detectable level [1, 8, 41, 61, 62, 71].The length of time between exposure and reliable detection of infection (alsocalled the eclipse period or window period) depends on the virus population dy-namics and the laboratory test that is applied. Clinically available HIV testing tech-nologies detect viral RNA, p24 antigen (a viral protein that makes up most of theviral core), HIV antibodies (ELISA) and antibody/antigen in combination (WesternBlot), and are known to have different window periods.The relative times at which tests become positive were estimated by Fiebig etal. in a definitive 2003 paper [32], see Figure 3.1. In that work, Fiebig stage I isdefined as the time period when only a clinical viral RNA test (with a thresholdof 50 copies/ml of viral RNA) is positive. In Fiebig stage II a p24 antigen testwould also be positive, and in Fiebig stage III sensitive HIV antibody tests are alsopositive. The individual durations of these first three Fiebig stages were estimatedto be 5.0, 5.3, and 3.2 days, respectively. However, systematic estimates of thelength of time between risky exposure and a viral RNA test becoming positiveare still lacking [32, 103]. The length of the eclipse period is difficult to estimatebecause HIV transmission is rare [108] and precise exposure dates are usually notknown. Typically the eclipse period is estimated to last for around 10-14 days: forinstance the WHO has recently suggested that “the window period [for the mostsensitive HIV antibody tests] is about three weeks” [113]. This implies an estimateof around 11 days for the length of the eclipse period, because according to Fiebig560 10 20 30 40 50 60 70 80 90 100Days since exposure101102103104105106107HIV RNA (cp/ml)vRNA +p24Ag +ELISA +Western blot +/-Western blot + (p31-)Western blot + (p31+)EclipseperiodFiebig stagesI II III IV V VIdetection limitFigure 3.1: Schematics of typical dynamics of plasma virus RNA in a re-cently infected patient, and approximate time points when different HIVtests become positive, i.e. can detect infection. vRNA looks for virionsdirectly, p24Ag looks for the p24 antigen, a viral protein. ELISA testsfor antibodies, and Western blot combines several of the above. The dy-namics below the detection limit are unknown, the unobserved growthrate could be smaller, the same, or larger than the observed growth rate,as indicated by the dashed lines. Modified from [32].et al. a sensitive antibody test becomes positive about 10 days after an RNA testdoes [32].Extrapolating results from animal models of infection, such as the rhesus ma-caque, must be done cautiously. Infection after a single sexual or occupationalexposures in humans is highly unlikely (estimated at 4 per 10,000 events for penile-vaginal intercourse and 138 per 10,000 events for receptive anal intercourse) [69,85], but high-dose simian immunodeficiency viruses (SIV) challenges (up to 103– 105 more than the median required infective does) are commonly used to obtaininfection, see e.g. [5, 81]. Even though mortality, the humoral immune responseand the peak plasma viral load do not seem to differ in animals between high- andlow-dose challenges, the timing of detectable infection may vary [76]. Further-57more, if a series of low-dose challenges are made, it can be difficult to know whichchallenge eventually led to the sustained infection [62, 92].As a consequence, a knowledge gap concerning the overall lengths of the win-dow periods for different tests remains. This lack of knowledge leads to consider-able uncertainty and anxiety for patients and clinicians alike [54, 57, 70, 82, 116,117]. The specificity (true negative rate) of an HIV test taken within the eclipsephase is also unknown, and hence it is unclear when to schedule further tests tobalance the competing goals of early detection and reliable exclusion of infection.In this work we extract time series of HIV RNA test results from seroconversionpanels (a group of serial bleeds from an individual during early infection when thefirst antibody response is mounted) and seek to quantify the length of the eclipseperiod and the false negative rate of an HIV test as a function of time since ex-posure. From this data we first obtain the empirical maximal initial viral growthrate, similar to [93]. Then we explore and select stochastic models of virus dynam-ics from exposure to detectability of infection via RNA testing, by comparing fitsto parameter ranges from the literature. Our data is intrinsically biased in that itonly includes measurements from plasma donors that were eventually confirmedas infected. We therefore derive corrections to the basic models in order to adjustfor this bias. The best model is then used to calculate, within the confines of ourassumptions, the most likely time of exposure, and hence the length of the eclipseperiod. Finally, we quantify the specificity of an HIV RNA test as a function oftime since exposure and put forward recommendations for the timing of follow-uptests.Throughout this work we focus on commonly used tests that measure viralRNA, with 50 RNA copies per milliliter of plasma as the lower limit of detection,and we also assume that no antiretroviral treatment has been used shortly before orafter the exposure and time of testing.3.2 Extracting the maximal viral growth rates fromseroconversion dataIn order to answer our research questions on the early viral dynamics of HIV in-fection we use data from seroconversion panels that have been used and described58by others, in [93] (51 panels, no duplicates), and ourselves, in [103] (427 panels,including duplicates that are repeated in several tables). Seroconversion panelsprovide the earliest possible viral load measurements in newly HIV infected indi-viduals. This data was obtained from regular plasma donors (plasma donations onaverage every five days) in the late 1990’s and early 2000’s, before RNA tests wereroutinely available. Plasma from regular donors is typically stored for several daysbefore it is used to allow for screening and removal if any disease is discovered inthe donor later. In our dataset each seroconversion panel contains the results of 2to 26 HIV RNA tests on distinct days from a minimum of 4 to a maximum of 194days since the first plasma sample was obtained from the plasma donor. Becausethe data was taken before sensitive HIV RNA tests were available, it was, mostlikely, an HIV antibody test that became positive in each of our plasma donor’s lastsample, which implied that all previously stored plasma donations from this newlyinfected individual were removed from circulation and frozen for future use in re-search. These frozen plasma samples are very rare and extremely valuable, andare for example used to benchmark the sensitivity of new HIV tests. All plasmasamples in our dataset were later tested with new HIV RNA tests, similar to thosecommonly used to detect new infection in HIV clinics today. These new tests candetect and quantify the virus in the donor’s plasma in samples where infectioncould not be detected by the less advanced HIV tests at the time of donation. Fourtypical examples of the seroconversion time series are shown in Figure 3.2.After carefully cleaning the data to remove and combine duplicate time se-ries, see Appendix B, we obtained, for each distinct time series, the maximal viralgrowth rate as the maximum slope between any two data points during the ramp-up phase, defined here as all time points before either the viral load drops by morethan 75%, or the dataset ends. We also classify each dataset into one of the two cat-egories: Class A are those datasets where the maximum slope is measured betweentwo definite measurements, that is, measurements that are not below the detectionlimit (50 copies of RNA per milliliter of plasma) or above the maximum detectable(varying with the test). Datasets where the maximum slope involved a data pointthat was below the detection limit or above the detection limit were classified asclass B. For this class, the actual maximal rate of increase may therefore be greaterthan what we inferred. To see if this potential underestimate is significant we com-59Figure 3.2: Examples of plasma virus RNA of recently infected patients,from the seroconversion panels obtained in [93] and [103]. Values be-low the detection limit of 50 copies/ml are reported as 50 copies/ml.The exposure dates for these patients are unknown and is to be estimatedfrom the characteristic initial exponential growth rate and mathematicalmodels in this work.pared this set of 27 maximal rates of increase with the remaining 51 maximal rates(Figure 3.3), and found no statistical difference (p = 0.25 with Student’s t-test).Based on this result we chose to treat all 78 slopes the same way for the remainderof this study. See Appendix B for the list of all time series and their classification.Now that we have extracted the maximal viral growth rate for each of the suit-able seroconversion panels we will carefully choose the most suitable mathemati-cal model to obtain estimates for the length of the eclipse phase from these growthrates.60llllllllll l lllllllll lllllllllllllllllllllllllllllllllllllllllllllllll llllMean: 1.05 Mean: 0.99p = 0.250123A (n=51) B (n=27)maximal viral increase (log(RNA cp/ml)/day)Figure 3.3: Maximal observed rate of increase of viral RNA concentra-tion, as calculated for 51 class A seroconversion panels (mean: 1.05log(RNA copies)/ml/day) and 27 class B panels (mean: 0.99 log(RNAcopies)/ml/day). The difference between the two categories is not sig-nificant. If the outlier in group B is removed, the difference is borderlinesignificant (p = 0.048).3.3 The simple birth-death modelIn the previous section we extracted the maximal initial growth rate of the viruspopulation after it reaches a detectable level. This is the foundation of quantitativeresearch into early HIV infection, and has been done by others before [93], albeitwith only a subset of our data. The novel part of this chapter is how carefullyselected mathematical models turn these observations into estimates of the lengthof the eclipse phase, and the clinical consequences of these estimates.The within-host events leading to infection after HIV exposure are not fullyknown. Hence, instead of building a mathematical model with many unknownparameters which covers all possible scenarios in detail, we use the opposite ap-proach and aim for the simplest model, with a minimal number of parameters, that61V dbpδkTs1 2*TV*Tca. b.Figure 3.4: Model schematics. a. Minimal stochastic birth-death model.Virions reproduce at rate b and cleared at rate d. b. Preferred three-state model. Virions infect cells at rate kT and are cleared at rate c.At rate s infected cells become productively infected, producing newvirions at rate p and dying at rate δ .explains the observed data and fits our limited knowledge of early HIV infection.The minimal requirement for a reasonable model of early HIV infection is thatthe model exhibits exponential growth that fits the innate growth rate of viral in-crease observed in the HIV RNA data. We also argue that the model has to ex-hibit a reasonable per-exposure probability of infection, in the range of 0.1%-5%[40, 85, 110], and allow for multiple founder strains, as observed in 19%-60% ofcases, depending on the type of exposure [1, 8, 41, 61, 62, 71]. Estimating the sizeof the inoculum is extremely challenging, and it potentially depends heavily on the(unknown) type of exposure and the (unknown) viral load of the donor. In vitroexperiments [85] suggest that 10-15,000 is a reasonable range for the number ofvirions that might breach the mucosal barriers and potentially initiate infection.The simplest mathematical model that allows for exponential growth and viralextinction is the classic stochastic birth-death process for a single species (Fig-ure 3.4a). The number of virions V increases via discrete stochastic reproductionevents that occur at rate bV , and decreases via death events that occur at a rate dV .Starting with an initial population size of V (0) = v0, the average number of virionsis E[V (t)] = v0e(b−d)t , corresponding to the solution of the differential equation62dV/dt = bV − dV . Later in this subsection will see that the simple birth-deathmodel is not consistent with our knowledge of early HIV infection, and hence wewill ultimately use a more sophisticated model for the data and research questionsat hand. However, the exponential growth model of the expected value of the birth-death process allows a naive, yet natural approach to estimating the length of thewindow period, and hence deserves exploration:3.3.1 The simple birth-death model does not adequately describeearly infectionFollowing the simple birth-death process and setting the length of the eclipse phaseτ to be the time it takes for the expected number of virions to grow from v0 todetectable levels vdet, we quickly calculatevdet = v0e(b−d)τ =⇒ τ = ln(vdet/v0)b−d . (3.1)The slope b−d corresponds to the observed viral growth rates from Figure 3.3,the detection limit is 50 RNA copies/ml, which corresponds to 50 [RNA/ml] ×15,000 [ml/human] / 2 [RNA/virion] = 375,000 [virions]. Varying the inoculumsize v0 as the most difficult-to-estimate parameter between large (400 virions),medium (75 virions) and small (10 virions) we obtain estimates of 7.8 days (4.2-15.2 days 95% confidence interval), 9.7 days (5.2-18.9 days) and 12.0 days (6.4-23.4 days), see Figure 3.5.When we look at the stochastic birth-death model in more detail, however, wenotice that it is not consistent with key HIV parameters. Indeed, using the ex-pected value of the viral load as above ignores the likelihood that exposure leadsto infection Pext = (d/b)v0 , only the slope of the growth rate b− d is taken intoaccount. However, a good early infection model should meet the following param-eter restrictions to be consistent with the literature: (i) Pext ≥ 0.95, to match theper-exposure probability of infection, which is difficult to measure in an unbiasedway, but most estimates suggest this is the least low bound, see e.g. [85, 108]; (ii)10≤ v0 ≤ 15,000, to allow for multiple founder strains ([1, 8, 41, 61, 62, 71]) andmatch in-vitro estimates of the largest possible inoculum in vaginal transmission[14]; (iii) We expect the viral death rate d to be reasonably close to the measured63Small inoculum sizeMedium inoculum sizeLarge inoculum size0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 300 2 4 6 8 10 12 14 16 18 20 22 24 26 28 300 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30Length of the window period (days)Figure 3.5: The estimated length of the eclipse phase for all 78 plasma donorsaccording to the inoculumn size. Each square represents the estimatefor one donor. The vertical bars indicate the mean and 95% confidenceinterval. Here we use the naive log-linear model (3.1), which is not ableto capture key HIV characteristics, see Section 3.3.1. Hence this plot isan illustration-of-concept only. For the final results refer to Figure 3.8.viral clearance rate of 23 day−1 [91, 119].The birth-death model is sufficiently simple that the death rate can be expressedin simple form asd =rPext1/v01−Pext1/v0,where r = b− d is the initial growth rate from the data. This expression for dincreases with Pext and v0 virions, yet even for the assumed lower bounds of Pext =0.95 and v0 = 10 we obtain d ' 2.0× 102 virion−1 day−1, which is already oneorder of magnitude larger than the literature value d ' 23 virion−1 day−1. For themore reasonable estimate Pext = 0.98 and v0 = 75 the resulting death rate is morethan 150 times larger than the literature value. As such, it is impossible for this64model to reflect our knowledge of early infection and therefore we moved on to amore complex model which explicitly includes productively infected cells as wellas virions.3.4 Including infected cells and virions: the T ∗1 -T∗2 -VmodelTo improve on the inadequate model from Section 3.3 we introduce a new modelwhich features infected and productively infected target cells T ∗1 and T∗2 , respec-tively, as well as free virus V , see Figure 3.4b. In this three-state model, produc-tively infected cells T ∗2 produce new virions at rate p, and die at rate δ . Virionsare cleared at rate c and infect new target cells T ∗1 at rate kT . We assume that thedepletion of target cells T can be neglected in the early dynamics we are consider-ing, which allows us to use a constant infection rate kT . The rate at which infectedtarget cells T ∗1 become productively infected, T∗2 , is denoted by s. This delay isincluded to capture the experimentally-observed period between cell infection andthe release of infectious virions. We also assume that the background death rate ofnon-productively infected cells is negligible in the early stages of infection.To account for the stochastic nature of early HIV infection we study the systemas a branching process for the probability Pm,n,v;m0,n0,v0(t) that (T∗1 (t),T∗2 (t),V (t))=(m,n,v) given the initial condition (T ∗1 (0),T∗2 (0),V (0))= (m0,n0,v0). The averagenumber of virions as a function of time can then be calculated from the underlyingsystem of linear differential equationsdT ∗1dt= kTV − sT ∗1dT ∗2dt= sT ∗1 −δT ∗2 (3.2)dVdt= pT ∗2 − (c+ kT )V.This is a linear model and so we can calculate the average rate of viral increase ras the real part of the dominant eigenvalue of the differential equation system. The65eigenvalues are the roots of the characteristic polynomialλ 3+(s+δ + c+ kT )λ 2+(s(δ + c+ kT )+δ (c+ kT ))λ + s(δ (c+ kT )− pkT ),(3.3)which can easily be computed numerically.A standard calculation, see Chapter 2, gives the probability of viral extinction(and hence no ongoing infection),Pext = qm01 qn02 qv03 , (3.4)where q1 = q2 =min{1, δ (c+kT )pkT}, q3 =min{1, δp +cc+kT}are the extinction prob-abilities for an infection started by a single infected cell, productively infected cellor a single virion, respectively [21, 22, 59, 86].3.4.1 The T ∗1 -T∗2 -V model is consistent with data and literatureThe T ∗1 -T∗2 -V model draws a more accurate picture of HIV infection than the sim-ple birth-death model. However, we need to estimate more parameters. As men-tioned above, estimates of the viral clearance rate c [91] have found c = 23 day−1in chronic infection, and a study in macaques [119] suggests that this is also agood estimate for early infection. Similarly, the death rate δ of productively in-fected cells in chronically infected patients is estimated to be around 1 day−1 [74],and exploring a subset of the seroconversion panels that we analyse in this paper,Ribeiro et al. [93] estimated δ = 0.6 day−1 using the post-peak viral load decayrate. The average rate s at which infected cells become productively infected hasbeen estimated as 1 day−1 [25]. We further assume a virus-only inoculum andhence set T ∗1 (0) = T∗2 (0) = 0. This leaves the three parameters kT (infection rate),p (production rate) and v0 (virus inoculum). We use the following informationto constrain these: (i) as above, we assume the virus inoculum ranges between10 ≤ v0 ≤ 15,000; (ii) we calculate the infection rate kT and the production ratep such that 0.95 ≤ Pext ≤ 0.995 and that simultaneously the growth rate r of themodel matches the maximal growth rate obtained from the seroconversion panels.These constraints on kT and p are described via the eigenvalues of system (3.2)66a. b.Figure 3.6: The interdependence of the parameters of the T ∗1 -T ∗2 -V model.From left to right, the stars indicate particular choices of parameters inthree different risk scenarios: low risk and small inoculum size, mediumrisk and medium inoculum size, and high risk and large inoculum size,see Section 3.5. The resulting fitted values for p and kT are within theestimates from the literature. a. The production rate p as it depends onv0 and risk of infection. b. The infection rate kT as it depends on v0 andrisk of infection.and equation (3.4).For the T ∗1 -T∗2 -V model to be compatible with our general knowledge of earlyHIV infection we expect the fitted infection rate kT and production rate p to becomparable with estimates from the literature. However, since these parametersare difficult to measure experimentally, especially in early infection, there existonly very rough estimates: reports of the infection rate kT and virion productionrate p both span several order of magnitude: kT ' 10−3− 101 cell−1 day−1 [88],and p' 200-20,000 virions cell−1 day−1[17].Figure 3.6 shows the resulting fits for kT and p as v0 and Pext vary. In particular,for a large range of v0 and Pext the fitted parameters from the T ∗1 -T∗2 -V modelagree with the wide parameter ranges from the literature. Hence, unlike the simplebirth-death model, the T ∗1 -T∗2 -V model can be parameterized consistently with thelimited data available for early HIV infection. This is the model we will apply fromnow on.673.5 Risk scenariosWe choose three scenarios within the acceptable area in the parameter space (Fig-ure 3.6) to calculate the length of the eclipse period, that is, given an infection,the length of time from exposure to the reliable detection of the HIV infection byan RNA test. Our choice of per-exposure risk is on the higher end of the largespectrum found in the literatures, because many study designs, in particular thoseof steady partnerships, may bias towards a low risk of transmission (see [108] formore details), and because a higher per-exposure risk of infection leads to a longereclipse period in our model. This way the upper bounds that we will report canbe thought of as a worst-case. We present results for each risk scenario, using theaverage of the observed maximal viral growth rates from the data:1. High risk large inoculum size with per-exposure risk of infection of 5%and inoculum size of 400 virions (then: kT = 3.6×10−3 cell−1 day−1, p =21,970 virions/day),2. Medium risk medium inoculum size with per-exposure risk of infection of2% and inoculum size of 75 virions (then: kT = 7.5× 10−3 cell−1 day−1,p = 10,460 virions/day),3. Low risk small inoculum size with per-exposure risk of infection of 0.5% andinoculum size of 10 virions (then: kT = 1.4×10−2 cell−1 day−1, p = 5,621virions/day).3.6 The infection bias and its consequencesAn inclusion criterion for our data is that the plasma donors ultimately becameinfected. HIV exposures that did not lead to HIV infection are not recorded. Toreflect this bias in our model, we have to restrict the stochastic process to excludeextinction. We will denote the conditioned process, which will be used to fit thedata, with a tilde.3.6.1 Mathematical derivationFor a more detailed discussion of the mathematical background and derivation ofthe conditioned model formulation for branching processes like the T ∗1 -T∗2 -V mod-68els can be found in Chapter 2. We use Bayes’ rule and the Markov property torewrite the probabilityP˜m,n,v;m0,n0,v0(t) = P((T∗1 (t),T∗2 (t),V (t)) = (m,n,v) |(T ∗1 (0),T∗2 (0),V (0)) = (m0,n0,v0),(T ∗1 (∞),T∗2 (∞),V (∞)) 6= (0,0,0))of the process conditioned on not going extinct asP˜m,n,v;m0,n0,v0(t) = Pm,n,v;m0,n0,v0(t)1−qm1 qn2qv31−qm01 qn02 qv03.The conditioned process has the generating functionG˜m0,n0,v0(t,z1,z2,z3) =∞∑m,n,v=0P˜m,n,v;m0,n0,v0(t)zm1 zn2zv3=Gm0,n0,v0(t,z1,z2,z3)−Gm0,n0,v0(t,q1z1,q2z2,q3z3)1−qm01 qn02 qv03,where Gm0,n0,v0(t,z1,z2,z3) =∑∞m,n,v=0 Pm,n,v;m0,n0,v0(t)zm1 zn2zv3 is the generating func-tion of the unconditioned process which satisfies the branching propertyGm0,n0,v0(t,z1,z2,z3) = G1,0,0(t,z1,z2,z3)m0G0,1,0(t,z1,z2,z3)n0G0,1,0(t,z1,z2,z3)v0 .HereddtG1,0,0 = s(G0,1,0−G1,0,0),ddtG0,1,0 = δ (1−G0,1,0)+ pG0,1,0(G0,0,1−1),ddtG0,0,1 = kT (G1,0,0−G0,0,1)+ c(1−G0,0,1),(3.5)with G1,0,0(0) = z1, G0,1,0(0) = z2, G0,1,0(0) = z3. From the generating functionwe obtain the average number of virions E[V˜ (t)] of the conditioned process by69calculatingE[V˜ (t)] = ∑m,n,vvP˜m,n,v;m0,n0,v0(t) =∂ G˜m0,n0,v0(t,z1,z2,z3)∂ z3∣∣∣∣(z1,z2,z3)=(1,1,1)=11−qm01 qn02 qv03[∂Gm0,n0,v0(t,z1,z2,z3)∂ z3∣∣∣∣(z1,z2,z3)=(1,1,1)− ∂Gm0,n0,v0(t,q1z1,q2z2,q3z3)∂ z3∣∣∣∣(z1,z2,z3)=(1,1,1)]=f3(t)−g3(t)1−qm01 qn02 qv03. (3.6)Here f3 is the solution corresponding to the V variable in (3.2) above. The rele-vant system of equations for g3 can be derived by direct partial differentiation ofGm0,n0,v0 , which leads to the systemg˙1 =q1q3kT g3− sg1, g1(0) = m0qm01 qn02 qv03 ,g˙2 = sg1− δq2 g2, g2(0) = n0qm01 qn02 qv03 ,g˙3 = pq3g2− (c+ kT )g3, g3(0) = v0qm01 qn02 qv03 .We solve the two linear systems of differential equations numerically and then use(3.6) to calculate and eventually fit the average number of virions of the T ∗1 -T∗2 -Vmodel conditioned on non-extinction.3.6.2 The effect of the infection bias on the estimated length of theeclipse phaseTo illustrate and quantify the different risk scenarios and the effect of the infectionbias we plot the fit of the mean of the T ∗1 -T∗2 -V model to the data of four sampleplasma donors 1018, PRB966, 9018 and PRB946, for each risk scenario with andwithout conditioning (Figure 3.7) on infection. Initially the viral load drops be-low the inoculum size, because the inoculum contains no target cells, and henceinoculum-virions need to first infect new target cells before new virions can beproduced. However, the average drop of viral load and initial rate of viral increase70Figure 3.7: The effect of the infection bias on the estimated exposure date,as obtained by fitting the T ∗1 -T∗2 -V model, unconditioned (dashed lines,open markers) and conditioned (solid lines, filled markers), for eachexposure category: low risk (pentagon), medium risk (diamond) andhigh risk (square).differs among the risk categories, and also depends on whether the infection biasis taken into account. The fitted eventual growth rate, however, is reached veryquickly by all models, so that the estimated viral load agrees for all models wellbefore the detection limit is reached.The big difference between the model estimates of the conditioned and uncon-ditioned model occurs because the risk of extinction (which we condition against)declines with population size: initially, when the number of infected target cellsand viral particles is still small, there is a high chance that these populations goextinct. Once the populations are large enough, the risk of extinction becomesnegligible. Therefore, the effect of conditioning on non-extinction is more pro-71lllllllll llll lllll llllllllllllllll l lllllllllll llllllllll llllllllllllllllll ll llllllll llllll llllllllllllll llllllllll l llll llllllllll llllllll lllllllllllllllllllllllllllll lllllllllllll lllllllll llllllllllllllllllllll lllllLow risk, small inoculumMedium risk, medium inoculumHigh risk, large inoculum0 2 4 6 8 10 12 14 16 18 20 22 240 2 4 6 8 10 12 14 16 18 20 22 240 2 4 6 8 10 12 14 16 18 20 22 24Length of the window period (days)Figure 3.8: The estimated length of the eclipse period for all 78 plasmadonors according to the three different exposure-risk categories, usingthe conditioned T ∗1 -T∗2 -V model. Each dot represents the estimate forone donor. The mean and 95% confidence intervals are indicated by thevertical bars.nounced around the time of exposure and for higher risk scenarios. Ignoring thiseffect and naively fitting the slope and the inoculum size neglects the bias inher-ent in the data and hence predicts an earlier time of exposure, which leads to anoverestimate of the length of the eclipse period (see Figure 3.5)3.7 Quantifying the length of the eclipse period on apopulation levelWe used the conditioned three-state model to calculate the estimated lengths ofthe eclipse period for each plasma donor in our data set (Figure 3.8), for eachrisk category described above. We observe that the variability between the riskcategories is much smaller than the variability within the risk categories. This72Figure 3.9: The five plasma donors with the smallest maximal growth ratesare at or above the 95th percentile of the length of the eclipse period.Due to the relatively long time-interval between the RNA measurementswhere the maximal growth rate occurs, and the relatively high RNAloads, it is quite likely that the real maximal growth rate may have beenmissed for these donors.shows that the uncertainty in the choice of risk category has only minor effects onour main results. Indeed, the average length of the eclipse period is similar betweenthe risk groups: high-risk 8.3 days (95% CI: 4.2-16.7 days), medium-risk 9.2 days(4.7-18.4 days), low-risk 9.9 days (5.1-19.8 days). These confidence intervals arequite large, from about half the average value to twice the average value.The skew to longer eclipse periods is driven by a small number of donors forwhom the estimated eclipse period is very long — up to four weeks in the highestrisk category. Generally for these five donors the estimated length of the eclipse pe-riod is at or above the 95% confidence interval. These are the donors with the small-est maximal viral growth rate, namely 0.36/day (9028), 0.37/day (9075), 0.44/day(1814), 0.45/day (PRB933) and 0.45/day (HIV9084). Recall that a small measuredmaximal viral growth rate leads via fitting to slow population growth and hence alonger eclipse period. Looking at the seroconversion panels of these donors (Fig-ure 3.9) it is possible to argue that the observed maximal growth rate is an under-estimation of the actual maximal growth rate: The time interval between the two73test results that account for the observed growth rate is 19 days (9028), 20 days(9075) and 21 days (PRB933), and all viral loads used to determine the maximalgrowth rates are greater than 4.8×104 RNA cp/ml. For HIV9084 the time intervalbetween the tests was as long as 38 days, while the first viral load measurement fordonor 1814 was already very high at 1.7× 104 RNA cp/ml. Long time intervalsbetween two tests make it more likely that the actual maximal growth rate has beenmissed, and so do high RNA measurements since the maximal viral growth rate istypically found between two measurements with low RNA loads. We conclude thatif these outliers are actually not properly represented by their seroconversion timecourse data, an upper bound of 17 days for the full eclipse period is a very reason-able estimate. Eliminating these five donors from the plot in Figure 3.8 gives thefollowing results for the length of the eclipse period: high-risk 7.6 days (95% CI:4.2-14.1 days), medium-risk 8.4 days (4.7-15.6 days), low-risk 9.1 days (5.1-16.7days).As a final point, we also computed the distributions of the length of the eclipseusing the unconditioned T ∗1 -T∗2 -V model and found that the unconditioned modelsubstantially overestimates the duration of the eclipse period. The difference in themean over all donors was found to be 3.4 days for the high-risk scenario, 4.5 daysfor medium-risk, and 6.0 days for the low-risk scenario on average. This shows thegreat importance of correctly taking the infection bias in the data into account byusing the conditioned model.3.8 Probability of a false negative HIV RNA test3.8.1 Mathematical derivationGiven a lower detection limit of dL total virions of the HIV RNA test, we calculatethe probability that a plasma donor will be infected but have an undetectable viralload at time t after exposure asP(V˜ (t)< dL) =dL−1∑v=0P(V˜ (t) = v)74=dL−1∑v=0∞∑m,n=0P˜m,n,v;m0,n0,v0(t)=dL−1∑v=01v!∂ vG˜m0,n0,v0(t,1,1,z3)∂ zv3∣∣∣∣z3=0=dL−1∑v=01piRe(∫ pi0G˜m0,n0,v0(t,1,1,eiϕ)e−ivϕ dϕ)=1piRe(∫ pi0G˜m0,n0,v0(t,1,1,eiϕ)1− e−idLϕ1− e−iϕ dϕ).Note that this formula only applies to plasma donors who become infected follow-ing exposure. The technical details of this approach are found in Chapter 2 and ourprevious work [21, 22].From the expression above we infer the probability that a person is HIV infecteddespite having a negative RNA test at time t after exposure. Using Bayes’ ruleP(A |B) = P(A)P(B |A)P(A)P(B |A)+P(A)P(B |A) ,we choose A as “HIV exposure leads to infection” and B as “negative HIV RNAtest at time t”. Using a false positive rate of α (specificity of 1−α) we obtainP(B |A) = 1−α . For a false negative rate of β (sensitivity of 1−β ) we obtain thatP(B |A) = P(V˜ (t)< dL)+βP(V˜ (t)≥ dL)= 1− (1−β )P(V˜ (t)≥ dL).(3.7)Denoting the probability that HIV exposure does not lead to infection by P(A) =Pext, we obtain the explicit formulaP(infected despite negative RNA test at t)=(1−Pext)(1− (1−β )P(V˜ (t)≥ dL))(1−Pext)(1− (1−β )P(V˜ (t)≥ dL))+Pext(1−α).(3.8)In particular, we see that the likelihood of being infected despite a negative RNAtest is bigger for tests that are not perfectly specific and not perfectly sensitive.753.8.2 Results and implications for the interpretation of HIV testresults and the timing of follow-up testsWe calculate, for each plasma donor, the probability that the viral load has in-creased above the detection threshold for an HIV RNA test at time t after exposure.This likelihood increases steadily from 0 (at the time of exposure) to its asymptoteat 1 (since we condition our analysis successful infection), see Figure 3.10. We av-erage these likelihood curves to obtain, under the assumption that our data gives afair representation of the general at-risk population and given that infection will oc-cur, an estimate for the probability of a positive HIV RNA test t days after exposure,for an unknown individual who might present at an HIV clinic. These curves arevery similar for each risk category, so in Figure 3.10 we only show the likelihoodcurves for the low risk category, which estimates the longest eclipse periods.Remaining risk Day (since exposure) of negative test.Values for (α,β ).relative absolute (0,0) (2%,0) (0,2%) (2%,2%)95% 0.475% 5.2 5.5 5.2 5.590% 0.450% 5.9 6.1 5.9 6.175% 0.375% 7.2 7.3 7.2 7.350% 0.250% 9.2 9.3 9.3 9.425% 0.125% 12.8 12.9 13.2 13.410% 0.050% 18.8 18.9 19.8 19.95% 0.025% 22.2 22.3 24.6 24.7Table 3.1: Assuming a per-exposure risk of 0.5% this table shows the re-quired waiting time until a negative HIV RNA test reduces the risk ofinfection to the desired level. The waiting time is longer for tests withnon-zero false positive rate α and non-zero false negative rate β .However, in the clinical scenario we would not know if the patient is actuallyinfected or not. Hence the more applicable metric in this case is how much theconfidence in non-infection increases by a negative result from an RNA test. Intu-itively, after a very early negative test one can hardly assume a lower relative risk ofinfection, whereas a negative test several days or weeks after the exposure dramat-76a. b.Figure 3.10: Individual and aggregate likelihood of detectable RNA as afunction of days since exposure, and relative probability of a falsenegative test. Each grey line represents the estimate for one plasmadonor. The blue curve is the average of all donors in the dataset andhence provides our best estimate for a random patient from the generalpopulation. The largest information gains are between day 5 and day10. Plotted for low risk, small inoculum to provide an upper bound onthe length of the eclipse period. a. Probability of detectable RNA tdays after exposure, if infection occurs eventually. b. Probability ofa false negative test, assuming that the test is perfectly sensitive andspecific, relative to the baseline probability of infection. The resultsfor non-perfect tests are similar and summarized in Table 3.1.ically decreases the relative risk of infection. Our estimates of relative confidenceare displayed in Figure 3.10, and also summarized in Table 3.1.For both plots and the table in this subsection we conservatively choose theparameters for the low risk small inoculum size exposure scenario. This scenariopresents the longest estimated eclipse periods in our model. The results for theother exposure categories are similar (not shown). We conclude that very littleinformation would be gained by a repeated test before day five, and that the ad-ditional information gained in tests more than three weeks after exposure is verylittle. Therefore, given a negative HIV RNA test after a recent potential exposure,our results suggest that a test three weeks after the potential HIV exposure should77catch 95% of real HIV infections. Removing the five possible outlier cases (asdiscussed in the previous section) increases this estimate to 100%.3.9 DiscussionUncertainty about the length of the window period for HIV infection remains asource of anxiety for clinicians and patients alike. Reliable estimates are difficultto obtain, because, by definition, the virus is not detectable during that time. Effortsto close this knowledge gap have revealed important insights into the relative timeperiod between the eclipse phases of different HIV tests [32], which has recentlybeen refined by ourselves for newer antibody tests [103]. Our goal here was tocalculate the absolute length of the eclipse phase for HIV tests that measure the viralRNA instead of antigens or antibodies and therefore promise the shortest eclipsephase. Knowing this absolute time period is critical because the relative estimatesfor the eclipse phases of other tests are based on it. Our results suggest that, inmore than 95% of the plasma donors, this period lasts between four and 20 days,with an average of eight to ten days, depending on the assumed risk category.To obtain these results we extracted the maximal initial viral growth rate fromHIV seroconversion panels and fitted simple stochastic models, using parameterestimates from the literature. From a large choice of available mathematical modelsof within-host dynamics of HIV infection [87] we chose a model that is as simpleas possible, but not any simpler. We chose to include the delay between infectionand viral production of a target cells, compared to the slightly simpler T ∗-V model,because this delay slightly affects our estimates of the length of the eclipse period(by about half a day on average, not shown), and the single additional parameter sis well-estimated in the literature.A major limitation of the T ∗1 -T∗2 -V model is that it assumes that infection hap-pens in a well-mixed environment. However, depending on the type of exposurethe inoculum has to breach various mucosal layers and spatial effects may becomeimportant. We neglected the delay before the inoculum breaches the mucosa, butsince this delay is assumed to be on the order of a few hours [43, 44], we do notexpect that any our results would change considerably. Similarly, the mucosal lay-ers greatly constrain the number of donor virions that eventually reach infectible78tissues, which we accounted for by choosing a relatively small effective inoculumsize in all of our risk categories. Following our principle of keeping the modelsimple we also chose to not explicitly include other potentially important effects,like the formation of local foci of infection and rapid viral replication in lymphnodes (see [42, 44]). If any of these effects significantly modulates the time-courseof early infection away from an essentially exponential process, then our eclipseperiod estimates would need to be adjusted. However, in the absence of compellingevidence we believe that our simplified models are the most parsimonious choice.Interestingly, our analysis shows that a simplistic exponential-growth modelcan not be used to describe early HIV infection. Further, we determined that itis important to account for the infection bias in seroconversion data: viral loadgrowth rates are only available for plasma donors that were eventually infected,yet most exposures do not lead to infection. Conditioning our model to account forthis fact, we showed that the length of the window period would be considerablyoverestimated if this effect was not taken into account.Finally, we use our model to calculate how quickly the likelihood of a falsenegative test decreases over time since exposure. This result can help patients andclinicians alike to understand the informative value of a negative HIV RNA test. Inour model the likelihood of a false negative test decreases most rapidly between 5and 10 days after exposure. HIV RNA tests typically have a very high sensitivity,which is often reported as perfect, and also a very high, but not perfect, specificity,see [13]. Either error increases the waiting time, so we considered a relativelypoor sensitivity and specificity of 98%. We further assumed here that infectioncould be detected at the exact moment that the viral load reaches the detectionlimit, whereas in reality the chance of detection increases more steadily with viralload, due to the uncertainty in the measurement and fluctuations in the viral load ofthe patient’s blood stream. Unfortunately, we are not aware of any existing workthat can be used to quantify this uncertainty. In future work, as this data becomesavailable, it would therefore be interesting to include a more sophisticated viral-load dependence in the likelihood of detecting the infection.79Chapter 4Modelling the population-levelimpact of increasing HIV testing4.1 Motivation and backgroundWith an estimated 71,300 (range: 58,600 to 84,000) people living with HIV inCanada in 2011, the overall population prevalence is relatively low at 0.2% [83].However, when stratifying by exposure category it becomes clear that the epidemicis concentrated in the men who have sex with men (MSM) community (46.7% of allHIV infections) and among injecting drug users (IDUS) (16.6%). Indeed, in BritishColumbia 59% of all newly diagnosed infections are identified as belonging tothe MSM exposure category, and the HIV prevalence in men who have sex withmen (MSM) in Vancouver is estimated to be approximately 15% [34, 77]. Manystudies have been administered by the British Columbia Centre for Disease Control(BCCDC) and others to better understand the risk behaviour and disease dynamicsof the MSM population, so that HIV prevention programs can better target this keyrisk group. A major source of such information is the largest online survey of gayand bisexual men in Canada is Sex Now, which has been conducted since 2002 andannually collects data from thousands of MSM [15].The importance of the internet as a way to facilitate disease transmission wasfirst highlighted by the 2004 Sex Now survey, which found that a majority of MSMmeet sexual partners online. At the same time, this group was also found to use80the web to look for health information, showing that an online presence has thepotential of unprecedented reach to a population at risk of infection. This led toBCCDC’s first online HIV intervention, the Cyber Outreach Program in 2004, whichoffered sexually transmitted infection (STI)/HIV education and live chat services[33, 84]. This was also around the time when the idea of internet-based testing wasconceived, which eventually led to the initiation of the Get Checked Online (GCO)program by the BCCDC.The goal of the study in this chapter is to quantitatively predict the populationimpact of increasing HIV testing, with initiatives such as GCO, on the prevalenceand incidence of HIV among Vancouver MSM in the next five years. This estimatewill serve as a key input to future cost-effectiveness studies and, as such, will helpguide the expansion of online testing in British Columbia (BC), other canadiancities and beyond. First, we by explain how the GCO program works in practice.Next, we describe how the data for our study was collected. Then we present abasic model of susceptible and HIV infected individuals that accounts for behaviourchange depending on the awareness of infection. The basic model not only servesas a point of reference, but we also use it to explain the modeling techniques andkey parameters that we need to identify from the data. We then show a techniquefor calculating the sensitivity of the model outcome as it depends on the parametervalues, before we discuss the results and insights we gain from the basic model.In the following sections we introduce the full model, which incorporates differenttesting and risk behaviour, and describe how we obtain the additionally requiredparameters from the data. Finally, we summarize our results and predictions, andindicate how this work could be extended.4.2 How Get Checked Online worksGCO is a program to improve sexual health by increasing the frequency of STI/HIVtesting, using clinical resources more efficiently, and reaching greater at-risk pop-ulations, such as the youth or people from rural areas that may otherwise facebarriers to accessing testing. By reducing wait times and increasing the timelinessof diagnosis GCO may increase the rate of treatment, induce risk-behaviour changeand ultimately reduce onward STI/HIV transmission. On the GCO website users81Figure 4.1: Sketch of how the GCO program works, first published in [53].After answering a questionnaire that assesses their risk and recommendswhich STIS to test for, users print their requisition from home. Speci-mens can be given anonymously at participating lab locations, and testresults can be viewed online if all tests are negative. Otherwise the STIclinic contact the user to discuss erroneous specimens as well as inde-terminate or positive results.with an account answer a questionnaire similar to what they would be asked in aSTI/HIV testing clinic. Based on the answers to these questions the system com-piles a Portable Document Format (PDF) document of recommended tests that theperson can print and bring to a partnering laboratory where they can give the re-quired specimens for the corresponding STI test. Once all test results are availablethe person gets notified to login and view their results. The results are shown onlyif all tests are negative. If any of the tests is positive, indeterminate, equivocal orif there is any problem with any of the specimens, no result is displayed. Instead,a message is shown to contact a clinic for follow-up and nurses will make everyeffort to contact the person.It is important to note that the entire GCO process can be done anonymously.82Each login can be linked to a first and last name, but these fields are not checkedand pseudonyms are explicitly allowed. Either way, the name does not appearon the printed lab requisition, instead a unique ID is used to link the test resultsto the corresponding person. For further privacy protection no test result is storedlonger than 30 days online - results only remain available in the clinical informationsystem which holds the complete medical record. Another benefit of GCO is abuilt-in email-testing-reminder that accounts for the risk category as identified inthe questionnaire.GCO launched on September 9th 2014 by email invitation only, and was fullylaunched in January 2015 when hand-out access codes were distributed to drop-ins and turn-aways at testing clinics, and social media marketing campaigns wererun. Currently GCO is available for chlamydia, gonorrhea, syphilis, HIV as well ashepatitis C virus testing.4.3 Survey data collectionThe author was not involved in the collection of the raw data.The study population was recruited from June 18, 2011 to March 2, 2012 (10months) at health Initiative for Men (HIM) Sexual Health Centers in Vancouver.Eligibility conditions were that the participant was at least 19 years of age, self-identified as gay, bisexual or MSM, intended to reside in the Greater Vancouverarea for the full year of follow-up, and received a negative HIV test at the recruitingHIM sexual health clinic. Of the 1141 eligible men 194 consented and 166 (14.5%)completed the baseline survey.In total there were four surveys and network grid interviews, respectively, onday 7, day 30, day 180 and day 360 after recruitment. The surveys were online andself-administered with questions on demographics, HIV testing patterns, personalsexual history and substance use, disclosure of HIV status and risk of HIV, HIVknowledge and attitudes, mental health as well as knowledge of other campaignstargeted at MSM. The network grids were phone interviews with detailed questionsabout the five most recent sex partners in the past six months, such as the length ofthe relationship, frequency of sex, knowledge of mutual HIV status, and the typesof sexual acts they engage in.83mSβ = rpmme eUeAAUSτUSAFigure 4.2: Schematics of the basic model for GCO. Individuals can be sus-ceptible, infected and unaware, or infected and aware of their infection.The mass-action infection rate β = rp is a product of the exposure-rater and the per-exposure probability of HIV transmission p, and is reducedfor individuals who are aware of their infection. GCO aims to increasethe testing rate τ with which infected individuals become aware of theirinfection. The model also accounts for turnover via immigration m andemigration e in all three compartments.The survey and grid on day 30 were mainly designed as follow-ups on therecent test at the recruiting HIM clinic and did not feature the full set of questionsthat are relevant in our study. We therefore choose to focus on the data from thethree surveys and three network grids administered on day 7, day 180 and day 360.Parameter values that cannot be estimated from this data are taken from theliterature.4.4 The basic model with homogeneous testing patternsand risk behaviorIn the basic model we account for susceptible (denoted by S) and infected indi-viduals, where infected individual are either unaware (U) or aware (A) of theirinfections, see Figure 4.2. All three groups are subject to immigration and emigra-tion at rates m and e, respectively. We denote r the rate of “risky events”, that is,events where HIV may be transmitted and we assume that r is independent of theknowledge of a person’s HIV status. We further assume that a person who knows84that they are infected has a reduced risk of transmission, e.g., by using condoms,serosorting (choosing sexual partners with the same serostatus) or being on treat-ment. The per-encounter risk of disease transmission from unaware and awareindividuals is pU and pA, respectively, with pU > pA. Awareness of infection isobtained at the testing rate τ .The mathematical equations for the basic model are given bydSdt= mS−Sr pUU + pAAS+U +A − eSS, S(0) = S0,dUdt= mU +SrpUU + pAAS+U +A− (eU + τ)U, U(0) =U0,dAdt= mA+ τU− eAA, A(0) = A0.(4.1)We simplify the above by assuming a constant population size N = S+U +A.This is a very natural assumption considering the time-span of only a few yearsthat we are interested in when evaluating the initial impact of GCO. Hence, we sete = eU = eA = eS, mU = mA = 0 and mS = e(S+U +A). This way e acts as arenewal or turnover rate at that accounts for sexually active individuals. Note thatthis assumption slightly reduces the effectiveness of intervention due to wash-outof infected individuals. This leads to the following system of ODES,dSdt= e(U +A)−Sr pUU + pAAN, S(0) = S0,dUdt= SrpUU + pAAN− (e+ τ)U, U(0) =U0,dAdt= τU− eA, A(0) = A0,dNEWINFECTEDdt= SrpUU + pAAN, NEWINFECTED(0) = 0,dNEWDETECTEDdt= τU, NEWDETECTED(0) = 0.(4.2)We added the last two equations to account for the number of new infections andnewly detected infections.854.5 Parameterizing the basic model4.5.1 The rate of risky eventsWe define the rate of risky events r as the number of sex acts where HIV may betransmitted per unit time. We obtain this parameter value from the grid data, whereparticipants were asked detailed questions about their five most recent relationshipsin the past six months. For each relationship the participants provided the date offirst and last sex, whether the relationship was ongoing, and the average frequencyof sex in the past year. From this information we estimate the total number of sexacts, as the product of the number of days of the relationship in the last year andthe frequency of sex. Since the provided responses to either of these quantities areoften vague or approximations we estimate a generous lower and upper bound foreach relationship.Some participants reported an unreasonably high number of sex acts, even forlong-term relationships, so we set the maximum number of sex acts to once perday. Similarly, some participants did not report any sex act with their sex partners,so we set the minimum number of sex acts to once per relationship, see Figure 4.3.For each participant and each survey time point we then sum the total number of allrisky events over all their relationships in the past year, and average those numbersto obtain the final estimate r = 64.5 year−1. When a range on the length of therelationship and the number of risky events was provided we estimate a generouslower bound of r = 38.1 year−1 and upper bound of r = 104.7 year−1.4.5.2 The per-encounter transmission probabilityThe likelihood of transmitting the infection depends on the type of sex acts that thepartners engage in [85, 89, 107]. From the network grid we know which sexual actsthe participants engaged in the most recent time they had sex with each partner, andwhether a condom was used. We assume that the most recent sex is representativeof the typical sex act for this relationship.In 79% of the cases more than one type of sex act was performed at the mostrecent sexual encounter. Further, in more than 97% of the cases the partners en-gaged in at least one of the following risky acts with a substantial risk of HIV86Sex more often than once per day1101003651 10 100 1000 5000Relationship length (days)Count of sex (total last year)Figure 4.3: Relationship length and total number of risky events as obtainedby the grid data. The horizontal and vertical error bars indicate theuncertainty in the length of the relationship and number of risky events,respectively. We chose to bound the number of risky events by once perday. The marginal histograms show that a large fraction of risk eventsstem from one-time sexual encounters.transmission: receptive anal sex (with or without condom), insertive anal sex (withor without condom), receptive oral sex, insertive oral sex. A small number of par-ticipants reported receptive or insertive anal sex with and without condom at thesame encounter, or that the condom came off at some point during the act. In thiscase we only consider the more risky version without a condom. However, partici-pants may engage in both receptive and insertive anal intercourse, with or withoutreceptive or insertive oral intercourse at the same encounter, see Figure 4.4.Among the remaining 3% of cases the reported sex acts were rimming, fistingor masturbation, which are not considered to be independent risk factors, and havea negligibly small risk of HIV transmission. We discarded those events in our risk8714%20%15%22%79%77%3%None of theseReceptive analInsertive analReceptive anal (condom)Insertive anal (condom)Receptive oralInsertive oralPercentage of positive answers"The last time you had sex with each partner, what sexual acts did you engage in?"Figure 4.4: Responses to the network grid question “The last time you hadsex with each partner, what sexual acts did you engage in?”. We usethese frequencies together with the biological per-exposure probabilitiesfrom Table 4.1 to calculate the per-encounter risk of HIV transmission.analysis.To calculate the per-encounter risk of infection in the presence of more thanone sex act per encounter, we assume that the likelihood of infection from all riskfactors are independent, to findP(infected) = 1−P(not infected)= 1− ∏x ∈ sex actP(not infected by x)= 1− ∏x ∈ sex act(1−P(infected by x))= 1− ∏x ∈ sex act(1−P(infected |engaged in x)×P(engaged in x)).The likelihood of engaging in the sex act is obtained from the grid data as describedabove, while the probability of infection for a given sex act is a biological param-eter and can be obtained from the literature, see Table 4.1. From this data we thencalculate, for each participant and study date, the per-encounter risk of HIV infec-88tion as the average of the probability of infection for a typical sexual encounter foreach partner, weighted by the total number of sexual encounters with this partner.Finally, averaging over all participants and study dates we obtain the final averageper-encounter risk of HIV transmission as pU = 0.397%. If we use the lower andupper bounds of the 95% confidence intervals from Table 4.1 we obtain a lowerestimate of pU = 0.283% and an upper estimate pU = 0.567%, respectively.All the survey responses from the grid data are from HIV-negative participantswho were recently tested, indicating uncertainty about their status. It is thereforereasonable to assume that they behave similarly to HIV-positive individuals thatare not aware of their infection. HIV-positive individuals that are aware of theirinfection may reduce their rate of sexual encounters, or adjust their risk behaviourto reduce the risk of onwards transmission. For simplicity we assume that the rateof risky events r is unchanged by the knowledge of their HIV status, but that the per-encounter risk of HIV transmission from an individuals that is aware of their statuspA is reduced, e.g., by consistently using condoms. Under this assumption, pA iscalculated similarly as pU with the only difference that for all sex acts we assumethe minimal associated risk that is obtained by condom, that is, each unprotectedreceptive or insertive anal intercourse is replaced by receptive or insertive analintercourse with condom, respectively. This results in a per-encounter probabilityof HIV infection of pA = 0.122%. Again using the 95% confidence intervals fromTable 4.1 we obtain a lower estimate of pA = 0.087% and an upper estimate pA =0.175%, respectively.Type of sex Per-exposure risk (95% CI) ReferenceReceptive anal 1.38% (1.02%-1.86%) [85]Receptive anal (condom) 0.28% (0.20%-0.37%) [89]Insertive anal 0.11% (0.04%-0.28%) [85]Insertive anal (condom) 0.022% (0.008%-0.056%) [89]Receptive oral 0.028% (0.020%-0.037%) [107]Insertive oral 0.014% (0.010%-0.019%) [107]89Table 4.1: Per-exposure probability of HIV infection for different risk be-haviours. The use of condoms reduces the per-encounter risk of infectionby 80% [89], while infection via receptive and insertive oral sex is esti-mated to be a factor of 50 and 100 times less likely than unprotected analsex, respectively [107].4.5.3 The testing rateThe testing rate τ , before the effect of GCO, is obtained from the survey data, moreprecisely, from the survey question“What best describes your HIV testing pattern?”The aggregated answers from all participants on all study dates are shown in Fig-ure 4.5. We identify two groups of testers, those with a regular testing interval andthose who test irregularly and infrequently. We resist the temptation to put con-crete numbers on the vague answers “After risky sex”, “At new relationship” and“Other” (see Figure 4.5) as it is not clear if this group tests more or less frequentthan those with a regular testing pattern. Taking the weighted average of the testingrates for the regular testers (every 3 months, every 6 months or every 12 months)we obtain a testing rate of 2.61 year−1.Since the data from our study was taken from individuals who just had an HIVtest, we do not sample from the group that has never tested to date. In order toestimate the size and testing rate of this group we use data from the 2011 Sex Nowsurvey [15], which reports that 18% of MSM never had an HIV test (31% of MSMunder 30, 14% of MSM over 30). The fraction of MSM under 30 in the Sex Nowstudy is 22% and the average age is 43 years, so if we assume that the average ageof those under 30 is 25 we obtain an average age of 48 for those over 30. Further,assuming a minimum age of 15 years and that the random variable of the fraction ofthe population that had an HIV test by age t +15 years is exponentially distributedwith parameter λ , we obtain the two estimatesP(X ≤ 10) = 1− e−10λ = 0.69, λ = 0.117,P(X ≤ 33) = 1− e−33λ = 0.83, λ = 0.053.9063593212111814Every 3 monthsEvery 6 monthsEvery 12 monthsAt new relationshipAfter risky sexNo patternOtherNumber of responses"What best describes your HIV testing pattern?"Figure 4.5: Responses to the online survey question “What best describesyour HIV testing pattern?”. A large fraction of the population getstested regularly, albeit at different rates, while a smaller fraction of thepopulation has no regular testing pattern at all.These estimates only differ by a factor of 2, so we take their average λ = 0.085year−1 as the testing rate of the 18% of the population that is not represented bythe participants of our survey.Taking the weighted average of the two obtained testing rates for the regulartesters and irregular testers we find a testing rate of τ = 2.16 year−1. We will usethis as the baseline testing rate before the effect of GCO.4.5.4 Other parameters from the literatureIt is assumed that the total population size of the active Vancouver MSM communityis about 20,000, of which 18.1% are HIV infected and of those infected, 13.8%are unaware of their HIV infection (2.5% of the total population) [106]. Thus wechoose the initial condition U(0) = 20000×0.025= 500, A(0) = 20000×0.181−U(0) = 3120, S(0) = 20000−U(0)−A(0) = 16380. The turnover rate e is moredifficult to estimate. We assume that the average time a MSM is sexually activewith risk of HIV transmission is 20 years. An individual may leave the at-risk study91population by death, emigration from Vancouver, settling in a monogamous sero-concordant relationship, or by stopping to be sexually active altogether, amongother things. This rough estimate yields e = 1/20 = 0.05 year−1.Parameter Interpretation Value SourceN Total size of sexually active 20,000 [106]MSM populationS(0) Initial number of 16,380 [106]uninfected MSMU(0) Initial number of HIV 500 [106]positive MSM unawareof their infectionA(0) Initial number of HIV positive 3,120 [106]MSM aware of their infection1/e Average time of being sexual 20 years textactive and at-riskτ Average rate of HIV tests 2.16 year−1 [15], textpU Average per-encounter risk 0.397% [85, 89, 107],of infection at encounter 0.283-0.567 textwith unaware individualpA Average per-encounter risk 0.122% [85, 89, 107],of infection at encounter 0.087-0.175 textwith aware individualr Average number of 64.5 year−1 textrisky encounters 38.1-104.7Table 4.2: Model parameters for the basic model, with 95% confidence inter-val or lower and upper bound, if applicable.4.6 Sensitivity analysis - the Direct Differential methodFor all our models we want to calculate how much the output variables changewhen the parameter values are slightly modified. Sensitivity analysis helps us to92translate uncertainties in parameter values to uncertainties in model predictions,and mainly serves two purposes: Firstly, it allows us to estimate how the effectsof GCO impact the outcomes of interest, e.g., the total number of new infections.Secondly, sensitivity analysis allows us to identify those parameters that our modeloutcomes are most sensitive to, which, in turn, can guide the data acquisition andanalysis: More care and focus should be put into getting good estimates for theparameters that impact our model predictions the most.The straightforward way to calculate sensitivity is to repeatedly solve the sys-tem of differential equations for several parameter values and compare the results.However, when parameter changes are regarded in isolation, that is, only one pa-rameter is varied at a time, an approximation called the Direct Differential methodallows us to avoid repeated calculations. Instead of solving the same system manytimes, a slightly larger system is solved once. Letd~ydt= f (~y,~p, t), ~y(0) =~y0,be an ordinary differential equation that depends on the parameters ~p. We wantto calculate how the model outcome ~y changes with each parameter p j, i.e., wewant to find ~s j =∂~y∂ p j . To that end we set up a differential equation by taking thetime-derivative:ddt~s j =ddt∂~y∂ p j=∂∂ p jd~ydt=∂∂ p jf (~y,~p, t)=∂ f∂~y· ∂~y∂ p j+∂ f∂ p j= J~s j +Fj,93where J =(∂ fi∂~y j)i jis the Jacobian matrix and the expression for Fj =∂ f1∂ p j...∂ fn∂ p j canbe calculated analytically. The initial condition is given by~s j(0) =∂~y j(0)∂ p j , which isonly non-zero when the initial value of the model depends on the parameters. Oftenthe relative change~s j× ~pyi is more informative than the absolute change, especiallywhen parameters of different orders of magnitude are compared.4.7 Results and predictions from the basic modelHere we present the results of and discuss the predictions from the basic model.We are interested in the immediate impact of GCO and hence run the model forfive years only. Practical insights we could gain from studying the long-term be-haviour of the model would be very limited, because the parameter values andmodel structure are only valid for the current state of the epidemic, and wouldneed to be adjusted if the epidemic would grow or decrease considerably in theyears to come. For this reason we also refrain from an extensive stability analy-sis. The model predictions, using the parameters from Section 4.5, are shown inFigure 4.6. The predicted total number of new infections and newly detected in-fections in the next five years is 1326 (499-3967) (265 (100-793) averaged annual)and 1666 (935-3971) (333 (197-794) averaged annual), respectively. These predic-tions are about twice as high as the 806 new infections found by the BCCDC from2008-2012 [34], which we discuss below.4.7.1 Calculating R0To validate our parameter values, we are interested in the basic reproduction num-ber R0 for the basic model. Using the next-generation method [23, 24, 49] weobtain the matrix of new infections F (not to be confused with Fj in the sensitivityanalysis) and transfers of infections V , evaluated at the disease-free equilibrium(S,U,A) = (N,0,0) asF =[rpU rpA0 0], V =[e+ τ 0−τ e].940 1 2 3 4 5Time in years01000200030004000Compartment sizeThe basic modelUnawareAwarenew infectionsnew detectedFigure 4.6: Evolution of all compartments for the next five years, using pa-rameter values from Section 4.5. The total number of individuals is con-stant, hence the (roughly constant) number of susceptibles is not shownfor simplicity. The basic model estimates a total of 1326 new infectionsand 1666 newly detected infections over five years.Therefore, R0 is the dominant eigenvalue of G = FV−1, which isR0 =re+ τ(pU +pAτe).For the parameters obtained in Section 4.5 we find R0 = 1.65 (R0 = 0.70 - 3.87for the lower and upper estimate of the contact rate r and per-encounter infectionprobabilities pU and pA, respectively). For a slow epidemic like HIV a value ofR0 close to unity means that the epidemic is relatively stable, which agrees withthe observations that the number of new diagnosis of MSM in Vancouver did notchange much over the last decade [34].954.7.2 Sensitivity analysisApplying the techniques of Section 4.6 to the basic model (4.2), we obtain that themodel vector~y and the parameter vector ~p are both 5-dimensional.~y =SUANEWINFECTEDNEWDETECTED , J =−r pUU+pAAN e− rpU SN e− rpA SN 0 0r pUU+pAAN rpUSN − (e+ τ) rpA SN 0 00 τ −e 0 0r pUU+pAAN rpUSN rpASN 0 00 τ 0 0 0 ,Fe =U +A−U−A00 , Fr =−S pUU+pAANS pUU+pAAN0S pUU+pAAN0 ,FpU =−SrUNSrUN0SrUN0 , FpA =−Sr ANSr AN0Sr AN0 , Fτ =0−UU0U .Here we used the subscript corresponding to the parameter value for simplicity ofnotation. The initial conditions do not depend on the parameter values and hence~sX(0) = 0. This adds the following differential equations to (4.2):d~sedt= Jse+Fe, se(0) = 0,d~srdt= Jsr +Fr, sr(0) = 0,d~spUdt= JspU +FpU , spU (0) = 0,d~spAdt= JspA +FpA , spA(0) = 0,d~sτdt= Jsτ +Fτ , sτ(0) = 0.96e r pU pA τS 0.06 -0.09 -0.01 -0.08 0.01U -0.18 1.30 0.13 1.18 -1.06A -0.24 0.32 0.04 0.28 0.01NEWINFECTED -0.09 1.19 0.15 1.05 -0.09NEWDETECTED -0.08 0.84 0.11 0.73 0.03Table 4.3: Sensitivity of the relative change in the outcome predictions ofthe basic model (4.2) with respect to its parameters. Positive numbersindicate that increasing the parameter leads to an increase in the finalsize of the corresponding compartment.Using the parameters from Section 4.5 we numerically approximate the solu-tion of (4.2) and calculate the sensitivity of the number of new infections to allparameter values, see Table 4.3. For example, the relative change in the predictednumber of newly infected individuals with respect to the testing rate τ is −0.09.This means that increasing the testing rate by 25% leads to a relative change inNEWINFECTED by −0.09× 0.25 = −0.0225. With an estimated 265 (100-793)new infections annually, this corresponds to 0.0225×265= 6.0 (2.3-17.8) avertedHIV infections annually, or 29.8 (11.2-89.3) averted infections in five years.4.7.3 Fitting to the epidemiological dataUp to this point we fitted each parameter individually to the available survey andgrid data and computed the model predictions. This approach has the advantagethat it accurately reflects the collected data as well as the consequences of the modelassumptions. Although we obtain model predictions that are reasonably close tothe epidemiological data, a gap remains, see Figure 4.6. This implies that someassumptions or effects have been missed or need to be reevaluated. We thereforerevisit each parameter and compute the value that forces the model predictions tomatch the external epidemiological data. More precisely, we individually fit eachparameter such that the predicted number of newly detected infections over fiveyears matches the 806 newly detected infections by the BCCDC. We fit each pa-rameter individually to gain an understanding of their individual impact, the realityis likely a combinations of these pure effects.970.5 1.0 1.5 2.0Testing rate τ (rel. to baseline)250275300Annual incidence rateSensitivity of the basic modelDirect Differential MethodSimulationFigure 4.7: Sensitivity of the annual incidence rate as it depends on the test-ing rate τ , using the parameter values from Section 4.5. The linear ap-proximation provided by the Direct Differentiation method is accuratefor parameter values close to the initial value.The emigration rate e would need to be increased by a factor of 11.5, from0.05 year−1 to 0.58 year−1, which would mean that the average length of time ofsexual activity is only 1/0.58 = 1.7 years and implies for the basic reproductionnumber R0 = 0.20. Instead, the contact rate r could be reduced by a factor of 3.3from 64.5 to 19.7 risky annual sex events, which implies R0 = 0.51. When vary-ing the per-encounter risk of unaware individuals, pU , the best fit is obtained forminimal values of pU . At the smallest reasonable value, pU = pA, the model stillpredicts almost twice as many newly detected infections as desired (1552 insteadof 806, R0 = 1.57). On the other hand, a perfect fit can be found when reducingthe per-encounter risk of aware individuals, pA, by a factor of 4.0 from 0.122%to 0.031% (R0 = 0.50). Next, a 12.9 fold reduction of the testing rate τ from2.16 year−1 to 0.17 year−1, implying R0 = 2.39 would also make the model pre-dictions match BCCDC’s number. Finally, decreasing the total size of the at-riskVancouver MSM population by a factor of 2.07, which does not change R0 = 1.65,also results in a perfect fit. Naturally, combinations of the adjustments above couldalso be considered.984.8 Discussion of the basic modelThe basic model predicts that the Vancouver MSM epidemic is going to be relativelystable for the next five years. At the current testing rate the number of individualswho are unaware of their infection is going to slowly decrease. This slowly reducesthe annual incidence rate, and hence eventually leads to a slow decrease in the totalnumber of HIV positive individuals.From the sensitivity analysis we estimate the total number of new infectionsthat are averted if GCO is successful at increasing the testing rate. The estimated30 (11-89) averted infections in five years should be considered when analyzingthe cost-effectiveness of GCO or similar programs. In fact, the sensitivity analysisprovided here also allows a quick way to estimate the impact of other interventionsthat modify any of the model parameters, such as a program to reduce the per-encounter risk of infection, or the frequency of risky events.The predicted number of newly detected infections in the next five years isabout twice as high as the corresponding records in the previous five years, whichimplies that the basic model may not account for important effects, or that some ofthe collected behavioural data may be inaccurate. Hence we individually adjustedeach model parameter to fit the observed size of the epidemic. For some parametersthis results in values that are unlikely, but other findings suggest very reasonableadjustments: The reported rate of sexual encounters r may well be an overestimate.Further, our assumption that the main risk-reduction strategy of individuals whoare aware of their infection is using condoms may be overly pessimistic. Indeed,adjusting risk behaviour, serosorting and treatment may all contribute to a largerreduction in the per-encounter risk of transmission pA. In particular, a combinationof the two effects above, reducing the number of sex partners and per-encounterrisk, is very plausible and would be sufficient to explain the gap between the modelpredictions and epidemiological observations. Finally, the at-risk MSM populationin Vancouver may be smaller than previously estimated, and reducing N by halfwould also be sufficient to close the gap.The basic model assumes a very simplified view of the MSM epidemic in Van-couver. When exploring the survey and grid data it becomes apparent that risk andtesting behaviour varies widely in the at-risk population. In the remainder of this99chapter we discuss models that stratify the population according to their risk andtesting behaviour, resulting in more realistic models and (hopefully) more accuratepredictions. Nevertheless, it is valuable to study the methodology and predictionsfrom the basic model, as they will serve as a foundation for more sophisticatedmodels.4.9 The full model with heterogeneous testing patternsand risk behaviorThe basic model (4.2) assumes that the Vancouver MSM population is homoge-neous in their risk behaviour and testing pattern. However, when looking at thedata in more detail it becomes apparent that reality is more complicated. Indeed,studying the observed testing patterns reveals that testers can be classified as fre-quent testers, regular testers, and non-testers. Equally importantly, the risk of in-fection can broadly be categorized as high and low risk. The existence of a coregroup or super-spreaders has been noticed and studied for HIV and other diseasesin textbooks and the literature [7, 12, 24, 45, 90, 102, 118]. To reflect these obser-vations we extend the basic model by compartmentalizing the total population intosix groups, according to their risk behaviour and testing pattern, see Figure 4.8.This stratification also implies that the effect of GCO can be modelled more re-alistically: By advertising and facilitating regular STI testing, GCO aims at encour-aging at-risk individuals to adopt a regular testing pattern and to test frequently.Instead of modifying the individual testing rates of each compartment, we modelthe effect of GCO as increasing the likelihood that an individual who never tests ismore likely to become a regular tester, and that regular testers are more likely tobecome frequent testers. As before, GCO does not affect the risk behavior.There are two natural assumptions about how to model the contact mixing be-tween the testing and risk groups in the full model. We assume that a person’schoice of sexual partner is not directly influenced by their partner’s testing pattern,but may be influenced by the partner’s risk behaviour. Individuals in the same riskgroup may look for sex partners in similar venues or websites, and may have asimilar preference for sexual acts, which may favour mixing within the same riskgroup. How much mixing between risk groups occurs is difficult to measure di-100LOW/NO TEST LOW/FREQHIGH/REG HIGH/FREQNo testing Frequent testingHigh riskLow riskGet Checked OnlineHIGH/NO TESTRegular testingLOW/REG Figure 4.8: The full model accounts for two risk and three testing categories,and each resulting compartment is modeled using the basic model. Byfacilitating testing GCO encourages individuals to increase their testingfrequency. We assume that GCO does not affect risk behavior.rectly and can’t be estimated from our data, so we assume both extreme cases toobtain a lower and upper estimate for the effect of contact mixing.4.9.1 No contact mixing between risk groupsHere we assume that risky events only occur between individuals of the same riskcategory. After all, MSM in the same risk category may look for partners at similarvenues or using similar other channels, and may share sexual preferences. Thisassumption leads to the following system of equations, for i = 1,2 and j = 1,2,3,dSi jdt= e(Ui j +Ai j)−Si jri p(i)U ∑3k=1Uik + p(i)A ∑3k=1 AikNi+ transfer[Si j],dUi jdt= Si jrip(i)U ∑3k=1Uik + p(i)A ∑3k=1 AikNi− (e+ τ j)Ui j + transfer[Ui j],dAi jdt= τ jUi j− eAi j + transfer[Ai j],dNEWINFECTEDdt=2∑i=13∑j=1Si jrip(i)U ∑3k=1Uik + p(i)A ∑3k=1 AikNi,dNEWDETECTEDdt=2∑i=13∑j=1τ jUi j.(4.3)101Here transfer[Xi j] denotes the transfer from other subgroups, i.e.,transfer[Xi j] = h j−1, jXi, j−1+h j+1, jXi, j+1+ vi−1,iXi−1, j + vi+1,iXi+1, j− (h j, j−1+h j, j+1+ vi,i−1+ vi,i+1)Xi, j,where hk,` is the rate of horizontal transition from the k-th to the `-th column, andvk,` is the rate of vertical transition from the k-th to the `-th row.4.9.2 Full mixing between risk groupsHere we assume that individuals choose their sex partner independently of their ortheir partner’s risk group. If two individuals from different risk groups mix it isreasonable to assume that the per-encounter risk of disease transmission p(1,2)X isbetween the individual per-encounter risks, p(1)X ≤ p(1,2)X ≤ p(2)X . For simplicity wechoose the arithmetic mean and hence definep(i1,i2)U =p(i1)U + p(i2)U2, p(i1,i2)A =p(i1)A + p(i2)A2, (4.4)for i1, i2 = 1,2. With this notation we obtain the system of differential equationsfor the full model with between-risk-group mixing by replacing the mixing term in(4.3) withSrir1(p(1,i)U ∑3k=1U1k + p(1,i)A ∑3k=1 A1k)+ r2(p(2,i)U ∑3k=1U2k + p(2,i)A ∑3k=1 A2k)r1N1+ r2N2.(4.5)4.10 Parameterizing the full models from the survey andgrid dataThe full model requires additional parameters to those for the basic model. Insteadof one average testing rate for the entire population we now consider three testinggroups, each with their own testing rate. Similarly, the total average contact rateand per-encounter risk is now divided into a high risk and low risk group. Wefurther must specify the transition rates between the various compartments, andextract suitable initial conditions. All other parameters can be carried over from102the basic model: The total population size, the total fraction of infected individualsthat are aware or unaware of their infection, the population-turnover rate e and thebiological per-exposure risk of HIV transmission.4.10.1 Obtaining the testing rate τ and the horizontal transition ratesWe divide the entire population into three categories according to their testing be-haviour. The first group is those who never test, hence we have τ1 = 0. FromFigure 4.5 we split the remaining population into regular testers, who test every 6-12 months (58.3%), and frequent testers who test every 3 months (41.7%). Takingthe weighted average of the rates of those who test every 6-12 months we obtainτ2 = 1.66 year−1, while the rate for frequent testers is 4 year−1.To obtain the transition rate h2,3 from the regular testers to the frequent testerswe calculate the fraction of survey participants who change their testing patternbetween the three different time points of the survey. Assuming a constant prob-ability per unit time of switching from regular testing to frequent testing, leadingto an exponential distribution waiting time for a switch, the fraction f of regulartesters who were not frequent testers at time t satisfiesf = e−h2,3t , h2,3 =− ln( f )t . (4.6)Comparing between the three time points of the survey this gives us three esti-mates for h2,3, 0.41 year−1 (1st and 2nd time point), 0.26 year−1 (2nd and 3rdtime point), 0.20 year−1 (1st and 3rd time point), which we average to obtainh2,3 = 0.29 year−1.Similarly, for the rate h3,2 at which frequent tester become regular testers, wecalculate the three estimates 0.28 year−1 (1st and 2nd time point), 0.27 year−1 (2ndand 3rd time point) and 0.31 year−1 (1st and 3rd time point), which we average tofind h3,2 = 0.28 year−1.Our model does not explicitly account for a direct transition between non-testers and frequent testers, we assume that individuals become regular testers forsome amount of time before they transition between the extremes. To calculatethe transition rates between the non-testing and regular testing group we set up asimple linear system of differential equations for the testing part of the full model.103Initially every individual starts in the never tested group N. Following the horizon-tal transition rules individuals in the regular testing group R are tested at rate τ2and individuals in the frequent testing group F are tested at rate τ3. This leads tothe following linear ODE:dNdt= h2,1R−h1,2N, N(0) = 1,dRdt= h1,2N+h3,2F− (h2,1+h2,3+ τ2)R, R(0) = 0,dFdt= h2,3R− (h32+ τ3)F, F(0) = 0,dTdt= τ2R+ τ3F, T (0) = 0.(4.7)From the Sex Now survey [15] we estimate, as in Section 4.5.3, that the averagefraction of those who ever tested by age 25 and 48 is 69% and 83%, respectively.Again assuming a minimum age of 15 years this yields T (10) = 0.69 and T (33) =0.83. We use the unknown transition parameters h1,2 and h2,1 to fit the solution ofthe ODE above with these constrains.The fit is sensitive to the forward transition rate h1,2, but insensitive to thebackwards transition rate h2,1. This allows us to estimate h1,2 = 0.08 year−1 withconfidence, but h2,1 is more difficult to estimate. A natural simplification would beto set h2,1 = 0 by arguing that the number of individuals who were regular testersand then stopped testing altogether is relatively small. Another natural assumptionis to set h2,1 = h1,2 and assume that individuals are just as likely to become regulartesters as they are to loose the regular testing pattern. The squared difference be-tween the model prediction and the real testing rates is almost identical for eitherchoice of h2,1, and we choose h2,1 = h1,2 = 0.08 year−1.4.10.2 Obtaining the rate of risky events and the vertical transitionratesIn order to split the population into a low-risk and high-risk group we first cal-culate, as in Section 4.5, the per-encounter risk as reported in the grid, pU , foreach participant and partner. A participant’s total force of infection is then calcu-lated as β = ∑partners rpartner ppartnerU . Using a two-means clustering algorithm [48]104010200.0010.0100.1001.0005.000Force of infection β = rpUCountHigh riskLow riskFigure 4.9: Per-participant force of infection β = ∑partners rpartner ppartnerU . Weuse a two-means clustering algorithm to assign each individual into alow-risk or high-risk group according to their force of infection fromthis bimodal distribution. Notice the different orders of magnitude ashighlighted by the logarithmic scale on the x axis.we define the cut-off between the low and high risk group as the decision bound-ary β = 1.485 year−1, see Figure 4.9. This cutoff implies that 8.3% of the studypopulation is classified as high risk. Averaging the corresponding risk parame-ters for each group yields for the low-risk group p(1)U = 0.306% (0.219%-0.445%),p(1)A = 0.108% (0.077%-0.155%), r1 = 51.7 year−1 (30.5 year−1-83.5 year−1) andfor the high-risk group p(2)U = 1.391% (1.013%-1.914%), p(2)A = 0.286% (0.209%-0.394%), r2 = 205.5 year−1 (122.7 year−1-337.7 year−1). The ranges are obtainedby using the 95% confidence intervals from Table 4.1.With this we calculate the vertical transition rates between the risk groups inthe same way as in Section 4.10.1 above, which yields v1,2 = 0.137 year−1 andv2,1 = 2.373 year−1.Parameter Interpretation Value SourceN Total size of sexually 20,000 [106]105Parameter Interpretation Value Sourceactive MSM populationS(0) Initial number of 16,380 [106]uninfected MSMU(0) Initial number of HIV positive 500 [106]MSM unaware of their infectionA(0) Initial number of HIV positive 3,120 [106]MSM aware of their infectionf1,1 Initial fraction of MSM who 16.5% [106], textare low risk and do not testf1,2 Initial fraction of MSM who 43.8% [106], textare low risk and test regularlyf1,1 Initial fraction of MSM who 31.3% [106], textare low risk and test frequentlyf2,1 Initial fraction of MSM who 1.5% [106], textare high risk and do not testf2,2 Initial fraction of MSM who 4.0% [106], textare high risk and test regularlyf2,3 Initial fraction of MSM who 2.8% [106], textare high risk and test frequently1/e Average time of being 20 years textsexual active and at-riskτ1 Average rate of HIV tests 0 year−1 text(non-testers)τ2 Average rate of HIV tests 1.66 year−1 text(regular testers)τ3 Average rate of HIV tests 4 year−1 text(frequent testers)h1,2 Average transition rate from 0.08 year−1 [15], textnon-tester to regular testerh2,1 Average transition rate from 0.08 year−1 [15], textregular tester to non-tester106Parameter Interpretation Value Sourceh2,3 Average transition rate from 0.29 year−1 textregular to frequent testerh3,2 Average transition rate from 0.28 year−1 textfrequent to regular testerr1 Average number of risky 51.7 year−1 [85, 89, 107],encounters (low-risk group) 30.5-83.5 textr2 Average number of risky 205.5 year−1 [85, 89, 107],encounters (high-risk group) 122.7-337.7 textp(1)U Average per-encounter risk 0.306% [85, 89, 107],among unaware individual 0.219-0.445 text(low-risk group)p(2)U Average per-encounter risk 1.391% [85, 89, 107]among unaware individual 1.013-1.914 text(high-risk group)p(1)A Average per-encounter risk 0.108% [85, 89, 107],among aware individual 0.077-0.155 text(low-risk group)p(2)A Average per-encounter risk 0.286% [85, 89, 107],among aware individual 0.209-0.394 text(high-risk group)v1,2 Average transition rate 0.137 year−1 textfrom low to high riskv2,1 Average transition rate 2.373 year−1 textfrom high to low riskTable 4.4: Model parameters for the full model, with 95% confidence intervalor lower and upper bound, if applicable.4.11 ResultsAs discussed for the basic model, the focus of our modelling work is to estimatethe immediate impact of GCO, so we again focus on the first five years of the model1070 1 2 3 4 5Time in years01000200030004000Compartment sizeHomogeneous mixingUnawareAwarenew infectionsnew detected(a) Estimates from the full modelwith homogeneous mixing, using the pa-rameters from Section 4.10. The modelpredicts a total of 2314 new infections inthe next five years.0 1 2 3 4 5Time in years01000200030004000Compartment sizeHeterogeneous mixingUnawareAwarenew infectionsnew detected(b) Estimates from the full modelwith homogeneous mixing, using the pa-rameters from Section 4.10. The modelpredicts a total of 1878 new infections inthe next five years.Figure 4.10: Model estimates for the spread of HIV prevalence in the nextfive years, without GCO, for the full models with homogeneous andheterogeneous mixing.predictions. Both mixing assumptions result in reasonable projections for the totalnumber of new infections in the next five years, 2314 (384-7559) (463 (77-1512)average annual) for the model with homogeneous mixing and 1878 (333-6612)(376 (67-1322) average annual) for the model with heterogeneous mixing. Themodel predictions for the number of newly detected infections in the five year are2063 (696-5844) (413 (139-1169) average annual) for the model with homoge-neous mixing and 1757 (660-5081) (351 (132-1016) average annual) for the modelwith heterogeneous mixing. As with the basic model this is about twice as largeas the 806 newly detected infections that the BCCDC reported between 2008-20012[34].4.11.1 The basic reproduction number R0Calculating the basic reproduction number for the full model is more complicatedthan for the basic model, because we obtain larger and more complicated matrices.We are able to derive the matrices of new infections F and transfers of infectionsV , but the analytical expression of the next generation matrix G and R0 become toocomplicated to be useful. By exploiting the block structure of the matrices F andV we are able to simplify the required computations for R0, which we ultimately108solve numerically.Let X = (U11,U12,U13,U21,U22,U23,A11,A12,A13,A21,A22,A23) be the vectorof all infectious compartments. The matrix of transfers of infections is the samefor both mixing assumptions. It can be written as a block matrixV =[−Σ−Γ+∆ 06×6Γ −Σ+∆].Here Σ = eI6×6, Γ = diag(τ1,τ2,τ3,τ1,τ2,τ3) and ∆ is the matrix that stems fromthe horizontal and vertical transfer terms,∆=[∆1,1 ∆1,2∆2,1 ∆2,2],where ∆1,2 = v21I3×3, ∆2,1 = v12I3×3,∆1,1 =−h12− v12 h21 0h12 −h21−h23− v12 h320 h23 −h32− v12 ,∆2,2 =−h12− v21 h21 0h12 −h21−h23− v21 h320 h23 −h32− v21 .Similar to the calculations for the basic model no new infectious arrive in theaware compartments, so that the bottom half of F is all zeros. Hence the matrix ofnew infections has the formF =[F11 F1206×6 06×6].109For the homogeneous model we haveF11 =S11r1N1p(1)US11r1N1p(1)US11r1N1p(1)U 0 0 0S12r1N1p(1)US12r1N1p(1)US12r1N1p(1)U 0 0 0S13r1N1p(1)US13r1N1p(1)US13r1N1p(1)U 0 0 00 0 0 S21r2N2 p(2)US21r2N2p(2)US21r2N2p(2)U0 0 0 S22r2N2 p(2)US22r2N2p(2)US22r2N2p(2)U0 0 0 S23r2N2 p(2)US23r2N2p(2)US23r2N2p(2)U,F12 =S11r1N1p(1)AS11r1N1p(1)AS11r1N1p(1)A 0 0 0S12r1N1p(1)AS12r1N1p(1)AS12r1N1p(1)A 0 0 0S13r1N1p(1)AS13r1N1p(1)AS13r1N1p(1)A 0 0 00 0 0 S21r2N2 p(2)AS21r2N2p(2)AS21r2N2p(2)A0 0 0 S22r2N2 p(2)AS22r2N2p(2)AS22r2N2p(2)A0 0 0 S23r2N2 p(2)AS23r2N2p(2)AS23r2N2p(2)A,and for the model with heterogeneous mixing we haveF11 =1r1N1+ r2N2S11r21 p(1)U S11r21 p(1)U S11r21 p(1)US12r21 p(1)U S12r21 p(1)U S12r21 p(1)US13r21 p(1)U S13r21 p(1)U S13r21 p(1)US21r2r1 p(12)U S21r2r1 p(12)U S21r2r1 p(12)US22r2r1 p(12)U S22r2r1 p(12)U S22r2r1 p(12)US23r2r1 p(12)U S23r2r1 p(12)U S23r2r1 p(12)US11r1r2 p(12)U S11r1r2 p(12)U S11r1r2 p(12)US12r1r2 p(12)U S12r1r2 p(12)U S12r1r2 p(12)US13r1r2 p(12)U S13r1r2 p(12)U S13r1r2 p(12)US21r22 p(2)U S21r22 p(2)U S21r22 p(2)US22r22 p(2)U S22r22 p(2)U S22r22 p(2)US23r22 p(2)U S23r22 p(2)U S23r22 p(2)U,110F12 =1r1N1+ r2N2S11r21 p(1)A S11r21 p(1)A S11r21 p(1)AS12r21 p(1)A S12r21 p(1)A S12r21 p(1)AS13r21 p(1)A S13r21 p(1)A S13r21 p(1)AS21r2r1 p(12)A S21r2r1 p(12)A S21r2r1 p(12)AS22r2r1 p(12)A S22r2r1 p(12)A S22r2r1 p(12)AS23r2r1 p(12)A S23r2r1 p(12)A S23r2r1 p(12)AS11r1r2 p(12)A S11r1r2 p(12)A S11r1r2 p(12)AS12r1r2 p(12)A S12r1r2 p(12)A S12r1r2 p(12)AS13r1r2 p(12)A S13r1r2 p(12)A S13r1r2 p(12)AS21r22 p(2)A S21r22 p(2)A S21r22 p(2)AS22r22 p(2)A S22r22 p(2)A S22r22 p(2)AS23r22 p(2)A S23r22 p(2)A S23r22 p(2)A.With this notation X˙ = (F +V )X for either model and the next generationmatrix G =−FV−1 is quickly calculated to beG =−[(F11−F12(−Σ+∆)−1Γ)(−Σ−Γ+∆)−1 F12(−Σ+∆)−106×6 06×6].Note that all inverse matrices exist as the inverse of strictly diagonally dominantmatrices. The set of eigenvalues of an upper triangular block matrix is identical tothe set of eigenvalues of the diagonal blocks, hence the basic reproductive numberR0 is the dominant eigenvalue of the upper-left matrix,R0 = max{σ(−(F11−F12(−Σ+∆)−1Γ)(−Σ−Γ+∆)−1)} . (4.8)We calculate this expression numerically, which yields for the parameter valuesobtain in Section 4.10 a reproductive number of Rhom0 = 2.73 for the model withhomogeneous mixing, and Rhet0 = 2.50 for the model with heterogeneous mixing.4.11.2 SensitivityIn the basic model we model the effect of GCO as increasing the average popula-tion testing rate. In the full model we can be more specific: By facilitating testing1110.5 1.0 1.5 2.0Effect of GCO350400450500Annual incidence rateSensitivity homogeneous mixingDirect Differential MethodSimulation(a) Sensitivity of the annual inci-dence rate on the effect of GCO for thefull model with homogeneous mixing.0.5 1.0 1.5 2.0Effect of GCO350400450500Annual incidence rateSensitivity heterogeneous mixingDirect Differential MethodSimulation(b) Sensitivity of the annual inci-dence rate on the effect of GCO for thefull model heterogeneous mixing.Figure 4.11: The effect of GCO is that it increases the horizontal forward tran-sition rates and decreases the horizontal backward transition rates ofthe full model. This increasing the rate at which individuals becomeregular and frequent testers, and decreases the rate at which peopleswitch to a less frequent testing behaviour.and by setting automatic reminders GCO achieves its increase in the testing rate byencouraging individuals who are currently not testing regularly to pick up a reg-ular testing pattern, and by encouraging individuals with a regular testing patternbecome frequent testers. In our model this effect is reflected by the horizontal tran-sition rates between the three testing compartments. We therefore model the effectof GCO as increasing the horizontal forward transition rates, and decreasing thehorizontal backward transition rates by a certain factor.It is possible to calculate the sensitivity by using the Direct Differential method,but this approach does not scale well with the number of equations and variables.Instead we calculate the sensitivity by running the same model repeatedly, varyingone parameter value at a time, and comparing the outcome. We are interested inthe total number of averted infections in the first five years, so we compare themodel predictions of the baseline parameters with those from the model where thehorizontal transition rates have been modified, see Figure 4.11.If GCO manages to increase the horizontal forward transition rates by 25% anddecrease the horizontal backward transition rate to 80%, the model with homoge-neous mixing predicts that 13.3 (1.6-34.3) new HIV infections could be avertedannually (66.4 (8.0-171.5) averted infections in five years), while the model with112heterogeneous mixing predicts a decrease by 7.3 (1.1-42.0) annual infections (36.4(5.4-210.1) averted infections in five years).4.12 Discussion and future workIn this chapter we use mathematical models to predict the impact of Get CheckedOnline (GCO), a novel program by the British Columbia Centre for Disease Control(BCCDC) to facilitate testing for sexually transmitted infections (STIS). We first usea basic model where we average all risk and testing behaviour parameters, whichwe then extend into a full model with various risk and testing groups, using twonatural assumptions for the mixing between the risk groups. Our models are basedon parameters that we extract from BCCDC data collected from HIV negative MSMwho tested at a health Initiative for Men (HIM) sexual health clinic in Vancouverbetween 2011 and 2012. We give a detailed derivation of how the model parametersare extracted from the raw data set. The infection rate β is split into a rate of riskyencounters and a per-encounter probability of infection, both of which are obtainedindependently from the data. Using a simple clustering algorithm we identify andparameterize a low risk and high risk group in the MSM population. The resultingaverage risk parameters differ by more than one order of magnitude, which hasimportant consequences on the model predictions. For the testing rate we adjustfor the fact that all study participants were recruited at a testing clinic.We then calculate the basic reproductive number of the Vancouver HIV epi-demic in the MSM community, which predicts that the epidemic is still growing,albeit rather slowly. Using sensitivity analysis we estimate the impact of GCO onthe number of new infections in the first five years of the program. All modelspredict that even a modest increase in the testing rates would result in a valuablereduction of the number of new HIV infections.We validate our models by comparing the predicted number of newly detectedinfection with those reported by the BCCDC in recent years. Our models consis-tently overestimate the reported numbers by a factor of 2, which indicates thateither BCCDC’s numbers underestimate the size of the epidemic, or that our modelparameters do not accurately represent the entire active MSM community. We there-fore fit the parameter values that we extracted from our data such that the model113predictions match the epidemiological observations. Our findings are that the dif-ference in risk-behaviour between individuals who are unaware and aware of theirinfection be larger than we anticipated, that is, aware individuals apply effectiverisk-reduction strategies. An alternative explanation is that the size of the at-riskpopulation may be smaller than previously estimated. Of course, in reality theremay be a combination of these effects.It is curious that the full model, which distinguished between two risk groupsand three testing groups, predicts a larger number of infections and a larger basicreproductive number. This effect is highlighted when the contact mixing is limitedto partners from the same risk groups. This suggests that the epidemic is drivenby a small but very active high-risk group. Such a finding may have tremendousimpact on how to fight the disease spread, in particular if this core group is difficultto identify and reach with interventions. This effect is well known in epidemiol-ogy and has been described in detail in many articles and standard textbooks, e.g.,[7, 12, 45, 90, 102, 118]. For the Vancouver epidemic this result underscores theimportance of identifying and reaching out to those at the highest risk of infec-tion, which, if achieved, can have a great positive effect on the health of the entirepopulation.Our models are based on many assumptions and simplifications which offerroom for future work. To begin with, a key model parameter, the number of sexu-ally active MSM in Vancouver, is difficult to estimate and not very well known inthe literature. More important than the total potential population size is the numberof individuals who are sexually active and at risk, which is even less well defined.Further, our ODE models do not account for the formation of partnerships. Thiskey aspect of human relationships, and hence of the HIV transmission network, isextremely challenging to get meaningful data on. ODE models with partnershipformation are not uncommon in the modelling of epidemics, see e.g., [24], butwould quickly make the resulting system of differential equations too complicatedto handle conveniently, and would most likely violate the underlying assumptionof all ODE models that each subgroup should be “large”.A natural extension of the work we presented here is an agent-based model,where each agent represents a MSM that draws its parameters from those extractedfrom our dataset or others. This could naturally allow for partner formation, and114could easily account for a dependence of the rate of risky activities and the HIVtesting rate. Such a model could also incorporate the effect of GCO in ways thatare not possible with ODE models, such as the spread via word-of-mouth or byreaching out to a user’s sexual partners.Future work should also seek to incorporate data from HIV positive individu-als, in particular how their risk behaviour changed when they learned about theirinfection. Further, the population could be split into more distinct groups, such asrecently infected individuals with an increased risk of transmission, and individualson treatment which a reduced risk of transmission.115Chapter 5Assessing the optimal virulence ofmalaria-targeting mosquitopathogens: a mathematical studyof engineered MetarhiziumanisopliaeThe content of this chapter and the corresponding Appendix C stem from a courseproject in MATH 561: Mathematics of Infectious Diseases and Immunology taughtin 2011 at UBC, the results of which were published in Malaria Journal [66]. I amthe lead author of the publication, which is joint authored with Michael Lindstrom,Anja Gumpinger, Jielin Zhu and Daniel Coombs. The journal article is distributedunder the terms of the Creative Commons Attribution License (CC-BY) and hasbeen modified slightly to fit the style and context of this thesis.Abstract:Background: Metarhizium anisopliae is a naturally occurring fungal pathogen ofmosquitoes. Recently, Metarhizium has been engineered to act against malariaby directly killing the disease agent within mosquito vectors and also effectively116blocking onward transmission. It has been proposed that efforts should be made tominimize the virulence of the fungal pathogen, in order to slow the developmentof resistant mosquitoes following an actual deployment.Results: Two mathematical models were developed and analysed to examine theefficacy of the fungal pathogen. It was found that, in many plausible scenarios,the best effects are achieved with a reduced or minimal pathogen virulence, even ifthe likelihood of resistance to the fungus is negligible. The results for both modelsdepend on the interplay between two main effects: the ability of the fungus toreduce the mosquito population, and the ability of fungus-infected mosquitoes tocompete for resources with non-fungus-infected mosquitoes.Conclusions: The results indicate that there is no obvious choice of virulence forengineered Metarhizium or similar pathogens, and that all available informationregarding the population ecology of the combined mosquito-fungus system shouldbe carefully considered. The models provide a basic framework for examinationof anti-malarial mosquito pathogens that should be extended and improved as newlaboratory and field data become available.5.1 BackgroundThe major route of malaria transmission to humans is via blood feeding of femaleAnopheles mosquitoes (principally Anopheles gambiae and Anopheles funestus).Therefore, major efforts have been made to control mosquito populations in ar-eas where malaria is prevalent. When first introduced, chemical insecticides werevery efficient at reducing malaria prevalence in humans, although not without en-vironmental damage. However, resistance has been observed to develop rapidly tobroadly-used insecticides and there is a lack of new chemical agents [30, 105]. Forthis reason, fungal entomopathogens have been under extensive investigation asalternatives for mosquito control [11, 98]. Diverse fungal pathogens of mosquitoesexist in nature and additionally can be genetically modified to generate desirableproperties.The focus of this work is the application of engineered fungal pathogens of117mosquitoes that can neutralize or kill malarial sporozoites in the mosquito vectoritself, preventing onward transmission to humans. This is motivated by the re-cent development of an engineered (Metarhizium anisopliae) fungus strain [31].Metarhizium is a natural parasite of mosquitoes that infects through direct con-tact with the insect cuticle, and therefore is appropriate for control strategies basedon local spraying indoors or baited traps. Recombinant strains of Metarhiziumhave been designed to (i) block attachment of malarial sporozoites to salivaryglands of the mosquito; and (ii) neutralize or kill Plasmodium falciparum directlywithin the mosquito hemolymph. Under laboratory conditions, these engineeredpathogens were found to substantially reduce sporozoite counts in the salivaryglands of mosquitoes, compared to both fungus-uninfected mosquitoes and wild-type Metarhizium [31]. This raises the possibility of producing a biological agentwhich targets the malaria parasite within the mosquito, and is thus able to disruptthe transmission cycle and reduce the prevalence of malaria in humans.Interestingly, because fungal pathogens such as Metarhizium do not kill in-fected mosquitoes until their later life-stages, after the majority of mosquito re-production has occurred, it is believed that the selection pressure for mosquitoresistance is quite low and therefore resistance should develop slowly even underwidespread deployment [104]. Mosquito resistance to fungal biopesticides of thistype has not been reported to date. Nonetheless, the concern of emerging resistanceleads Fang et al. [31] to argue against engineering Metarhizium to kill mosquitoesfaster. This argument stands in contrast to a strategy where fungal species areapplied in conjunction with chemical pesticides to reduce the overall numbers ofmosquitoes (discussed in [11]).However, even in the absence of developing resistance, an interesting questionremains about how to optimize Metarhizium or similar agents in terms of virulenceagainst mosquitoes: should one expect a high virulence agent to outperform analternative low-virulence strain? Indeed, if a high-virulence mosquito pathogenstrain has worse performance than a low-virulence strain even in the absence ofresistance, the threat of resistance additionally counts against it. (In this context,performance is measured in terms of reducing human malaria prevalence.) Thischapter presents simple mathematical models to investigate this question. It willbe shown that the optimal choice of virulence level is not obvious, and depends118quite sensitively on the details of the complex ecological system. In certain cir-cumstances, it is expected to be preferable to apply a low-virulence agent whichpenetrates the mosquito population, and is thus able to reduce the prevalence ofmalaria parasites in mosquitoes and humans, even though the overall populationlevel of mosquitoes is not strongly impacted. Under other circumstances, a high-virulence fungus that more effectively reduces the total mosquito population isexpected to be preferable.Mathematical modelling has been used in the study of malaria and as a toolfor evaluating possible control strategies for over a century. The first mathematicalmodels for malaria transmission were pioneered by Ross in 1911 [94] and devel-oped further by Macdonald [73] and Anderson and May [7]. More recent mathe-matical models distinguish between exposed and infectious humans and mosquitoesreflect the fact that humans can become (temporarily) immune, treated or vacci-nated, allow spatial heterogeneity, or include time-dependent parameters to ac-count for environmental factors such as rainfall and humidity (see for example[3, 19, 64, 99]). The current work presents results from simple models for this newagent and potential improvements for future work are described.5.2 MethodsTwo prototype mathematical models are proposed that take into account the mostfundamental properties of the malaria parasite, transmission between human hostand mosquito vector, and the fungal mosquito pathogen. To derive the models in asimple form, it is necessary to make a number of simplifying assumptions. Theseassumptions could be relaxed in future versions of the model, at the expense ofanalytical and intuitive understanding of the model results. Some possibilities forthis work are described in the conclusions.5.2.1 Simplified model set-up and assumptions1. The total human population, H, is taken to be constant. This is roughlyequivalent to supposing that the population dynamics of mosquitoes, malariaparasites and fungal pathogens equilibrate rapidly compared to the humandemographic timescale. The (time-dependent) fraction of humans that are119able to infect mosquitoes with the malaria parasite is denoted by h(t) andthese patients leave the infected group at rate ρ (for instance due to treatment,recovery or death). The human population is taken to be homogeneous in allother ways and the incubation period in the human host is assumed to benegligible compared to the duration of infectiousness.2. The mosquito population is represented in three parts: uninfected (suscep-tible), infected with the malaria parasite, and fungus-infected. These threepopulations are denoted by S(t), I(t), and F(t), respectively. It is necessaryto make some simplifying assumptions concerning the population dynamicsof mosquitoes, with and without the malaria parasite or the fungal pathogen.A commonly simplified model for biological populations is that of logis-tic growth [28]. This model has been applied in several previous works onmalaria [18, 19, 35, 80]. Here, it is assumed that, in the absence of themalaria parasite and the fungus, the mosquito population experiences logis-tic growth with innate growth rate κ˜ and carrying capacity P˜. All mosquitoesalso suffer a natural background death with rate denoted by µ , which is as-sumed to be independent of infection with the malaria parasite [97]. Analternative model of mosquito population dynamics, that includes larval andadult stages, is described below.3. It is assumed that every mosquito has a human biting rate of β , irrespec-tive of its infection status, and that if the human host is infectious, the bitealways transmits the malaria parasite to the mosquito. On the other handif an infected mosquito bites an uninfected human, the human will developtransmissible malaria with probability γ .4. The fungal pathogen is constantly applied to the environment, and causesmosquitoes to transition from the S and I classes to the F class continuously,at constant rate α .5. The fungal virulence (additional death of mosquitos due to fungal infection)is denoted by σ . To explicitly compare the natural mosquito death rate µwith the fungal virulence σ , one may rewrite the classical logistic growth120equation dS/dt = κ˜S(1−S/P˜) in the form presented below, where κ = κ˜+µand P = P˜κ/(κ−µ).6. The fungus is assumed to be perfectly, permanently and immediately effec-tive at blocking malaria transmission to and from fungus-infected mosquitoes.Under these assumptions, the following system of ordinary differential equa-tions can be put forward (t denotes time):dhdt= βγIH(1−h)−ρh,dSdt= κ (S+ I+F)(1− S+ I+FP)−βSh− (µ+α)S,dIdt= βSh− (µ+α)I,dFdt= α(S+ I)− (µ+σ)F.(5.1)A model schematic is given in Figure 5.1.5.2.2 Life-stage-structured mosquito model and assumptionsRecent field studies strongly indicate that mosquito populations are controlled viadensity-dependent regulation at the larval stage of development [100, 112]. Thesimplified model above was derived under the assumption that these effects can becaptured via a logistic model for the adult mosquito population, since the larvalpopulation is not modelled explicitly. This simplification allows for fairly cleananalytical results, but the biological system may have been oversimplified. Ad-ditionally, vertical transmission is a feature of certain fungal symbionts of insects[36]. Therefore, a possible improvement of the engineered fungus would be a verti-cally transmissible variant, that could be passed from mosquitoes to their offspring.To accommodate the additional realism of larval competition for resources, and toconsider vertical transmission, an alternative model is now put forward. This modelis built under the following set of additional assumptions:1. Adult mosquitoes produce new larvae at a constant rate κc, irrespective ofinfections with fungus or malaria parasites. The offspring of fungal-infected121susceptibleinfectedwith fungusHumansρββγμ+σκαμμκsusceptibleinfectedκSIαFh1−hMosquitosFigure 5.1: Simplified model. The fraction of infected humans in the pop-ulation is given by h. Infection of susceptible mosquitoes S occurs atmass-action rate β while removal/recovery occurs at a rate ρ . Infectedmosquitoes I infect susceptible humans with probability γ , given anencounter. Malaria infection does not significantly alter the mosquitodeath rate µ , but fungus infection, occurring with rate α reflecting theintensity of fungal application, increases the death rate by σ . Since nei-ther malaria nor the fungus is transmitted vertically in the simplifiedmodel all new-born mosquitoes (indicated by κ) are susceptible.mosquitoes are themselves infected with probability ξ , representing the prob-ability of vertical transmission of the fungal pathogen. The populations offungus-uninfected and fungus-infected larvae are denoted by LS(t) and LF(t)respectively. In the absence of information about larval infectibility, it is as-sumed that larvae are not directly infected by the fungus (although they maybe infected via vertical transmission), and that the fungus has no detrimentaleffects in the larval stage.2. Larvae compete for resources in a density-dependent manner, with the inten-sity of competition determined by the parameter κL.3. Larvae mature into adult mosquitoes at rate m. In contrast to the simplified122model, adult mosquitoes do not directly compete for resources.Under these additional assumptions, a new life-stage-structured model can beput forward:dhdt= βγI(1−h)H−ρh,dLSdt= κc(S+ I+(1−ξ )F)−κL (LS+LF)LS−mLS,dLFdt= κcξF−κL (LS+LF)LF −mLF ,dSdt= mLS−βSh− (µ+α)S,dIdt= βSh− (µ+α)I,dFdt= mLF +α(S+ I)− (µ+σ)F.(5.2)A model schematic is given in Figure 5.2.5.3 Results and DiscussionThe goal is now to study the level of malaria in humans (h) as a function of thefungal parameters: the spraying rate α , fungal virulence σ and fungal verticaltransmissibility ξ . For the simplified model, analytical results will be presentedand applied to find the optimal values of α and σ in terms of reducing malariain humans. For the life-stage-structured model, the situation is more complex andresults will be shown only for particular numerical values of the parameters. Inboth models, it is found that application of a highly virulent fungus as biopesticidemay not be the best strategy.123Figure 5.2: Life-stage structured model. In this model mosquitoes producelarvae at rate κc. Larvae may be fungal carriers (LF ) or fungus-free(LS) and undergo density-dependent competition (see text) with inten-sity parameter κL. Larvae mature to produce adult mosquitoes at ratem. The parameter ξ determines the degree of vertical transmissibility ofthe fungal pathogen.5.3.1 The simplified model with no fungusIf there is no fungus present in the system, the simplified model simplifies to thefollowing:dhdt= βγIH(1−h)−ρh,dSdt= κ (S+ I)(1− S+ IP)−βSh−µS,dIdt= βSh−µI.(5.3)This system has three relevant equilibria: (1) the trivial equilibrium (h,S, I) =(0,0,0) (no mosquitoes, no malaria); (2) the malaria-free equilibrium (h,S, I) =124(0,(1− µκ )P,0) (mosquitoes but no malaria) and (3) the endemic equilibriumh =β 2γP(κ−µ)−Hκµρβ (Hκρ+βγP(κ−µ)) ,S =µ(Hκρ+βγP(κ−µ))βγκ(β +µ),I =β 2γP(κ−µ)−Hκµρβγκ(β +µ).(5.4)From the malaria-free equilibrium it is observed that κ > µ is the basic require-ment for there to be mosquitoes in the system. This corresponds to the basicmosquito growth rate κ being large enough to outweigh mosquito death (and withno mosquitoes there can be no malaria).The key quantity determining whether malaria will exist in the system is thebasic reproduction number for the no-fungus system, R(NF)0 = β√γSm/(ρµH),where Sm = P(1− µκ ) is the mosquito population at the malaria-free steady state.This quantity can be calculated using the next-generation method [24]. The squareroot occurs in this formula because there are two steps per rounds of transmission,mosquito to human to mosquito, and the next-generation R0 is, by definition, aper-step quantity. The parameter β is not included in the square root because it de-termines the transmissibility human-vector and vector-human. It can also be shownthat if R(NF)0 < 1 then the malaria-free equilibrium is locally stable and the endemicequilibrium does not exist, while if R(NF)0 > 1 then the endemic equilibrium existsand is locally stable.5.3.2 Equilibrium analysis of the simplified modelThe simplified model including the fungus (5.1) supports three distinctive equilib-ria, which can be defined as the trivial, malaria-free and endemic equilibria. Thefollowing results on the local stability of these equilibria can then be proven (seeAppendix C for the proofs, which are lengthy but straightforward):1. The trivial equilibrium (h,S, I,F) = (0,0,0,0) is locally asymptotically sta-ble if and only if κ < (µ+α)(µ+σ)µ+α+σ . This condition is analogous to the condi-tion κ > µ for the model with no fungus, described above.1252. The malaria-free equilibriumhm = 0,Sm =P(µ+σ)µ+α+σ(1− (µ+α)(µ+σ)κ(µ+α+σ)),Im = 0,Fm =Pαµ+α+σ(1− (µ+α)(µ+σ)κ(µ+α+σ))exists in the positive plane and is locally asymptotically stable if and only ifboth of the following conditions are fulfilled:κ >(µ+α)(µ+σ)µ+α+σand R0 = β√γSmρ(µ+α)H< 1.The first condition corresponds to the survival of the mosquito population(exactly as for the trivial equilibrium). The second condition states that thebasic reproductive number for malaria, R0, must be subcritical.3. The endemic equilibriumhe =R20−1R20+β/(µ+α),Se =(1− βµ+α+βR20−1R20)Sm,Ie =βµ+α+βR20−1R20Sm,Fe = Fmexists in the positive plane and is locally asymptotically stable if and only ifboth of the following conditions are fulfilled:κ >(µ+α)(µ+σ)µ+α+σand R0 = β√γSmρ(µ+α)H> 1.126By comparing R0 for the simplified model to the equivalent no-fungus quantity(R(NF)0 ), it is possible to see the role of the spraying rate α in reducing the repro-ductive number of the malaria parasite. The virulence of the fungus (parameter σ )does not affect R0, because it is assumed that mosquitoes that are infected with thefungus are not able to transmit the malaria parasite.5.3.3 Optimizing the virulence and application of the fungalpathogen in the simplified modelThe two parameters of the model that are in principle under control in a real appli-cation are α (the application/spraying rate) and σ (the parameter controlling fungalvirulence). Our goal is to choose α and σ such that the endemic malaria prevalencein humanshe = he(α,σ) =R20(α,σ)−1R20(α,σ)+β/(µ+α),is minimized. The first and most intuitive result is that he is a monotonic decreasingfunction of α , which means that the more the mosquitoes are exposed to the fun-gus, the lower the endemic malaria prevalence is in humans. Increasing the fungusapplication rate is therefore always beneficial. This result is numerically illustratedin Figure 5.3. It can further be shown (see Appendix C) that the total number ofmosquitoes (S+ I +F) also decreases when α increases, unless the fungal viru-lence σ is zero, in which case the total number of mosquitoes is independent ofα .There are two possible effects of continual fungus application that have to beconsidered in answering the question of how to find the optimal fungal virulenceσ :1. The biopesticide effect: Increasing the fungal virulence will lead to a de-crease in the total number of mosquitoes (S+ I+F). This can be confirmedmathematically for the presented models (see Appendix C).2. The competition effect: Fungus-infected mosquitoes F do not contributedirectly to the transmission of the malaria parasite to humans. However,they do compete for resources with all the non-fungus-infected mosquitoes.1270 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 100.20.40.60.81RelativemalariaprevalenceinhumansFungus exposure rate α 0.750.80.850.90.951RelativetotalnumberofmosquitoeshumansmosquitoesFigure 5.3: Prevalence of malaria in humans and total number of mosquitoesfor varying fungus deployment rate. The steady state human malariaprevalence and the total mosquito population, both relative to baseline,are plotted against the fungus exposure intensity α , with fixed fungalpathogen virulence σ = 0.1 day−1. As expected, quantities decreasewhen α increases. Note that, once α is large enough so that R0 < 1 andmalaria is eradicated, he remains constant at 0. Full details of all otherchosen parameter values are given in Appendix C.Therefore, if the fungal virulence is low, then the population will have ahigher fraction of non-malaria-carrying mosquitoes and the force of infec-tion of the malaria parasite on humans could plausibly be reduced.Hence there is a tradeoff between the two mechanisms above: the total num-ber of mosquitoes could be minimized by a high-virulence fungus (biopesticideeffect), but what is critical for the prevalence in humans is the total number ofmosquitoes infected with the malaria pathogen - and this might be minimized (viathe competition effect) by a low-virulence fungus.In order to determine the balance of these two effects, one must carefully anal-yse the mathematical model. It is then possible to establish a critical threshold forthe relation between the mosquito innate growth rate κ and the natural mosquito128death rate µ that makes one or the other argument stronger. Specifically, it can beshown that the malaria prevalence in the human population he(α,σ) and the totalnumber of infected mosquitoes Ie(α,σ) are both maximized ifσ = σ∗ ≡ (κ−2µ)2−κ/(µ+α) .This result indicates how to best design the fungus: To avoid the worst caseσ = σ∗, the virulence σ must be chosen far away from σ∗. Note that whileσ = σ∗ maximizes the malaria prevalence in humans as well as the total numberof malaria-infected mosquitoes, it does not maximize or minimize the total num-ber of mosquitoes. This result reveals the complexity of the tradeoff between thebiopesticide and the competition effect, and indicates the importance of a good un-derstanding of the mosquito population as well as the fungus-mosquito interaction,in designing the optimal pathogen for deployment.5.3.4 Optimal virulence depends on background mosquito growthrateContinuing the analysis of the previous section, two interesting cases can be dis-tinguished: (i) If σ∗ is negative, then σ is necessarily greater than σ∗ and hencevirulence should always be maximized to reduce malaria prevalence in humans (in-dicating that the biopesticide effect is stronger than the competition effect); (ii) Ifσ∗ is positive, however, then a very large σ or a very low σ is desirable, but not anintermediate value. In the second case, this shows that the choice is either to use thefungal pathogen as a biopesticide (high virulence) or a distributed anti-Plasmodiumagent (low virulence) in the mosquito population.The choice depends on the relation between the mosquito growth rate κ , themosquito death rate µ and the fungal exposure rate α . If the growth rate κ is smallcompared to the mosquito death rate µ (specifically, if κ < 2µ) then σ∗ < 0 for anyvalue of α , and hence a larger fungal virulence σ is always desirable. This meansthat the fungus should be used as a biopesticide for slow-growing mosquito pop-ulations. On the other hand, if the mosquito population is relatively fast-growing(κ > 2µ), then σ∗ is negative for 0 < α < (κ − 2µ)/2, while σ∗ is positive forα > (κ−2µ)/2. Parameter estimation (see Appendix C) yields that κ ≈ 5µ , im-129plying that in most real mosquito populations, the latter scenario is much morerealistic. Hence, if the fungus can be applied at a sufficient rate, then minimiz-ing the fungal virulence σ has the most beneficial effect of malaria prevalence inhumans.Figure 5.4 illustrates these principles for particular parameter choices. Thehuman malaria prevalence he(α,σ) is plotted, relative to the baseline prevalencewhen no fungus is applied, and hence indicating how malaria management can beoptimized. The left column shows the slow-growing result (κ < 2µ) where theoptimal strategy is to use the fungal pathogen as a biopesticide. The right columnshows the more surprising result where, if the fungus deployment rate is sufficient,it is preferable to select a low-virulence fungus strain. In all cases, verifying thefirst result of this section, it can be seen that a higher fungus-exposure rate α isalways desirable.5.3.5 Equilibrium analysis of the life-stage-structured modelThe investigation of the simplified model has shown that depending on the ecologyof the mosquito population, it can be expected that there are circumstances wherethe optimal virulence of the fungal pathogen can be zero. However, competitionbetween mosquitoes in the simplified model takes place in the adult stage, but re-cent evidence indicates that competition occurs at the larval stage. To examine thiseffect it is necessary to use the more complex, life-stage-structured model (5.2),which includes the larval stage. In this section the effects of vertical transmissionof fungus will also be examined.5.3.6 Life-stage-structured model without vertical transmission offungusBy setting ξ = 0 in the second model, it is possible to investigate the model withoutvertical transmission. Similar to the simplified model, it can be shown that thismodel supports three easily explained equilibria, corresponding to (i) the trivialequilibrium with no mosquitoes and no malaria, (ii) a malaria-free equilibriumwith mosquitoes but no malaria, and (iii) an endemic equilibrium state. Providedthat the malaria-free equilibrium with mosquitoes exists, it can be shown that the130Fungal virulenceExposurerateα 0 0.25 0.5 0.7500.10.20.30.40.500.20.40.60.810 0.15 0.3 0.45 0.6 0.7500.20.40.60.8Fungal virulenceRelprevinhumansFungal virulenceExposurerateα σ ∗0 0.25 0.5 0.7500.250.50.75100.20.40.60.810.50.550.60.650 0.15 σ* 0.3 0.45 0.6 0.75Fungal virulenceRelprevinhumansFigure 5.4: Malaria prevalence in humans varying over fungal pathogen vir-ulence and deployment rate. The heat maps (top row) indicate the en-demic malaria prevalence in humans he, relative to baseline where nofungus is applied, for the given parameters, the graphs (bottom row)show a one-dimensional projection of the heat maps, for a fixed fun-gal application (spraying) rate. Two distinct cases can be distinguished:(i) If κ − 2µ < 0 (left column) then human malaria prevalence is a de-creasing function of fungal virulence σ and deployment rate α . (ii) Ifκ − 2µ > 0 (right column), the curve describing the worst-case fungalvirulence σ∗ is superimposed, indicating a non-monotonic relationshipbetween human malaria prevalence and σ . Top row: The dark blue re-gion indicates R0 < 1 and hence he = 0. Bottom row: one-dimensionalslice through the heat map above for a fixed value of α = 0.1 day−1 (left)and α = 0.5 day−1 (right), as indicated by the black line in the heat mapabove. Here, µ = 0.1 day−1, while κ = 0.18 day−1 (left) and κ = 0.48day−1 (right). All other parameter values are as given in Appendix C.131endemic equilibrium state exists and is stable given the following reproductivenumber condition:R0 =√β 2γm2((κc−µ)(µ+α+σ)−ασ)κLρ(µ+α)3(µ+σ)H= β√γS0ρ(α+µ)H> 1,whereS0 =m2 ((κc−µ)(µ+α+σ)−ασ)κL(µ+α)2(µ+σ)is the equilibrium number of mosquitoes in the population in the absence of themalaria parasite. Under this condition, the fraction of the human population in-fected with malaria, at the endemic equilibrium, is given by the same function ofR0 as before (reflecting the very similar structures of the two models),h(σ) =R20−1R20+β/(µ+α).The derivative of this function with respect to σ is found to have no zeroes and isalways negative for R0 > 1. This indicates that the human prevalence of malariais a strictly decreasing function of σ and therefore the best strategy for the life-stage-structured model with no vertical transmission of fungus is to increase thefungal virulence as much as possible. This result (illustrated in Figure 5.5, top leftpanel where ξ = 0) stands in contrast to the previous section where more nuancedconclusions were drawn, and is a consequence of the fact that the competitioneffect is occurring at the larval stage, while the biopesticide effect is occurring atthe adult stage. Since it is adult mosquitoes, not larvae, that act as vectors for themalaria parasite, only the biopesticide effect can reduce malaria incidence in thisversion of the model.5.3.7 Life-stage-structured model with vertical transmission offungusVertical transmission is a feature of fungal symbionts of insects [36] and it seemsnatural to consider this in the context of the model. The life-stage-structured model,1320.0 0.2 0.4 0.6 0.8 1.00.00.20.40.60.81.0Fungal Virulence σSteadystatehζ=00.0 0.2 0.4 0.6 0.8 1.00.00.20.40.60.81.0Fungal Virulence σSteadystatehζ=0.250.0 0.2 0.4 0.6 0.8 1.00.00.20.40.60.81.0Fungal Virulence σSteadystatehζ=0.50.0 0.2 0.4 0.6 0.8 1.00.00.20.40.60.81.0Fungal Virulence σSteadystatehζ=0.750.0 0.2 0.4 0.6 0.8 1.00.00.20.40.60.81.0Fungal Virulence σSteadystatehζ=0.80.0 0.2 0.4 0.6 0.8 1.00.00.20.40.60.81.0Fungal Virulence σSteadystatehζ=0.850.0 0.2 0.4 0.6 0.8 1.00.00.20.40.60.81.0Fungal Virulence σSteadystatehζ=0.90.0 0.2 0.4 0.6 0.8 1.00.00.20.40.60.81.0Fungal Virulence σSteadystatehζ=0.950.0 0.2 0.4 0.6 0.8 1.00.00.20.40.60.81.0Fungal Virulence σSteadystatehζ=1.0σFigure 5.5: Malaria prevalence in humans varying over vertical transmission,deployment rate and fungal virulence. Each subfigure shows the en-demic malaria prevalence in humans, relative to the no-fungus base-line, plotted against the fungal virulence σ , for five different levels ofthe fungal application (spraying) rate α . The different values of α ineach subfigure are {0.05,0.1,0.15,0.2,0.25} days−1, corresponding tocurves from top to bottom, and the length of the dashing increases withα . Each subfigure represents a different value of the vertical transmissi-bility ξ from ξ = 0 (no vertical transmission) to ξ = 1 (perfect verticaltransmission). All other parameter values are as given in Appendix C.where the parameter ξ is the vertical transmission fraction, reflects this possibilityand allows the previous analysis to be repeated. In this case, the analytical expres-sions for the steady states of the full model can be obtained using a computer alge-bra system, but are too long to usefully give here. Instead we explore this scenarionumerically, see Figure 5.5. The basic analytical results remain: there are threepotential equilibria of the model, but only one has mosquitoes and malaria. Fur-ther, although the model is resistant to analytical exploration, it is easy to chooseparameters and work numerically.Figure 5.5 shows the equilibrium fraction of infected humans as a function ofthe fungal virulence σ and application rate α , across a range of possible vertical133transmission probabilities ξ . It is observed that if vertical transmission is unlikelythen the benefit of the fungus is maximized by high virulence, but when verticaltransmission becomes more likely, an intermediate or low virulence fungus wouldbe favourable. In fact, in some cases a highly vertically transmissible fungus (ξ ≥0.85 in Figure 5.5) is predicted to be able to eliminate malaria altogether, providedthe virulence is low, but not too low. In all cases it should be noted that, as is to beexpected, increasing the fungal application rate α is always beneficial.These results indicate how the biopesticide effect of high virulence, acting atthe adult stage, can be dominated by the competition effect, provided the adultand larval stages are coupled sufficiently strong via vertical transmission of thefungus. In this case, highly virulent fungus are found to be less effective becausethey prevent the fungus-infected mosquitoes from generating fungus-carrying lar-vae. This reduces competitive inhibition of fungus-uninfected larvae, thus reducingthe overall effectiveness of the fungus in preventing malaria parasite infection ofmosquitoes, and so ultimately increasing the prevalence of malaria in humans.5.4 ConclusionsIn this chapter, mathematical models have been employed to investigate the ef-fectiveness of a fungal pathogen that blocks malaria transmission in mosquitoesto reduce malaria prevalence in humans. Unsurprisingly, all models indicate thatmalaria prevalence in humans could be reduced substantially by such a countermeasure, and that the mosquito exposure rate to the fungus should be maximizedto reduce malaria prevalence. However, the main interest of the results is to demon-strate that the optimal design of an agent that can simultaneously kill mosquitoes,and malaria parasites within mosquitoes depends quite sensitively on the detailsof a complex ecological system.The first model, in which competition between mosquitoes occurred at the adultlevel, showed that in fast growing mosquito populations the fungal pathogen shouldbe engineered to have low virulence. This result is independent of the possibilityof mosquito resistance developing to the fungal pathogen and can be understoodin very simple terms: fungus-infected mosquitoes do not directly contribute tothe malaria epidemic, but competitively hamper the introduction/survival of new134susceptible mosquitoes. If mosquito resistance to fungal biopesticides arises in thefield, this argument would additionally be strengthened.In the second model, competition occurs at the larval stage of development.This model predicted that, in the absence of vertical transmission of the fungalpathogen, a highly virulent (biopesticidal) fungus would be desirable. However,the addition of reliable vertical transmission to this model significantly alters thepredictions. If the fungal pathogen could be engineered in this way, then a highvirulence would be highly detrimental to its efficacy as an anti-malarial strategy.The key observation that should be drawn is that finding the optimal proper-ties of agents that can reduce the malaria parasite incidence in mosquitoes is notan easy task, since several direct and indirect effects need to be parameterized andbalanced, leading to conclusions that depend on the details of the mosquito popu-lation, fungal pathogen, and environment.In order to obtain a straightforward analytical treatment, several simplifying as-sumptions were made throughout. It was assumed that the fungus could completelyblock onward malaria transmission. Modifying this assumption in the simplifiedmodel leads to an increased favourability of virulence, but the authors believe thatthis issue will best be resolved in a future model where the time dependence of thefungus-mosquito interaction is explicitly analysed. Also, by assuming a constantmass-action biting coefficient, human reactions to avoid mosquito bites (bed netsor indoor residual spraying) were neglected. This was done to study the pure effectof the fungus interaction, but is likely not a realistic representation of a real-lifesetting. Furthermore, the human population was modelled as a homogeneous pop-ulation, neglecting for example co-infections, age structure, and previous malariahistory. All of the above have an important impact on the malaria epidemic: co-infections increase the severity of each disease, children are much more vulnerableto malaria, and previous malaria infections can lead to temporal immunity. Theincubation period of the malaria parasite and of the fungus in mosquitos were alsoneglected. This simplification particularly affects the mosquito population, wherethe incubation period is of about the same order as the life expectancy. Futurework will include extending the current model to add more details of mosquitoand malaria parasite life history in an age- and life-stage-dependent model of themosquito.135Horizontal fungal transfer between mosquitoes was also not considered here.This effect has been observed for a number of fungal symbionts of insects andcould play a role similar to vertical transmission in enhancing the effectiveness ofthe fungal pathogen. Horizontal transfer (possibly mediated through the environ-ment) between mosquitoes would also be expected to increase the effectiveness offungal spread, and reduce the necessary level of fungal application/spraying in theenvironment, which might otherwise have to be very intense. Further, in assuminga fairly simple logistic growth model, seasonal effects such as rainfall and humiditywere neglected. These effects would lead to temporal variations in the mosquitopopulation growth rate and carrying capacity, as well as unknown possible effectson the fungal pathogen. A final topic for possible future work is to consider spatialheterogeneities such as breeding sites and human habitat.Despite these limitations, the models are useful in defining an argument for aminimal virulence of the antimalarial fungal pathogens. In future work, as fieldstudies of Metarhizium or similar agents are completed, the parameterization ofthe model can be improved, and new models that allow insights into the potentialof a large-scale deployment of such controls for malaria and other mosquito-bornediseases can be developed.136Chapter 6Concluding remarksMathematical biology is a young and rapidly evolving field. At the same time, it isalso very broad, using a wide range of mathematical techniques to answer an evenwider range of theoretical and practical questions. The collaboration of all parts ofthe diverse community of mathematical biologists is necessary to fully unleash theenormous potential that lies in studying biological systems and phenomena withthe rigor and thoroughness of the language of nature itself – mathematics.Being a young and diverse field, however, also entails challenges. While thereare many examples of fruitful collaborations between mathematical biologists andexperimentalists (a few are highlighted in the introduction), the usefulness of math-ematical modelling is not yet universally acknowledged. The author has alwaysregarded preaching mathematical biology as part of being a mathematical biolo-gist, and so my Ph.D. work and ultimately this thesis are aimed at proving theusefulness of mathematical biology by applying mathematical tools to obtain prac-tical insights into current problems of global scale, HIV and malaria. The ques-tions that led to the research presented in this thesis were, directly or indirectly,brought to us by collaborators in the public health sector and even mycologists, sonon-mathematicians. Therefore the focus of this work lies in the modelling of theunderlying biological system, as well as the interpretation and implications of themodel predictions, instead of advancing the theory behind the mathematical toolsthat we are using.137Having said that, this thesis starts with a thorough yet application-focusedintroduction to continuous-time branching processes and their use in modellingwithin-host viral dynamics. We derive classical results from first principles, andcombine techniques from various mathematical fields in new ways to express ourmodel results in forms that can readily and efficiently be computed. In particu-lar, with our approach the full probability density function can be computed effi-ciently, avoiding the necessity to approximate this distribution by sampling usingthe popular Gillespie algorithm. Our theoretical results extend to continuous-timemulti-type branching processes, that can also be conditioned on non-extinction.This extension becomes very useful in our application to early within-host HIV in-fection in the first case study. Unfortunately, our technique is limited to branchingprocesses, and is hence not applicable to a large class of non-linear processes.In the first of three case studies we model the early dynamics of within-hostHIV infection in order to estimate the length of the eclipse phase, that is, the lengthof time between exposure and detectability of infection. The uncertainty about thislength and confidence in an early negative test is a source of anxiety for cliniciansand patients alike. Therefore we collaborated with the British Columbia Centre forDisease Control (BCCDC) to develop mathematical models that can estimate thelength of the eclipse phase, quantify the uncertainty of an early negative test andprovide a guide for the timing of follow-up testing. Because of the stochastic natureof these clinical questions we chose a stochastic model, using the previously devel-oped techniques for continuous-time multi-type branching processes. We highlightthe importance of conditioning our models on non-extinction to match the inclu-sion criterion for how the data was collected.We predict that the length of the eclipse phase may be slightly shorter thanpreviously assumed, that the largest information gains are before day 10 after ex-posure, and that infection can practically be excluded if a test as short as threeweeks after exposure is negative. To our knowledge these are the first rigorousresults that quantify this uncertainty, and we hope that our work helps cliniciansand patients to alleviate their anxieties and to help schedule follow-up tests. Reli-able data on the early phase of HIV infection is extremely difficult to collect, so wechose the simplest model that fits the relatively little data that is available. As our138understanding of the early dynamics of HIV infection improves, and as more databecomes available, it would be worthwhile to add more features to our model andrefine our results.In our second case study we investigate the population-level impact of increas-ing the HIV testing in the Vancouver men who have sex with men (MSM) com-munity. The hope is that by encouraging more testing more individuals becomeaware of their infection, and as a consequence reduce their risk-behaviour to avoidspreading the disease. It has long been observed by our collaborators at the BCCDCthat MSM use the internet to find sex partners and to seek health information, so it isnatural to use the internet to facilitate HIV testing and the delivery of results. Thisproject, called Get Checked Online (GCO), has been developed for many years, andquantitative data on individual risk and testing behaviour has been collected. Thisdata allows the development and parameterization of mathematical models, whichin turn allows us to predict the potential impact of this intervention.We start with a basic model of a homogeneous population, and show how themodel parameters can be derived from the raw data. Since the goal of GCO is to in-crease the overall testing rate we use sensitivity analysis to estimate how much themodel predictions depend on the testing rate, as well as other model parameters.We find that our model slightly overestimates the observed size of the epidemic,and suggest adjustments to the behavioural parameters to match the epidemiolog-ical observations. Looking at the data more closely reveals that the population ishighly heterogeneous in their risk and testing behaviour, so we extend our basicmodel to reflect this observation. Our updated findings confirm a well-studied phe-nomenon in epidemiology that a relatively small high-risk group can make an epi-demic much more severe than if this risk is distributed equally in the population.Our models are designed to lay the ground work for more sophisticated, agent-based models and to ultimately help to optimize the effect of GCO and calculateits cost-effectiveness. It has been thrilling to bring the insights from mathematicalmodels to a long-term initiative that will improve the health of the subpopulationof Vancouver that is most burdened by the HIV epidemic.Our third case study is motivated by a recent success in developing new anti-malarial agents. Instead of killing the mosquito vectors, this team of mycologists139successfully engineered a fungus that effectively blocks malaria transmission frominfected mosquitoes to humans. Engineering such a fungus raises the questionwhether it would be detrimental or beneficial to also add virulence. Decreasingthe total number of mosquitoes is beneficial in general, but the non-infectiousmosquitoes also compete for resources with the infectious mosquitoes, so not re-moving them at an increased rate could have an even greater positive effect. Math-ematical modelling is the ideal tool to predict the outcome of either strategy, andso we developed mathematical models to describe this non-linear system. We findthat, under most conditions, the best outcomes are achieved by minimizing the vir-ulence, even if resistance to the fungus is ignored. The next logical step in thedevelopment of the fungus is to test it outside of laboratory conditions in a fieldtrial. In this case our models could be adjusted to the conditions of the trial, andit would be exciting to compare the model predictions with the observations in thefield.We hope that the work in this thesis is inspiring to mathematical biologistseager to apply their skills to real-world data and problems, as well as to non-mathematicians who might be skeptical about the value of the insights that math-ematical models can provide. The author’s work as a mathematical biologists hasalways been most exciting when working with messy real-world data sets and de-bating with non-mathematicians about the best tools and approaches to addressthose pressing current problems that started the collaboration in the first place.Time will tell if the models presented in this thesis will add to the long list of suc-cess stories of mathematical biology, but there is no doubt that this list is only goingto increase as mathematical biology continues to grow and prove its usefulness inbeing a valuable tool to understand complex dynamics and worldwide diseases.140Bibliography[1] M.-R. Abrahams, J. Anderson, E. Giorgi, C. Seoighe, K. Mlisana, L.-H.Ping, G. Athreya, F. Treurnicht, B. Keele, N. Wood, et al. Quantitating themultiplicity of infection with human immunodeficiency virus type 1subtype C reveals a non-poisson distribution of transmitted variants.J. Virol., 83(8):3556–3567, 2009. → pages 56, 62, 63[2] M. Adelekea, C. Mafianaa, A. Idowua, S. Sam-Woboa, and O. Idowua.Population dynamics of indoor sampled mosquitoes and their implicationin disease transmission in Abeokuta, south-western Nigeria. J Vector BorneDis, 47:33–38, 2010. → pages xix, 196, 197, 198[3] M. Al-Arydah and R. Smith? Controlling malaria with indoor residualspraying in spatially heterogeneous environments. Math. Biosci. and Eng.,8(4):889–914, 2011. → pages 119[4] M. Al-Arydah and R. Smith. Controlling malaria with indoor residualspraying in spatially heterogenous environments. Mathematicalbiosciences and engineering: MBE, 8(4):889–914, 2011. → pages 8[5] T. M. Allen, L. Mortara, B. R. Mothe´, M. Liebl, P. Jing, B. Calore,M. Piekarczyk, R. Ruddersdorf, D. H. O’Connor, X. Wang, et al.Tat-vaccinated macaques do not control simian immunodeficiency virusSIVmac239 replication. J. Virol., 76(8):4108–4112, 2002. → pages 57[6] R. Anderson, editor. Population Dynamics of Infectious Diseases: Theoryand Applications. Chapman and Hall, London, 1982. → pages 8[7] R. Anderson and R. May. Infectious Diseases of Humans: Dynamics andControl. Oxford University Press, London, 1991. → pages 100, 114, 119[8] K. J. Bar, H. Li, A. Chamberland, C. Tremblay, J. P. Routy, T. Grayson,C. Sun, S. Wang, G. H. Learn, C. J. Morgan, et al. Wide variation in the141multiplicity of HIV-1 infection among injection drug users. J. Virol., 84(12):6241–6247, 2010. → pages 56, 62, 63[9] B. Bayati, P. Chatelain, and P. Koumoutsakos. D-leaping: Acceleratingstochastic simulation algorithms for reactions with delays. Journal ofComputational Physics, 228(16):5908–5916, 2009. → pages 16[10] C. Berticat, G. Boquien, M. Raymond, and C. Chevillon. Insecticideresistance genes induce a mating competition cost in Culex pipiensmosquitoes. Genet Res, 79(1):41–7, Feb 2002. → pages 8[11] S. Blanford, B. H. K. Chan, N. Jenkins, D. Sim, R. J. Turner, A. F. Read,and M. B. Thomas. Fungal pathogen reduces potential for malariatransmission. Science, 308(5728):1638–41, Jun 2005.doi:10.1126/science.1108423. → pages 117, 118[12] M. Boily, C. Lowndes, and M. Alary. The impact of HIV epidemic phaseson the effectiveness of core group interventions: insights frommathematical models. Sexually transmitted infections, 78(suppl 1):i78–i90,2002. → pages 100, 114[13] M. Burgard, S. Blanche, C. Jasseron, P. Descamps, M.-C. Allemon,N. Ciraru-Vigneron, C. Floch, B. Heller-Roussin, E. Lachassinne, F. Mazy,et al. Performance of HIV-1 DNA or HIV-1 RNA tests for early diagnosisof perinatal HIV-1 infection during anti-retroviral prophylaxis. J.Pediatrics, 160(1):60–66, 2012. → pages 79[14] A. M. Carias, S. McCoombe, M. McRaven, M. Anderson, N. Galloway,N. Vandergrift, A. J. Fought, J. Lurain, M. Duplantis, R. S. Veazey, et al.Defining the interaction of HIV-1 with the mucosal barriers of the femalereproductive tract. J. Virol., 87(21):11388–11400, 2013. → pages 63[15] C. B. R. Centre. Sex Now-2010 Survey Report. 2011. → pages 80, 90, 92,104, 106[16] A. Chatterjee, K. Mayawala, J. S. Edwards, and D. G. Vlachos. Timeaccelerated Monte Carlo simulations of biological networks using thebinomial τ-leap method. Bioinformatics, 21(9):2136–2137, 2005. → pages16[17] H. Y. Chen, M. Di Mascio, A. S. Perelson, D. D. Ho, and L. Zhang.Determination of virus burst size in vivo using a single-cycle SIV in rhesusmacaques. Proc. Natl. Acad. Sci USA, 104(48):19079–19084, 2007. →pages 67142[18] N. Chitnis, J. M. Cushing, and J. M. Hyman. Bifurcation analysis of amathematical model for malaria transmission. SIAM J. Appl. Math., 67:24–45, 2006. → pages 8, 120, 195, 196, 197[19] N. Chitnis, J. M. Hyman, and J. M. Cushing. Determining importantparameters in the spread of malaria through the sensitivity analysis of amathematical model. Bull Math Biol, 70(5):1272–96, Jul 2008.doi:10.1007/s11538-008-9299-0. → pages 8, 119, 120, 195, 197[20] M. S. Cohen, G. M. Shaw, A. J. McMichael, and B. F. Haynes. AcuteHIV-1 infection. New England Journal of Medicine, 364(20):1943–1954,2011. → pages xi, 6[21] J. M. Conway and D. Coombs. A stochastic model of latently infected cellreactivation and viral blip generation in treated HIV patients. PLoS CompBiol, 7(4):e1002033, 2011. → pages 12, 24, 66, 75[22] J. M. Conway, B. P. Konrad, and D. Coombs. Stochastic analysis ofpre-and postexposure prophylaxis against HIV infection. SIAM J. Appl.Math., 73(2):904–928, 2013. → pages 12, 54, 66, 75[23] O. Diekmann, J. Heesterbeek, and J. A. Metz. On the definition and thecomputation of the basic reproduction ratio R0 in models for infectiousdiseases in heterogeneous populations. Journal of mathematical biology,28(4):365–382, 1990. → pages 94[24] O. Diekmann, H. Heesterbeeck, and T. Britton. Mathematical Tools forUnderstanding Infectious Disease Dynamics. Princeton University Press,2012. → pages 94, 100, 114, 125[25] N. M. Dixit, M. Markowitz, D. D. Ho, and A. S. Perelson. Estimates ofintracellular delay and average drug efficacy from viral load data ofHIV-infected individuals under antiretroviral therapy. Antivir. Ther, 9:237–246, 2004. → pages 66[26] R. M. Donovan, A. J. Sedgewick, J. R. Faeder, and D. M. Zuckerman.Efficient stochastic simulation of chemical kinetics networks using aweighted ensemble of trajectories. The Journal of chemical physics, 139(11):115105, 2013. → pages 16[27] J. L. Doob. Markoff chains–denumerable case. Transactions of theAmerican Mathematical Society, pages 455–473, 1945. → pages 15143[28] L. Edelstein-Keshet. Mathematical Models in Biology. Society forIndustrial and Applied Mathematics, 2nd edition, 2005. → pages 120[29] P. Emau, Y. Jiang, M. B. Agy, B. Tian, G. Bekele, and C.-C. Tsai.Post-exposure prophylaxis for SIV revisited: animal model for HIVprevention. AIDS Res Ther, 3:29, 2006. → pages 5[30] A. Enayati and J. Hemingway. Malaria management: past, present, andfuture. Annu Rev Entomol, 55:569–91, 2010.doi:10.1146/annurev-ento-112408-085423. → pages 117[31] W. Fang, J. Vega-Rodrı´guez, A. K. Ghosh, M. Jacobs-Lorena, A. Kang, andR. J. St Leger. Development of transgenic fungi that kill human malariaparasites in mosquitoes. Science, 331(6020):1074–7, Feb 2011.doi:10.1126/science.1199115. → pages 8, 118[32] E. W. Fiebig, D. J. Wright, B. D. Rawal, P. E. Garrett, R. T. Schumacher,L. Peddada, C. Heldebrant, R. Smith, A. Conrad, S. H. Kleinman, et al.Dynamics of HIV viremia and antibody seroconversion in plasma donors:implications for diagnosis and staging of primary HIV infection. AIDS, 17(13):1871–1879, 2003. → pages xii, 56, 57, 78[33] B. C. for Disease Control. STI/HIV Annual Report 2004. 2004. → pages81[34] B. C. for Disease Control. HIV in British Columbia: Annual SurveillanceReport 2013. 2015. → pages 80, 94, 95, 108[35] D. Gao and S. Ruan. A multi-patch malaria model with logistic growthpopulations. SIAM J. Appl. Math., 72(3):819–841, 2012. → pages 120[36] C. M. Gibson and M. S. Hunter. Extraordinarily widespread andfantastically complex: comparative biology of endosymbiotic bacterial andfungal mutualists of insects. Ecol Lett, 13(2):223–34, Feb 2010.doi:10.1111/j.1461-0248.2009.01416.x. → pages 121, 132[37] D. T. Gillespie. Exact stochastic simulation of coupled chemical reactions.The journal of physical chemistry, 81(25):2340–2361, 1977. → pages 15[38] D. T. Gillespie and L. R. Petzold. Improved leap-size selection foraccelerated stochastic simulation. The Journal of Chemical Physics, 119(16):8229–8234, 2003. → pages 16144[39] N. S. Goel and N. Richter-Dyn. Stochastic models in biology. Elsevier,1974. → pages 11, 13, 23[40] R. H. Gray, M. J. Wawer, R. Brookmeyer, N. K. Sewankambo,D. Serwadda, F. Wabwire-Mangen, T. Lutalo, X. Li, T. VanCott, and T. C.Quinn. Probability of HIV-1 transmission per coital act in monogamous,heterosexual, HIV-1-discordant couples in Rakai, Uganda. Lancet, 357(9263):1149–1153, 2001. → pages 62[41] R. E. Haaland, P. A. Hawkins, J. Salazar-Gonzalez, A. Johnson,A. Tichacek, E. Karita, O. Manigart, J. Mulenga, B. F. Keele, G. M. Shaw,et al. Inflammatory genital infections mitigate a severe genetic bottleneckin heterosexual transmission of subtype A and C HIV-1. PLoS Pathogens, 5(1):e1000274, 2009. → pages 56, 62, 63[42] A. Haase. Population biology of HIV-1 infection: viral and CD4+ T celldemographics and dynamics in lymphatic tissues. Ann. Rev. Immunol., 17(1):625–656, 1999. → pages 79[43] A. T. Haase. Targeting early infection to prevent HIV-1 mucosaltransmission. Nature, 464(7286):217–223, 2010. → pages 78[44] A. T. Haase. Early events in sexual transmission of HIV and SIV andopportunities for interventions. Ann. Rev. Medicine, 62:127–139, 2011. →pages 78, 79[45] K. P. Hadeler and C. Castillo-Cha´vez. A core group model for diseasetransmission. Mathematical biosciences, 128(1):41–55, 1995. → pages100, 114[46] T. E. Harris. The theory of branching processes. Courier Corporation,2002. → pages 11[47] G. Harrison et al. Mosquitoes, malaria and man: A history of the hostilitiessince 1880. Mosquitoes, malaria and man: a history of the hostilities since1880., 1978. → pages 8[48] J. A. Hartigan. Clustering algorithms. John Wiley & Sons, Inc., 1975. →pages 104[49] J. Heffernan, R. Smith, and L. Wahl. Perspectives on the basic reproductiveratio. Journal of the Royal Society Interface, 2(4):281–293, 2005. → pages94145[50] A. D. Herrera Reyes. Mathematical models for immunodeficiency virus :post-treatment and memory activation. Master’s thesis, University ofBritish Columbia, 2012. → pages 12[51] A. D. Herrera Reyes and B. P. Konrad. Early HIV Infection. Final projectMATH 607E: Topics in Numerical Analysis, 2010. → pages 12[52] D. D. Ho, A. U. Neumann, A. S. Perelson, W. Chen, J. M. Leonard,M. Markowitz, et al. Rapid turnover of plasma virions and CD4lymphocytes in HIV-1 infection. Nature, 373(6510):123–126, 1995. →pages 2[53] S. T. Hottes, J. Farrell, M. Bondyra, D. Haag, J. Shoveller, and M. Gilbert.Internet-Based HIV and Sexually Transmitted Infection Testing in BritishColumbia, Canada: Opinions and Expectations of Prospective Clients. JMed Internet Res, 14(2):e41, Mar 2012. doi:10.2196/jmir.1948. URLhttp://www.jmir.org/2012/2/e41/. → pages xv, 82[54] J. R. Ickovics, J. A. Druley, E. L. Grigorenko, A. C. Morrill, S. E. Beren,and J. Rodin. Long-term effects of HIV counseling and testing for women:Behavioral and psychological consequences are limited at 18 monthsposttest. Health Psychology, 17(5):395, 1998. → pages 58[55] D. D. Jenkins and G. D. Peterson. Aess: accelerated exact stochasticsimulation. Computer Physics Communications, 182(12):2580–2586,2011. → pages 16[56] R. John, T. Ephraim, and A. Andrew. Reduced susceptibility to pyrethroidinsecticide treated nets by the malaria vector Anopheles gambiae s.l. inwestern Uganda. Malaria Journal, 7(1):92, 2008. ISSN 1475-2875.doi:10.1186/1475-2875-7-92. URLhttp://www.malariajournal.com/content/7/1/92. → pages 8[57] H. A. Joseph, A. M. Fasula, R. L. Morgan, A. Stuckey, M. E. Alvarez,A. Margolis, D. Stratford, and S. W. Dooley Jr. “The Anticipation Alonecould Kill You”: Past and Potential Clients’ Perspectives on HIV Testing inNon-Health Care Settings. AIDS Education and Prevention, 23(6):577–594, 2011. → pages 58[58] B. Kakkilaya. Ronald Ross. http://www.malariasite.com/ronald-ross/.[Online; accessed 22-June-2015]. → pages 3[59] S. Karlin and H. Taylor. A first course in stochastic processes, 1975. →pages 11, 66146[60] S. Karlin and H. M. Taylor. A first course in stochastic processes.Academic press, 1975. → pages 11, 13[61] B. F. Keele, E. E. Giorgi, J. F. Salazar-Gonzalez, J. M. Decker, K. T. Pham,M. G. Salazar, C. Sun, T. Grayson, S. Wang, H. Li, et al. Identification andcharacterization of transmitted and early founder virus envelopes inprimary HIV-1 infection. Proc. Natl. Acad. Sci. USA, 105(21):7552–7557,2008. → pages 56, 62, 63[62] B. F. Keele, H. Li, G. H. Learn, P. Hraber, E. E. Giorgi, T. Grayson, C. Sun,Y. Chen, W. W. Yeh, N. L. Letvin, et al. Low-dose rectal inoculation ofrhesus macaques by SIVsmE660 or SIVmac251 recapitulates humanmucosal infection by HIV-1. J. Exp. Med., 206(5):1117–1134, 2009. →pages 56, 58, 62, 63[63] S. H. Kleinman, N. Lelie, and M. P. Busch. Infectivity of humanimmunodeficiency virus-1, hepatitis C virus, and hepatitis B virus and riskof transmission by transfusion. Transfusion, 49(11):2454–2489, 2009. →pages 51, 154[64] J. Koella and R. Antia. Epidemiological models for the spread ofanti-malarial resistance. Malaria Journal, 2:3, 2003. → pages 8, 119, 196,197, 198[65] B. P. Konrad, R. J. Smith, and F. Lutscher. Gender differences inheterosexual transmission of HIV in urban and rural populations. In J. M.Tchuenche and Z. Mukandavire, editors, Advances in diseaseepidemiology. Nova Science Publishers Inc, New York, 2009. → pages 3[66] B. P. Konrad, M. Lindstrom, A. Gumpinger, J. Zhu, and D. Coombs.Assessing the optimal virulence of malaria-targeting mosquito pathogens: amathematical study of engineered Metarhizium anisopliae. MalariaJournal, 13(1):11, 2014. → pages iv, 116, 183[67] M. Kot. Elements of mathematical ecology. Cambridge University Press,2001. → pages 13, 19[68] H. Kuwahara and I. Mura. An efficient and exact stochastic simulationmethod to analyze rare events in biochemical systems. The Journal ofchemical physics, 129(16):165101, 2008. → pages 16[69] R. Landovitz. Occupational and nonoccupational postexposure prophylaxisfor HIV in 2009. Topics in HIV medicine, 17(3):104–108, 2008. → pages57147[70] J. Larkin, S. Flicker, R. Koleszar-Green, S. Mintz, M. Dagnino, andC. Mitchell. HIV risk, systemic inequities, and Aboriginal youth: wideningthe circle for HIV prevention programming. Can. J. Public Health, pages179–182, 2007. → pages 58[71] H. Li, K. J. Bar, S. Wang, J. M. Decker, Y. Chen, C. Sun, J. F.Salazar-Gonzalez, M. G. Salazar, G. H. Learn, C. J. Morgan, et al. Highmultiplicity infection by HIV-1 in men who have sex with men. PLoSPathogens, 6(5):e1000890, 2010. → pages 56, 62, 63[72] H. Lu and P. Li. Stochastic projective methods for simulating stiff chemicalreacting systems. Computer Physics Communications, 183(7):1427–1442,2012. → pages 16[73] G. MacDonald. The epidemiology and control of Malaria. OxfordUniversity Press, London, 1957. → pages 8, 119[74] M. Markowitz, M. Louie, A. Hurley, E. Sun, M. Di Mascio, A. S. Perelson,and D. D. Ho. A novel antiviral intervention results in more accurateassessment of human immunodeficiency virus type 1 replication dynamicsand T-cell decay in vivo. J. Virol., 77(8):5037–5038, 2003. → pages 66[75] A. J. Marozsan, E. Fraundorf, A. Abraha, H. Baird, D. Moore, R. Troyer,I. Nankja, and E. J. Arts. Relationships between infectious titer, capsidprotein levels, and reverse transcriptase activities of diverse humanimmunodeficiency virus type 1 isolates. Journal of virology, 78(20):11130–11141, 2004. → pages 51, 154[76] A. B. McDermott, J. Mitchen, S. Piaskowski, I. De Souza, L. J. Yant,J. Stephany, J. Furlott, and D. I. Watkins. Repeated low-dose mucosalsimian immunodeficiency virus SIVmac239 challenge results in the sameviral and immunological kinetics as high-dose challenge: a model for theevaluation of vaccine efficacy in nonhuman primates. J. Virol., 78(6):3140–3144, 2004. → pages 57[77] C. McInnes, E. Druyts, S. Harvard, M. Gilbert, M. Tyndall, V. Lima,E. Wood, J. Montaner, and R. Hogg. HIV/AIDS in Vancouver, BritishColumbia: a growing epidemic. Harm Reduction Journal, 6(1):5, 2009.ISSN 1477-7517. doi:10.1186/1477-7517-6-5. URLhttp://www.harmreductionjournal.com/content/6/1/5. → pages 80[78] J. W. Mellors, A. Munoz, J. V. Giorgi, J. B. Margolick, C. J. Tassoni,P. Gupta, L. A. Kingsley, J. A. Todd, A. J. Saah, R. Detels, et al. Plasma148viral load and CD4+ lymphocytes as prognostic markers of HIV-1infection. Annals of internal medicine, 126(12):946–954, 1997. → pages 5[79] E. Mjolsness, D. Orendorff, P. Chatelain, and P. Koumoutsakos. An exactaccelerated stochastic simulation algorithm. The Journal of chemicalphysics, 130(14):144110, 2009. → pages 16[80] G. A. Ngwa and W. S. Shu. A mathematical model for endemic malariawith variable human and mosquito populations. Math Comput Model, 32:747–763, 2000. → pages 120[81] D. F. Nixon, S. M. Donahoe, W. M. Kakimoto, R. V. Samuel, K. J.Metzner, A. Gettie, T. Hanke, P. A. Marx, and R. I. Connor. Simianimmunodeficiency virus-specific cytotoxic T lymphocytes and protectionagainst challenge in rhesus macaques immunized with a live attenuatedsimian immunodeficiency virus vaccine. Virology, 266(1):203–210, 2000.→ pages 57[82] C. M. Obermeyer and M. Osborn. The utilization of testing and counselingfor HIV: a review of the social and behavioral evidence. JournalInformation, 97(10), 2007. → pages 58[83] P. H. A. of Canada. HIV/AIDS Epi Updates: NationalHIVPrevalence andIncidence Estimates for 2011. 2014. → pages 80[84] G. S. Ogilvie, D. L. Taylor, T. Trussler, R. Marchand, M. Gilbert,A. Moniruzzaman, and M. L. Rekart. Seeking sexual partners on theinternet: a marker for risky sexual behaviour in men who have sex withmen. Canadian Journal of Public Health/Revue Canadienne de Sante’ePublique, pages 185–188, 2008. → pages 81[85] P. Patel, C. B. Borkowf, J. T. Brooks, A. Lasry, A. Lansky, and J. Mermin.Estimating per-act HIV transmission risk: a systematic review. AIDS, 28(10):1509–1519, 2014. → pages 57, 62, 63, 86, 89, 92, 107[86] J. E. Pearson, P. Krapivsky, and A. S. Perelson. Stochastic theory of earlyviral infection: continuous versus burst production of virions. PLoSComput Biol, 7(2):e1001058, 2011. doi:10.1371/journal.pcbi.1001058. →pages 66[87] A. S. Perelson and R. M. Ribeiro. Modeling the within-host dynamics ofHIV infection. BMC biology, 11(1):96, 2013. → pages 78149[88] A. S. Perelson, D. E. Kirschner, and R. De Boer. Dynamics of HIVinfection of CD4+T cells. Math. Biosci., 114(1):81–125, 1993. → pages 67[89] S. D. Pinkerton and P. R. Abramson. Effectiveness of condoms inpreventing HIV transmission. Social science & medicine, 44(9):1303–1312, 1997. → pages x, 86, 89, 90, 92, 107[90] F. A. Plummer, N. Nagelkerke, S. Moses, J. Ndinya-Achola, J. Bwayo, andE. Ngugi. The importance of core groups in the epidemiology and controlof hiv-1 infection. AIDS (London, England), 5:S169, 1991. → pages 100,114[91] B. Ramratnam, S. Bonhoeffer, J. Binley, A. Hurley, L. Zhang, J. E. Mittler,M. Markowitz, J. P. Moore, A. S. Perelson, and D. D. Ho. Rapid productionand clearance of HIV-1 and hepatitis C virus assessed by large volumeplasma apheresis. Lancet, 354(9192):1782–1785, 1999. → pages 64, 66[92] R. R. Regoes. The role of exposure history on HIV acquisition: insightsfrom repeated low-dose challenge studies. PLoS Comp Biol, 8(11):e1002767, 2012. → pages 58[93] R. M. Ribeiro, L. Qin, L. L. Chavez, D. Li, S. G. Self, and A. S. Perelson.Estimation of the initial viral growth rate and basic reproductive numberduring acute HIV-1 infection. J. Virol., 84(12):6096–6102, 2010. → pagesxii, 58, 59, 60, 61, 66[94] R. Ross. The prevention of malaria. John Murray, London, 1911. → pages7, 119[95] R. Ross. The prevention of malaria murray. London, UK, 1911. → pages 3[96] P. Rusert, M. Fischer, B. Joos, C. Leemann, H. Kuster, M. Flepp,S. Bonhoeffer, H. F. Gu¨nthard, and A. Trkola. Quantification of infectiousHIV-1 plasma viral load using a boosted in vitro infection protocol.Virology, 326(1):113–129, 2004. → pages 51, 154[97] I. Sangare, Y. Michalakis, B. Yameogo, R. Dabire, I. Morlais, andA. Cohuet. Studying fitness cost of Plasmodium falciparum infection inmalaria vectors: validation of an appropriate negative control. MalariaJournal, 12(1):2, 2013. ISSN 1475-2875. doi:10.1186/1475-2875-12-2.URL http://www.malariajournal.com/content/12/1/2. → pages 120150[98] E.-J. Scholte, K. Ng’habi, J. Kihonda, W. Takken, K. Paijmans, S. Abdulla,G. F. Killeen, and B. G. J. Knols. An entomopathogenic fungus for controlof adult African malaria mosquitoes. Science, 308:1641–1643, 2005. →pages 117[99] D. L. Smith, F. E. McKenzie, R. W. Snow, and S. I. Hay. Revisiting thebasic reproductive number for malaria and its implications for malariacontrol. PLoS Biol, 5(3):e42, Mar 2007.doi:10.1371/journal.pbio.0050042. → pages 8, 119[100] D. L. Smith, T. A. Perkins, L. S. Tusting, T. W. Scott, and S. W. Lindsay.Mosquito Population Regulation and Larval Source Management inHeterogeneous Environments. PLoS One, 8(8):e71247, 2013. → pages 121[101] R. Smith? and S. Hove-Musekwa. Determining Effective Spraying Periodsto Control Malaria via Indoor Residual Spraying in Sub-Saharan Africa.Journal of Applied Mathematics and Decision Sciences, page 745463,2008. doi:10.1155/2008/745463. → pages 8, 195, 196, 197, 198[102] R. A. Stein. Super-spreaders in infectious diseases. International Journalof Infectious Diseases, 15(8):e510–e513, 2011. → pages 100, 114[103] D. Taylor, M. Durigon, H. Davis, C. Archibald, B. Konrad, D. Coombs,M. Gilbert, D. Cook, M. Krajden, T. Wong, et al. Probability of a falsenegative HIV antibody test result during the window period: a tool forpre-and post-test counselling. Int. J. STD & AIDS, page0956462414542987, 2014. → pages xii, 5, 56, 59, 60, 78[104] M. Thomas and A. Read. Can fungal biopesticides control malaria? NatureMicrobiology Reviews, 5:377–383, 2007. → pages 118[105] J.-F. Trape, A. Tall, N. Diagne, O. Ndiath, A. B. Ly, J. Faye, F. Dieye-Ba,C. Roucher, C. Bouganali, A. Badiane, F. D. Sarr, C. Mazenot,A. Toure´-Balde´, D. Raoult, P. Druilhe, O. Mercereau-Puijalon, C. Rogier,and C. Sokhna. Malaria morbidity and pyrethroid resistance after theintroduction of insecticide-treated bednets and artemisinin-basedcombination therapies: a longitudinal study. Lancet Infect Dis, 11(12):925–32, Dec 2011. doi:10.1016/S1473-3099(11)70194-3. → pages 117[106] T. Trussler, P. Banks, R. Marchand, W. Robert, R. Gustafson, R. Hogg,M. Gilbert, and the ManCount Survey Team. ManCount Sizes-up the Gaps:a sexual health survey of gay men in Vancouver. 2010. → pages 91, 92,105, 106151[107] B. Varghese, J. E. Maher, T. A. Peterman, B. M. Branson, and R. W.Steketee. Reducing the risk of sexual HIV transmission: quantifying theper-act risk for HIV on the basis of choice of partner, sex act, and condomuse. Sexually transmitted diseases, 29(1):38–43, 2002. → pages x, 86, 89,90, 92, 107[108] P. L. Vernazza, J. J. Eron, S. A. Fiscus, and M. S. Cohen. Sexualtransmission of HIV: infectiousness and prevention. AIDS, 13(2):155–166,1999. → pages 56, 63, 68[109] J. M. Vulule, R. F. Beach, F. K. Atieli, J. M. Roberts, D. L. Mount, andR. W. Mwangi. Reduced susceptibility of Anopheles gambiae topermethrin associated with the use of permethrin-impregnated bednets andcurtains in Kenya. Med Vet Entomol, 8(1):71–5, Jan 1994. → pages 8[110] M. J. Wawer, R. H. Gray, N. K. Sewankambo, D. Serwadda, X. Li,O. Laeyendecker, N. Kiwanuka, G. Kigozi, M. Kiddugavu, T. Lutalo, et al.Rates of HIV-1 transmission per coital act, by stage of HIV-1 infection, inRakai, Uganda. J. Inf. Dis., 191(9):1403–1409, 2005. → pages 62[111] X. Wei, S. K. Ghosh, M. E. Taylor, V. A. Johnson, E. A. Emini, P. Deutsch,J. D. Lifson, S. Bonhoeffer, M. A. Nowak, B. H. Hahn, et al. Viraldynamics in human immunodeficiency virus type 1 infection. Nature, 373(6510):117–122, 1995. → pages 2[112] M. T. White, J. T. Griffin, T. S. Churcher, N. M. Ferguson, M.-G. Basa´nez,and A. C. Ghani. Modelling the impact of vector control interventions onAnopheles gambiae population dynamics. Parasites and Vectors, 4:153,2011. → pages 121[113] WHO. Fact Sheet 1 HIV/AIDS: the infection.http://www.who.int/hiv/abouthiv/en/fact sheet hiv.htm. [Online; accessed25-November-2014]. → pages 56[114] WHO. World malaria report 2014, 2014. → pages 7, 8[115] D. P. Wilson, J. Kahn, and S. M. Blower. Predicting the epidemiologicalimpact of antiretroviral allocation strategies in kwazulu-natal: the effect ofthe urban–rural divide. Proceedings of the National Academy of Sciences,103(38):14228–14233, 2006. → pages 3[116] C. Worthington and T. Myers. Desired elements of HIV testing services:test recipient perspectives. AIDS patient care and STDs, 16(11):537–548,2002. → pages 58152[117] C. Worthington and T. Myers. Factors underlying anxiety in HIV testing:Risk perceptions, stigma, and the patient-provider power dynamic.Qualitative Health Research, 13(5):636–655, 2003. → pages 58[118] J. A. Yorke, H. W. Hethcote, and A. Nold. Dynamics and control of thetransmission of gonorrhea. Sexually transmitted diseases, 5(2):51–56,1978. → pages 100, 114[119] L. Zhang, R. M. Ribeiro, J. R. Mascola, M. G. Lewis, G. Stiegler,H. Katinger, A. S. Perelson, and M. P. Davenport. Effects of antibody onviral kinetics in simian/human immunodeficiency virus infection:implications for vaccination. J. Virol., 78(10):5520–5522, 2004. → pages64, 66[120] W. Zhou, X. Peng, Z. Yan, and Y. Wang. Accelerated stochastic simulationalgorithm for coupled chemical reactions with delays. Computationalbiology and chemistry, 32(4):240–242, 2008. → pages 16153Appendix AThe T ∗-V -W model withinfectious and non-infectiousvirionsThe T ∗-V -W model accounts for the fact that the viral replication cycle is error-prone. Only a fraction Q of the virions that are produced by infected target cells areinfectious, where Q is estimated to be on the order of Q≈ 10−2−10−4 [63, 75, 96].Non-infectious virions, denoted as W , are not able to infect new target cells andhence are harmless. The model can be written in ODE form asT˙ ∗ = kTV −δT ∗,V˙ = pQT ∗− (c+ kT )V,W˙ = p(1−Q)T ∗− cW,(A.1)with T ∗(0) = n0, V (0) = v0, and W (0) = w0.We investigate the probability that the population consists of n infected cells, vinfectious virions and w non-infectious virions at time t given the initial populationsize of n0 infected cells, v0 infectious virions and w0 non-infectious virions:P(n,v,w,n0,v0,w0, t) = P((T ∗,V,W )(t) = (n,v,w) |(T ∗,V,W )(0) = (n0,v0,w0)).154A.1 The master equationsFor convenience of notation we omit arguments that are unchanged from n, v, w,n0, v0, w0, t, that is, e.g. P(n− 1,v+ 1) is shorthand notation for P(n− 1,v+1,w,n0,v0,w0, t). Using this notation and the same techniques as before we arriveat the forward master equationdPdt= kT ((v+1)P(n−1,v+1)+ pQ(nP(v−1)−P)+δ ((n+1)P(n+1)−nP)+ c((v+1)P(v+1)− vP)+ p(1−Q)(nP(w−1)−nP)+ c((w+1)P(w+1)−wP),(A.2)and correspondingly the backward equationdPdt= kT v0(P(n0+1,v0−1)−P)+ pQn0(P(v0+1)−P)+δn0(P(n0−1)−P)+ cv0(P(v0−1)−P)+ p(1−Q)n0(P(w0+1)−P)+ cv0(P(w0−1)−P)(A.3)A.2 The probability generating functionDefine the probability generating function G : N30× [0,∞)×D3→ D via(n0,v0,w0, t,z1,z2,z3) 7→∞∑n,v,w=0P(n,v,w,n0,v0,w0, t)zn1zv2zw3 .Then, as before multiplying the forward master equation (A.2) by zn1zv2zw3 and sum-ming over all n, v, w we obtain the following PDE:∂G∂ t=[pQz1(z2−1)+ p(1−Q)z1(z3−1)+δ (1− z1)] ∂∂ z1G+[kT (z1− z2)+ c(1− z2)] ∂∂ z2G+[c(1− z3)] ∂∂ z3GGn0,v0,w0(0,z1,z2,z3) = zn01 zv02 zw03 .(A.4)From the backward equation (A.3) we obtain the following ODE, where we155omit arguments that are unchanged from n0, v0, w0, t, z1, z2, z3.dGdt= kT v0(G(n0+1,v0−1)−G)+ pQn0(G(v0+1)−G)+δn0(G(n0−1)−G)+ cv0(G(v0−1)−G)+ p(1−Q)n0(G(w0+1)−G)+ cw0(G(w0−1)−G),which we rewrite with G1 = G1,0,0, G2 = G0,1,0, G3 = G0,0,1 and the branchingproperty todG1dt= pQG1(G2−1)+ p(1−Q)G1(G3−1)+δ (1−Q)G1(G3−1)+δ (1−G1)dG2dt= kT (G1−G2)+ c(1−G2)dG3dt= c(1−G3)(A.5)with G j(0) = z j.A.3 Calculating total viral loadIn order to calculate the total viral load P(V (t)+W (t) = `) we require a carefulbut straightforward calculation. For ease of notation we omit the initial conditionsarguments n0, v0, w0 in the probability P and the probability generating functionG. Then, using the definition of the probability generating function we see thatP(V (t)+W (t) = `)=`∑k=0P(V = `− k,W = k)=`∑k=0∞∑n=0P(n, `− k,k, t)=`∑k=0∞∑n=01(`− k)!P(n, `− k,k, t)1n(`− k)!=`∑k=0∞∑n,v=01(`− k)!P(n, `− k,k, t)1nv(v−1) · · ·(v− `− k+1)zv−`−k2∣∣∣∣z2=0156=`∑k=0∞∑n,v=01(`− k)!∂ `−k∂ z`−k2P(n, `− k,k, t)1nzv2∣∣∣∣∣z2=0=`∑k=0∞∑n,v=0(1(`− k)!∂ `−k∂ z`−k2∞∑w=01k!P(n, `− k,k, t)1nzv2w(w−1) · · ·(w− k+1)zw−k3∣∣∣∣∣(z2,z3)=(0,0))=`∑k=0∞∑n,v,w=01(`− k)!∂ `−k∂ z`−k21k!∂ k∂ zk3P(n, `− k,k, t)1nzv2zw3∣∣∣∣∣(z2,z3)=(0,0)=`∑k=01(`− k)!1k!∂ `∂ z`−k2 zk3∞∑n,v,w=0P(n, `− k,k, t)zn1zv2zw3∣∣∣∣∣(z1,z2,z3)=(1,0,0)=`∑k=01(`− k)!1k!∂ `G(t,1,z2,z3)∂ z`−k2 zk3∣∣∣∣∣(z2,z3)=(0,0)To calculate the latter, we need to use the Cauchy integral formula twice, i.e., usea double integral.P(V = `− k,W = k) = 1(`− k)!1k!∂ `G(t,1,z2,z3)∂ z`−k2 zk3∣∣∣∣∣(z2,z3)=(0,0)=1(`− k)!∂ `−k∂ z`−k2g(z2)∣∣∣∣∣z2=0,whereg(z2) =1k!∂ k fz2(z3)∂ zk3∣∣∣∣z3=0=12pii∫Cfz2(w)wk+1dw =12pi∫ 2pi0fz2(eiϕ)e−ikϕdϕ=12pi∫ 2pi0G(t,1,z2,eiϕ)e−ikϕdϕ,and henceP(V = `− k,W = k) = 1(`− k)!∂ `−kg(z2)∂ z`−k2∣∣∣∣∣z2=0157=12pi∫ 2pi0g(eiψ)e−i(`−k)ψdψ=12pi∫ 2pi012pi∫ 2pi0G(t,1,eiψ ,eiϕ)e−ikϕdϕe−i(`−k)ψdψ=1(2pi)2∫ 2pi0∫ 2pi0G(t,1,eiψ ,eiϕ)e−ikϕe−i(`−k)ψdϕdψ=1pi2Re∫ pi0∫ pi0G(t,1,eiψ ,eiϕ)e−ikϕe−i(`−k)ψdϕdψ,since G(t,1,z2,z3) =G(t,1,z2,z3). Therefore, summing over all possible values ofk we obtainP(V (t)+W (t) = `) =`∑k=0P(V = `− k,W = k)=1pi2Re∫ pi0∫ pi0G(t,1,eiψ ,eiϕ)`∑k=0e−ikϕe−i(`−k)ψdϕdψ=1pi2Re∫ pi0∫ pi0G(t,1,eiψ ,eiϕ)e−i`ψ1− e−i(`+1)(ϕ−ψ)1− e−i(ϕ−ψ) dϕdψ.(A.6)A.4 Mean behaviour of the stochastic processWe calculate the mean number of virus particles V +W at time t. By the linearityof the expected value we obtainE[V +W ] = E[V ]+E[W ] =∞∑v=0vP(V = v)+∞∑w=0wP(W = w)=∞∑n,w=0∞∑v=0P(n,v,w, t)1nv1v−11w+∞∑n,v=0∞∑w=0P(n,v,w, t)1n1vw1w−1=[(∂∂ z2+∂∂ z3)G(t,z1,z2,z3)]∣∣∣∣(z1,z2,z3)=(1,1,1).We now find an ODE for E[V +W ]. The time derivative of the partial derivativeswill be calculated using the PDE formulation (A.4) for G, and swapping the order158of differentiation.∂∂ t∂G(t,z1,z2,z3)∂ z2=∂∂ z2∂G(t,z1,z2,z3)∂ t=∂∂ z2[[pQz1(z2−1)+ p(1−Q)z1(z3−1)+δ (1− z1)] ∂G∂ z1+[kT (z1− z2)+ c(1− z2)] ∂G∂ z2 + c(1− z3)∂G∂ z3]= pQz1∂G∂ z1+[pQz1(z2−1)+ p(1−Q)z1(z3−1)+δ (1− z1)] ∂2G∂ z1z2− (c+ kT )∂G∂ z2+[kT (z1− z2)+ c(1− z2)] ∂2G∂ z22+ c(1− z3) ∂2G∂ z2z3.Evaluated at (z1,z2,z3) = (1,1,1) we obtain∂∂ t∂G(t,z1,z2,z3)∂ z2∣∣∣∣(z1,z2,z3)=(1,1,1)= pQ∂G(t,z1,z2,z3)∂ z1∣∣∣∣(z1,z2,z3)=(1,1,1)− (c+ kT )∂G(t,z1,z2,z3)∂ z2∣∣∣∣(z1,z2,z3)=(1,1,1)and similarly∂∂ t∂G(t,z1,z2,z3)∂ z1∣∣∣∣(z1,z2,z3)=(1,1,1)= −δ ∂G(t,z1,z2,z3)∂ z1∣∣∣∣(z1,z2,z3)=(1,1,1)+ kT∂G(t,z1,z2,z3)∂ z2∣∣∣∣(z1,z2,z3)=(1,1,1)∂∂ t∂G(t,z1,z2,z3)∂ z3∣∣∣∣(z1,z2,z3)=(1,1,1)= p(1−Q)∂G(t,z1,z2,z3)∂ z1∣∣∣∣(z1,z2,z3)=(1,1,1)− c∂G(t,z1,z2,z3)∂ z3∣∣∣∣(z1,z2,z3)=(1,1,1)159Hence, the time-dependent functions f1(t) =∂G(t,z1,z2,z3)∂ z1∣∣∣(z1,z2,z3)=(1,1,1), f2(t) =∂G(t,z1,z2,z3)∂ z2∣∣∣(z1,z2,z3)=(1,1,1)and f3(t) =∂G(t,z1,z2,z3)∂ z3∣∣∣(z1,z2,z3)=(1,1,1)satisfy the origi-nal linear ODE (A.1):f˙1 =−δ f1+ kT f2,f˙2 = pQ f1− (c+ kT ) f2,f˙3 = p(1−Q) f1− c f3,with f1(0) = n0, f2(0) = v0, f3(0) = w0. From the solution to this linear ODE weobtainE[V (t)+W (t)] = f2(t)+ f3(t).A.5 Calculating cumulative probabilitiesBuilding on earlier results we use (A.6) to quickly calculate the probability that thetotal viral load is below the detection limit dL:P(V +W < dL)=dL−1∑`=0P(V +W = `)=dL−1∑`=01pi2Re∫ pi0∫ pi0G(1,eiψ ,eiϕ)e−i`ψ1− e−i(`+1)(ϕ−ψ)1− e−i(ϕ−ψ) dϕdψ=1pi2Re∫ pi0∫ pi0G(1,eiψ ,eiϕ)1− e−i(ϕ−ψ)dL−1∑`=0e−i`ψ(1− e−i(`+1)(ϕ−ψ))dϕdψ=1pi2Re∫ pi0∫ pi0G(1,eiψ ,eiϕ)1− e−i(ϕ−ψ)(1− eidLψ1− e−iψ − e−i(ϕ−ψ) 1− e−idLϕ1− e−iϕ)dϕdψ.160A.6 The extinction probability, basic reproductionnumber R0 and initial growth rateSince non-infectious virus particles W can not infect new target cells, extinction isguaranteed for each lineage of W . On the other hand, the T ∗-V cycle is equivalentto the T ∗-V model in Section 2.11, so we expect the same extinction probabilitiesfor a T ∗ and V lineage, respectively. To calculate the extinction probabilities q1, q2and q3 we consider the steady states of the ODE (A.5) to findq1 = q2 = q3 = 1, or q1 =δpQc+ kTkT, q2 =δpQ+cc+ kT, q3 = 1.The quantities q1, q2 and q3 are the probabilities that an infection that started witha single T ∗, V or W goes extinct, respectively.Similarly to the T ∗-V model the basic reproduction number R0 for this model isthe expected number of new infected cells that are descendants of a single infectedcell. Since infectious virions infect target cells at rate kT and have an average life-span on 1/(c+ kT ), while target cells produce infectious virions at rate pQ overtheir average life span 1/δ we obtainR0 =pQkTδ (c+ kT ).Next, we get the innate growth rate r as the largest real part of the eigenvaluesof the matrix given by T˙∗V˙W˙= −δ kT 0pQ −c− kT 0(1−Q)p 0 −c T∗VWwith characteristic polynomial(−λ − c)(λ 2+(δ + c+ kT )λ +δ (c+ kT )− pQkT ).For R0 > 1 this polynomial has two negative and one positive root, so that in this161case the innate growth rate is given byr =12[−δ − c− kT +√(δ − c− kT )2+4pQkT]. (A.7)A.7 Conditioning on non-extinctionFollowing the same steps as for the previous models we obtain the probabilitygenerating function G˜ of the process conditioned on non-extinction asG˜(n0,v0,w0, t,z1,z2z3) =G(n0,v0,w0, t,z1,z2,z3)−G(n0,v0,w0, t,q1z1,q2z2,q3z3)1−qn01 qv02 qw03A.8 Mean behaviour and cumulative probabilities for theconditioned T ∗-V -W modelLet V˜ and W˜ be the random variable of the number of infectious and non-infectiousvirus particles in the conditioned process, respectively.E[V˜ +W˜ ] =[(∂∂ z2+∂∂ z3)G˜(t,z1,z2,z3)]∣∣∣∣z=1=11−qn01 qv02 qw03[(∂∂ z2+∂∂ z3)G(z1,z2,z3)]∣∣∣∣z=1− 11−qn01 qv02 qw03[(∂∂ z2+∂∂ z3)G(t,q1z1,q2z2,q3z3)]∣∣∣∣z=1We know the former summand as the mean of the unconditioned process. To cal-culate the latter defineg j(t) =∂G(n0,v0,w0, t,q1z1,q2z2,q3z3)∂ z j∣∣∣∣z=1for j = 1,2,3 and note thatg j(t) =∂G(n0,v0,w0, t,q1z1,q2z2,q3z3)∂ z j∣∣∣∣z=1162= q j∂G(n0,v0,w0, t,x1,x2,x3)∂x j∣∣∣∣(x1,x2,x3)=(q1,q2,q3).Taking the time-derivative and using the PDE formulation (A.4) for G, we obtainafter swapping the partial derivatives∂∂ tg1(t) = q1∂∂ t∂G(n0,v0,w0, t,x1,x2,x3)∂x1∣∣∣∣(x1,x2,x3)=(q1,q2,q3)= q1∂∂x1{[pQx1(x2−1)+ p(1−Q)x1(x3−1)+δ (1− x1)] ∂G∂x1+[kT (x1− x2)+ c(1− x2)] ∂G∂x2 + c(1− x3)∂G∂x3}∣∣∣(x1,x2,x3)=(q1,q2,q3)= q1{(pQ(x2−1)+ p(1−Q)(x3−1)−δ ) ∂G∂x1 +(. . .)∂ 2G∂x21+ kT∂G∂x2+(. . .)∂ 2G∂x1∂x2+0∂G∂x3+(. . .)∂ 2G∂x1∂x3}∣∣∣(x1,x2,x3)=(q1,q2,q3)= q1(pQ(δpQ+cc+ kT−1)−δ)∂G∂x1+q1kT∂G∂x2∣∣∣∣(x1,x2,x3)=(q1,q2,q3)=− δq1g1+q1q2kT g2∂∂ tg2(t) = q2∂∂ t∂G(n0,v0,w0, t,x1,x2,x3)∂x2∣∣∣∣(x1,x2,x3)=(q1,q2,q3)= q2∂∂x2{[pQx1(x2−1)+ p(1−Q)x1(x3−1)+δ (1− x1)] ∂G∂x1+[kT (x1− x2)+ c(1− x2)] ∂G∂x2 + c(1− x3)∂G∂x3}∣∣∣(x1,x2,x3)=(q1,q2,q3)= q2{pQx1∂G∂x1+(. . .)∂ 2G∂x1∂x2+(−kT − c) ∂G∂x2+(. . .)∂ 2G∂x22+0∂G∂x3+(. . .)∂ 2G∂x3∂x2}∣∣∣(x1,x2,x3)=(q1,q2,q3)= pQq2g1− (c+ kT )g2∂∂ tg3(t) = q3∂∂ t∂G(n0,v0,w0, t,x1,x2,x3)∂x3∣∣∣∣(x1,x2,x3)=(q1,q2,q3)= q3∂∂x3{[pQx1(x2−1)+ p(1−Q)x1(x3−1)+δ (1− x1)] ∂G∂x1163+[kT (x1− x2)+ c(1− x2)] ∂G∂x2 + c(1− x3)∂G∂x3}∣∣∣(x1,x2,x3)=(q1,q2,q3)= q3{p(1−Q)x1 ∂G∂x1 +(. . .)∂ 2G∂x1∂x2+0∂G∂x2+(. . .)∂ 2G∂x22− c ∂G∂x3+(. . .)∂ 2G∂x3∂x2}∣∣∣(x1,x2,x3)=(q1,q2,q3)= p(1−Q)q3g1− cg3.The second-order partial derivatives vanish because the factor multiplying them iszero by the property of q1, q2 and q3. For the initial conditions, we findg1(0) = n0qn01 qv02 qw03 ,g2(0) = v0qn01 qv02 qw03 ,g3(0) = w0qn01 qv02 qw03 ,so that we obtain g2(t) and g3(t) by solving the ODEg˙1(t) =q1q2kT g2− δq1 g1, g1(0) = n0qn01 qv02 qw03g˙2(t) = pQq2g1− (c+ kT )g2, g2(0) = v0qn01 qv02 qw03g˙3(t) = p(1−Q)q3g1− cg3, g3(0) = w0qn01 qv02 qw03Putting these results together we find the expected value of the total viral load forthe T ∗-V -W model, conditioned on non-exinction:E[V˜ (t)+W˜ (t)] =f2(t)+ f3(t)−g2(t)−g3(t)1−qn01 qv02 qw03. (A.8)164Appendix BAdditional material for early HIVinfectionB.1 Preparing the dataset of patient timecoursesIn the pre-processing stage we merge all datasets in such a way that there remainsonly one time-series for each patient.We merged all datasets first, for a total of 427 time series (with duplicates). Weare interested in measuring the maximal viral growth rate during the ramp-up phaseimmediately after infection. Hence, from the 427 time series we first removed 60time series that were unsuitable because they only contained a single data pointor recorded a high viral load at the first (not necessarily positive) test (more than25,000 HIV RNA copies per milliliter), indicating that the ramp-up phase has beenmissed. Next, we removed obvious duplicate entries, and combined complemen-tary time series where disjoint subsets of the plasma samples were tested withdifferent HIV tests. Many HIV RNA tests have upper limits of detection, which candiffer for different tests. Unfortunately, measurements above the detection limit areonly sometimes labeled as such, other times the upper limit of detection is reportedlike an accurate measurement. In cases where two or more HIV RNA tests weretaken on the same sample and had identical numerical values and at least one of theresults was labeled as above the detection limit of the test, we interpreted this as aresult above the limit of detection of both tests. This was the case in 21 samples.165When several HIV RNA tests of the same sample were recorded as below the detec-tion limit but did not match, as is the case for 36 time series, we took the geometricmean to preserve the distribution of measurement error, which is proportional tothe logarithm of the value.The remaining 129 time series still had some overlap where several tests weretaken for the same patient at the same times, but the measured values were notidentical or compatible in the sense above. In particular, some tests were not ableto detect HIV RNA as early as others, or some tests only provided an upper boundwhere other tests measured a definite and different numerical value. We ignoretests that detected HIV RNA later, or that only provide an upper bound when a dif-ferent test on the same plasma samples found a definite numerical value becausewe believe that these are less accurate tests. As a final tie-breaker we chose thetime series of the test that was used on more plasma samples. Finally, we disregardtime series where fewer plasma samples were tested. After this cleaning we obtain94 unique time series of 94 patients with measure or averaged HIV RNA measure-ment at several time points. In 7 of these no meaningful viral growth rate could becalculated, either because HIV RNA was undetectable in all recorded tests, or be-cause the viral load decreased initially, indicating that the first test was taken afterthe peak viral load. We further removed 5 time series where only two positive testresults were available and they were more than 25 days apart, because it is unlikelythat both tests were taken during the ramp-up stage. This leaves 82 patients, ofwhich 4 more were excluded by inspection, as follows:1006: Since the left values of the steepest slope is undetectable, yet precededby a positive viral load measurement (110 RNA copies/mL), we suspect the leftvalue of the steepest slope to be a false negative. Hence the actual steepest slopeshould be much more shallow.1660 5 10 15 20 25 30 35Days since first test101102103104105106107HIV RNA (cp/ml)steepest slopedetection limit1006: max growth rate 1.51 day−1above detection limitnumerical test resultbelow detection limit63521: Since the left values of the steepest slope is undetectable, yet precededby a positive viral load measurement (63 RNA copies/mL), we suspect the leftvalue of the steepest slope to be a false negative. Hence the actual steepest slopeshould be much more shallow.0 10 20 30 40Days since first test101102103104105106HIV RNA (cp/ml)63521: max growth rate 1.86 day−1HIV9011: The bDNA test shows positive values immediately, which are justabove the limit of detection. Due to the number of positive test results it is unlikely,but not impossible, that these are all false positive tests, and that the real viralincrease is only observed after day 20. If this is not the case we have most likelymissed the initial rate of viral increase.1670 5 10 15 20 25 30 35 40Days since first test101102103104105106HIV RNA (cp/ml)HIV9011: max growth rate 0.2 day−1HIV9012: The bDNA test shows positive values immediately, which are justabove the limit of detection. Due to the number of positive test results it is unlikely,but not impossible, that these are all false positive tests, and that the real viralincrease is only observed after day 5. If this is not the case we have most likelymissed the initial rate of viral increase.0 5 10 15 20 25Days since first test101102103104105106HIV RNA (cp/ml)HIV9012: max growth rate 1.01 day−1Finally, patient HIV9031 was also considered for exclusion because of the earlydetectable viral load. However, we decided to keep HIV9031 in the dataset be-cause the single positive bDNA test is followed by eight negative test results, whichmakes us believe that the first positive test was a false positive. Further, this timeseries is present in another dataset that we use, and there the RNA test found noHIV RNA in the sample.1680 20 40 60 80 100 120 140Days since first test101102103104105106HIV RNA (cp/ml)HIV9031: max growth rate 0.58 day−1B.2 Patient dataHere we plot the data of all 78 patients that were included in our analysis. We alsoshow the fit for each patient, for all risk categories (see main paper).10 0 10 20 30 40Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A 1: max growth rate 1.05 day−10 5 10 15 20 25 30 35 40Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B 1001: max growth rate 0.72 day−1Low risk, small inoculumMedium risk, medium inoculumHigh risk, large inoculum0 5 10 15 20 25Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B 1011: max growth rate 1.24 day−110 0 10 20 30Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A 1018: max growth rate 0.53 day−11690 10 20 30Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A 1026: max growth rate 1.24 day−10 5 10 15 20 25 30 35Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A 1055: max growth rate 1.52 day−10 10 20 30 40Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A 12008: max growth rate 1.63 day−140 30 20 10 0 10Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A 1814: max growth rate 0.44 day−120 15 10 5 0 5Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A 199: max growth rate 0.85 day−120 10 0 10 20Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A 3: max growth rate 0.47 day−117010 5 0 5 10Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B 3168: max growth rate 1.23 day−130 20 10 0 10 20Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A 4603: max growth rate 0.48 day−110 5 0 5Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A 5526-2: max growth rate 1.42 day−10 10 20 30 40 50Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B 6240: max growth rate 1.06 day−10 5 10 15 20 25 30 35Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A 6244: max growth rate 1.22 day−10 10 20 30 40 50 60 70 80Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B 6246: max growth rate 1.15 day−11710 5 10 15 20 25 30Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B 6247: max growth rate 1.23 day−10 5 10 15 20 25 30Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A 63215: max growth rate 1.27 day−10 10 20 30 40 50 60 70Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B 63753: max growth rate 0.78 day−10 5 10 15 20 25 30 35Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A 9018: max growth rate 0.95 day−10 10 20 30 40 50Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A 9021: max growth rate 1.07 day−10 10 20 30 40 50 60 70 80Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A 9023: max growth rate 1.31 day−11720 10 20 30 40 50Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B 9024: max growth rate 1.08 day−10 20 40 60 80Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A 9025: max growth rate 0.76 day−10 10 20 30 40 50Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B 9028: max growth rate 0.36 day−10 10 20 30 40Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B 9029: max growth rate 0.63 day−10 10 20 30 40 50Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A 9030: max growth rate 1.17 day−130 20 10 0 10 20 30Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B 9075: max growth rate 0.37 day−11730 20 40 60 80 100Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A 9077: max growth rate 1.02 day−10 20 40 60 80Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B 9079: max growth rate 1.41 day−10 5 10 15 20 25 30 35Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A HIV6243: max growth rate 0.8 day−10 5 10 15 20 25Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A HIV6248: max growth rate 0.99 day−10 10 20 30 40 50Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A HIV9010: max growth rate 0.9 day−10 5 10 15 20 25Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A HIV9013: max growth rate 1.3 day−11740 5 10 15 20 25 30 35Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B HIV9016: max growth rate 1.11 day−10 20 40 60 80Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A HIV9020: max growth rate 1.04 day−10 5 10 15 20 25 30Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A HIV9022: max growth rate 0.95 day−10 10 20 30 40Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B HIV9026: max growth rate 0.58 day−10 20 40 60 80 100 120 140Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A HIV9031: max growth rate 0.58 day−10 10 20 30 40 50Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A HIV9032: max growth rate 0.86 day−11750 10 20 30 40 50 60 70 80Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A HIV9033: max growth rate 0.63 day−10 10 20 30 40 50Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A HIV9034: max growth rate 1.55 day−115 10 5 0 5 10 15 20Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B HIV9082: max growth rate 0.77 day−120 10 0 10 20 30 40Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B HIV9084: max growth rate 0.45 day−15 0 5 10 15 20 25Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B HIV9089: max growth rate 0.92 day−110 5 0 5 10 15 20Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A HIV9096: max growth rate 1.26 day−11760 10 20 30 40Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B PRB923: max growth rate 0.82 day−10 50 100 150Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B PRB931: max growth rate 0.64 day−130 20 10 0 10 20Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B PRB933: max growth rate 0.45 day−10 10 20 30 40Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A PRB935: max growth rate 1.87 day−10 20 40 60 80 100Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A PRB939: max growth rate 0.93 day−130 20 10 0 10 20 30Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A PRB940: max growth rate 0.52 day−117710 5 0 5 10 15Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B PRB942: max growth rate 1.02 day−15 0 5 10 15 20Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A PRB943: max growth rate 1.78 day−115 10 5 0 5 10 15Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A PRB944: max growth rate 1.22 day−110 5 0 5 10 15 20Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A PRB945: max growth rate 1.21 day−110 5 0 5 10Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B PRB946: max growth rate 1.46 day−130 20 10 0 10 20Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A PRB947: max growth rate 0.51 day−11780 5 10 15 20Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B PRB948: max growth rate 2.92 day−15 0 5 10 15 20Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A PRB949: max growth rate 1.3 day−15 0 5 10 15 20 25Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A PRB950: max growth rate 0.74 day−15 0 5 10 15 20Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B PRB951: max growth rate 1.28 day−15 0 5 10 15 20Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A PRB952: max growth rate 1.34 day−115 10 5 0 5 10Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A PRB953: max growth rate 0.97 day−11795 0 5 10 15 20Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A PRB954: max growth rate 1.02 day−115 10 5 0 5 10 15Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A PRB955: max growth rate 1.02 day−10 10 20 30 40 50Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A PRB956: max growth rate 1.56 day−15 0 5 10 15 20 25Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B PRB957: max growth rate 0.83 day−110 5 0 5 10 15Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A PRB958: max growth rate 1.15 day−10 5 10 15 20 25 30Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A PRB960: max growth rate 1.64 day−11800 5 10 15 20 25 30Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B PRB961: max growth rate 1.13 day−15 0 5 10 15Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A PRB962: max growth rate 1.16 day−15 0 5 10 15 20Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)B PRB963: max growth rate 1.01 day−10 5 10 15 20Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A PRB964: max growth rate 1.24 day−120 10 0 10 20Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A PRB965: max growth rate 0.88 day−10 10 20 30 40 50Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A PRB966: max growth rate 0.86 day−118120 10 0 10 20Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A PRB972: max growth rate 0.59 day−115 10 5 0 5 10 15 20Days since first test10-510-410-310-210-1100101102103104105106107108HIV RNA (cp/ml)A SV0401: max growth rate 0.92 day−1182Appendix CAdditional material for malariaThe content of this appendix and the corresponding Chapter 5 stems from a courseproject in MATH 561: Mathematics of Infectious Diseases and Immunology taught2011 at UBC, which was published in Malaria Journal [66]. I am the lead authorof the publication, which is joint work with Michael Lindstrom, Anja Gumpinger,Jielin Zhu and Daniel Coombs. The journal article is distributed under the termsof the Creative Commons Attribution License (CC-BY) and has been modifiedslightly to fit the style and context of this thesis.C.1 Proof of theoremsIn this appendix we present the lengthy but straightforward proofs of some mathe-matical results used in Chapter 5.C.1 Theorem (Local Stability).1. The trivial equilibrium (h,S, I,F) = (0,0,0,0) is locally asymptotically sta-ble if and only if κ < (µ+α)(µ+σ)µ+α+σ .2. The malaria-free equilibrium (h,S, I,F) = (0,Sm,0,Fm) exists in the positiveplane and is locally asymptotically stable if and only if both of the followingconditions are fulfilled:κ >(µ+α)(µ+σ)µ+α+σand R0 = β√γSmρ(µ+α)H< 1.183Where Sm =P(µ+σ)µ+α+σ (1− (µ+α)(µ+σ)κ(µ+α+σ) ) and Fm = αµ+σ Sm.3. The endemic equilibrium (h,S, I,F) = (he,Se, Ie,Fe) exists in the positiveplane and is locally asymptotically stable if and only if both of the followingconditions are fulfilled:κ >(µ+α)(µ+σ)µ+α+σand R0 = β√γSmρ(µ+α)H> 1.Where he =R20−1R20+β/(µ+α), Se =(1− βµ+α+βR20−1R20)Sm, Ie =βµ+α+βR20−1R20Sm, Fe =Fm.Proof: We first show how to get to the steady states and that the system indeed hasexactly these three steady states. The trivial steady state (h,S, I,F) = (0,0,0,0) isstraightforward.In the malaria-free steady state neither infected humans (hm = 0), nor infectedmosquitoes (Im = 0) are present, but susceptible mosquitoes Sm and mosquitoeswith fungus Fm are around. The equations reduce todSdt= κ(S+F)(1− S+FP)− (µ+α)SdFdt= αS− (µ+σ)FSetting the rate of change dFdt to zero tells us Fm =αµ+σ Sm. Plugging this intothe former equation, after we set dSdt to zero yields (note that Sm+Fm =µ+α+σµ+σ Sm)0 = κSmµ+α+σµ+σ(1− µ+α+σµ+σSmP)− (µ+α)Sm0 =κ(µ+α+σ)µ+σ− κ(µ+α+σ)2P(µ+σ)2Sm− (µ+α)(µ+σ)µ+σSm =P(µ+σ)(κ(µ+α+σ)− (µ+α)(µ+σ))κ(µ+α+σ)2=P(µ+σ)µ+α+σ(1− (µ+α)(µ+σ)κ(µ+α+σ)),184where we divided by Sm since we assumed Sm 6= 0. If Sm = 0 we reach the trivialsteady state. ThereforeFm =αµ+σSm =αPµ+α+σ(1− (µ+α)(µ+σ)κ(µ+α+σ)).This brings us to the endemic steady state, where he, Se, Ie and Fe are all distinctfrom zero. (Note that Se = 0 or Fe = 0 would lead us to the trivial steady state, sincepopulations can not be negative.)First, note that we can divide by 1−he, since he 6= 1 due to the first equation in(1). Setting dhdt = 0 yields Ie =ρHheβγ(1−he) . SettingdIdt = 0 yields Ie =βSeheµ+α . Combiningthose those two equations yields Se =ρH(µ+α)β 2γ(1−he) . Next, settingdFdt = 0 we obtainFe =αµ+σ(Se+ Ie) =αρHβ 2γ(µ+σ)(1−he)(βhe+µ+α).Therefore,Se+ Ie+Fe =ρHβγ(1−he)(µ+αβ+he+αβ (µ+σ)(βhe+µ+α))=ρHβ 2γ(1−he)(µ+α+βhe+αµ+σ(βhe+µ+α))=ρH(µ+α+σ)β 2γ(µ+σ)(1−he)(βhe+µ+α)Plugging this into the equation dSdt = 0 will lead to he, but not before a lengthycalculation:0 = κρH(µ+α+σ)β 2γ(µ+σ)(1−he)(βhe+µ+α)×(1− ρH(µ+α+σ)Pβ 2γ(µ+σ)(1−he)(βhe+µ+α))−βhe ρH(µ+α)β 2γ(1−he) − (µ+α)ρH(µ+α)β 2γ(1−he)185multiplying by β2γ(1−he)ρH yields0 =κ(µ+α+σ)µ+σ(βhe+µ+α)(1− ρH(µ+α+σ)Pβ 2γ(µ+σ)(1−he)(βhe+µ+α))− (µ+α)(βhe+µ+α).Multiplying by µ+σκ(µ+α+σ)(βhe+µ+α) , which is positive since he is positive, and re-arranging we obtainρH(µ+α+σ)(βhe+µ+α)Pβ 2γ(µ+σ)(1−he) = 1−(µ+α)(µ+σ)κ(µ+α+σ)To solve this for he we multiply by the denominator on the left hand side andexpand the resulting terms:ρH(µ+α+σ)βhe+ρH(µ+α+σ)(µ+α)= Pβ 2γ(µ+σ)−Pβ 2γ(µ+σ)he− Pβ2γ(µ+α)(µ+σ)2κ(µ+α+σ)+Pβ 2γ(µ+α)(µ+σ)2κ(µ+α+σ)he,which we rearrange tohe[ρβH(µ+α+σ)+Pβ 2γ(µ+σ)(1− (µ+α)(µ+σ)κ(µ+α+σ))]= Pβ 2γ(µ+σ)(1− (µ+α)(µ+σ)κ(µ+α+σ))−ρH(µ+α+σ)(µ+α).We now divide by ρH(µ+α)(µ+α+σ) and recall thatR20 =β 2γSmρ(µ+α)H=Pβ 2γ(µ+σ)ρH(µ+α)(µ+α+σ)(1− (µ+α)(µ+σ)κ(µ+α+σ)).This results inhe(R20+βµ+α)= R20−1, or equivalently he =R20−1R20+β/(µ+α).186From here we can quickly find Se, Ie and Fe:Se =ρH(µ+α)β 2γ(1−he) =SmR20(1−he)=SmR20R20+βµ+α1+ βµ+α= Sm(1− ββ +µ+αR20−1R20)Ie =ρHheβγ(1−he) =βSmR20(µ+α)he1−he =βSmR20(µ+α)R20−1R20+βµ+αR20+βµ+α1+ βµ+α= Smββ +µ+αR20−1R20Fe =αµ+σ(Se+ Ie) =αµ+σSm = FmTo determine the local stability of the steady states we compute the character-istic polynomial of the linearized system around the equilibrium. To simplify thenotation we abbreviate ϒ= κ(1−2(S+ I+F)/P).∣∣∣∣∣∣∣∣∣∣−βγ IH −ρ−λ 0 βγ 1H (1−h) 0−βS ϒ−βh−µ−α−λ ϒ ϒβS βh −(µ+α)−λ 00 α α −(µ+σ)−λ∣∣∣∣∣∣∣∣∣∣=∣∣∣∣∣∣∣∣∣∣−βγ IH −ρ−λ 0 βγ 1H (1−h) 00 ϒ− (µ+α)−λ ϒ− (µ+α)−λ ϒβS βh −(µ+α)−λ 00 α α −(µ+σ)−λ∣∣∣∣∣∣∣∣∣∣=∣∣∣∣∣∣∣∣∣∣−βγ IH −ρ−λ 0 βγ 1H (1−h) 00 ϒ− (µ+α)−λ 0 ϒβS βh −(µ+α)−βh−λ 00 α 0 −(µ+σ)−λ∣∣∣∣∣∣∣∣∣∣187=∣∣∣∣∣ −βγ IH −ρ−λ βγ 1H (1−h)βS −(µ+α)−βh−λ∣∣∣∣∣︸ ︷︷ ︸=:A×∣∣∣∣∣ κ (1−ϒ)− (µ+α)−λ κ (1−ϒ)α −(µ+σ)−λ∣∣∣∣∣︸ ︷︷ ︸=:BThe fourth-order polynomial factors nicely into two second-order polynomials.This is to be expected: Polynomial A says if malaria can invade the population,polynomial B decides if mosquitoes can invade the environment.We now split the analysis into the three equilibria:1. Trivial equilibrium (h,S, I,F) = (0,0,0,0). Then A becomesA = det∣∣∣∣∣ −ρ−λ βγ 1H0 −(µ+α)−λ∣∣∣∣∣= (ρ+λ )(µ+α+λ ),which clearly has the two negative roots λ =−ρ and λ =−(µ+α). Hence,malaria can not invade a void population and the stability of the trivial steadystate is solely determined by B.B becomesB =∣∣∣∣∣ κ− (µ+α)−λ κα −(µ+σ)−λ∣∣∣∣∣= ((κ− (µ+α))−λ )((−(µ+σ))−λ )−ακ= λ 2+[(µ+σ)+(µ+α)−κ]λ +(µ+α)(µ+σ)−κ(α+µ+σ)The constant term is positive if and only ifκ <(µ+α)(µ+σ)µ+α+σ= (µ+α)µ+σµ+α+σ(C.1)If this condition is not fulfilled, then there is a positive root and hence thesteady state is not stable. If this condition is fulfilled, then κ < (µ +α) <(µ +α) + (µ + σ) and hence the linear term is also positive. Thus only188negative roots exist and the steady state is table. Hence the trivial steadystate is stable if and only if the condition (C.1) on κ holds.2. Malaria-free equilibrium (h,S, I,F) = (0,Sm,0,Fm).In the malaria-free equilibrium A becomesA = det∣∣∣∣∣ −ρ−λ βγ 1HβSm −(µ+α)−λ∣∣∣∣∣= (−ρ−λ )(−(µ+α)−λ )−β 2γ SmH= λ 2+(ρ+µ+α)λ +ρ(µ+α)−β 2γ SmH.This polynomial has only negative roots if and only if the constant term ispositive, i.e. if and only ifρ(µ+α)−β 2γ SmH> 0,which is equivalent to R0 = β√γSmρ(µ+α)H < 1.The polynomial B becomesB = det∣∣∣∣∣ κ(1− 2(Sm+Fm)P)− (µ+α)−λ κ(1− 2(Sm+Fm)P)α −(µ+σ)−λ∣∣∣∣∣Before we go about calculating this, let us first simplify the first row a littlebit:Sm+Fm = Sm+αµ+σSm =µ+α+σµ+σSm= Pκ(µ+α+σ)− (µ+α)(µ+σ)κ(µ+α+σ)= P(1− (µ+α)(µ+σ)κ(µ+α+σ))With that we obtainκ(1− 2(Sm+Fm)P)= κ(1−2(1− (µ+α)(µ+σ)κ(µ+α+σ)))189= 2(µ+α)(µ+σ)µ+α+σ−κ.ThereforeB = det∣∣∣∣∣ κ(1− 2(Sm+Fm)P)− (µ+α)−λ κ(1− 2(Sm+Fm)P)α −(µ+σ)−λ∣∣∣∣∣= det∣∣∣∣∣ 2(µ+α)(µ+σ)µ+α+σ −κ− (µ+α)−λ 2 (µ+α)(µ+σ)µ+α+σ −κα −(µ+σ)−λ∣∣∣∣∣=(2(µ+α)(µ+σ)µ+α+σ−κ− (µ+α)−λ)(−(µ+σ)−λ )−α(2(µ+α)(µ+σ)µ+α+σ−κ)= λ 2+λ[κ+(µ+α)+(µ+σ)−2(µ+α)(µ+σ)µ+α+σ]+κ(µ+α+σ)+(µ+α)(µ+σ)−2(µ+α)(µ+σ)µ+α+σ(µ+α+σ)= λ 2+λ[κ+(µ+α)(1− µ+σµ+α+σ)+(µ+σ)(1− µ+αµ+α+σ)]+κ(µ+α+σ)− (µ+α)(µ+σ).It is now obvious that this polynomial has two roots with negative real part,if only if the constant term is positive, i.e. ifκ >(µ+α)(µ+σ)µ+α+σ.3. Endemic equilibrium (h,S, I,F) = (he,Se, Ie,Fe).In the endemic steady state the polynomial A becomesA =∣∣∣∣∣ −βγ IeH −ρ−λ βγ 1H (1−he)βSe −(µ+α)−βhe−λ∣∣∣∣∣= λ 2+λ[βγIeH+ρ+µ+α+βhe]+βγIeH(µ+α)+β 2γIeHhe+ρ(µ+α)+βρhe−β 2γ SeH +β2γSeHhe190= λ 2+λ[βγIeH+ρ+µ+α+βhe]+βγIeH(µ+α)+ρ(µ+α)+β 2γIeH−β 2γ SeH(1−he),where we used that ρhe = βγ IeH (1− he). In the constant term we now sub-stitute Se and Ie with the expressions we just found above, and also use thedefinition of R0. Factoring the result yieldsA = λ 2+λ[βγIeH+ρ+µ+α+βhe]+β 2γSmH(µ+αβ +µ+αR20−1R20+1R20+ββ +µ+αR20−1R20− (1−he)(1− ββ +µ+αR20−1R20))= λ 2+λ[βγIeH+ρ+µ+α+βhe]+R20ρ(µ+α)(he+(1−he) ββ +µ+αR20−1R20),where we again used the definition of R0. We now see that, if R0 > 1, thenall roots of A have negative real part.For B, note that Se + Ie +Fe = Sm +Fm, and hence B is the same as in themalaria-free steady state.C.2 Theorem (Fungus exposure rate).The malaria prevalence in humans he = he(α,σ) decreases when the fungus-exposurerate α increases. The total number of mosquitoes Se+Ie+Fe = (Se+Ie+Fe)(α,σ)also decreases when α increases, unless the fungus-induced death rate σ is zero,in which case the total number of mosquitoes is unaffected by α .Proof: Before we prove the claim, we first show that Sm = Sm(α,σ) is a decreasingfunction of α is, i.e.∂Sm∂α(α,σ)< 0191for all α,σ ≥ 0. A straightforward calculation yields∂Sm∂α(α,σ) =∂∂α[P(µ+σ)µ+α+σ(1− (µ+α)(µ+σ)κ(µ+α+σ))]=− P(µ+σ)(µ+α+σ)2[(1− (µ+α)(µ+σ)κ(µ+α+σ))+κ(µ+α+σ)(µ+σ)−κ(µ+α)(µ+σ)κ2(µ+α+σ)]=− P(µ+σ)(µ+α+σ)2(1−2(µ+α)(µ+σ)κ(µ+α+σ)+µ+σκ)=− P(µ+σ)(µ+α+σ)2(µ+σκ(1− µ+αµ+α+σ)+(1− (µ+α)(µ+σ)κ(µ+α+σ)))< 0,since κ > (µ+α)(µ+σ)µ+α+σ by the assumption that malaria is endemic.Now, let 0 ≤ α1 < α2 and fix σ ≥ 0. For notational convenience we omit theargument σ in the following calculation. From the calculation above we can furtherdeduce thatSm(α1)> Sm(α2) =⇒ R20(α1) =β 2γSm(α1)ρ(µ+α1)H>β 2γSm(α2)ρ(µ+α2)H= R20(α2).Finally, we are now in position to show the first claim:he(α2)< he(α1)⇔ R20(α2)−1R20(α2)+β/(µ+α2)<R20(α1)−1R20(α1)+β/(µ+α1)⇔ 0 < (µ+α1)(µ+α2)(R20(α1)−R20(α2))+β (R20(α1)(µ+α1)−R20(α2)(µ+α2))+β (α2−α1)⇔ 0 < (µ+α1)(µ+α2)(R20(α1)−R20(α2))192+ββ 2γρH(Sm(α1)−Sm(α2))+β (α2−α1).The former results show that the last line is true, hence the first claim follows.To see that the total number of mosquitoes Se + Ie +Fe also decreases with α , wecalculate that∂Se+ Ie+Fe∂α(α,σ) =∂∂αµ+α+σµ+σSm(α,σ)=1µ+σSm(α,σ)+µ+α+σµ+σ∂Sm∂α(α,σ)=Pµ+α+σ(1− (µ+α)(µ+σ)κ(µ+α+σ))− Pµ+α+σ(µ+σκ(1− µ+αµ+α+σ)+(1− (µ+α)(µ+σ)κ(µ+α+σ)))=− Pσ(µ+σ)κ(µ+α+σ)2≤ 0,which only vanishes when σ = 0 and hence proves the second claim.C.3 Theorem (Fungus-induced death rate on mosquitoes).For α > 0 the total number of mosquitoes, Se + Ie +Fe, decreases if the fungus-induced death rate σ increases.Proof: This is a straightforward calculation. Recall Se + Ie + Fe = Sm + Fm =Sm(1+ αµ+σ ) = P(1− (µ+α)(µ+σ)κ(µ+α+σ) ) and calculate∂ (Se+ Ie+Fe)∂σ(α,σ) =−Pκ(µ+α+σ)(µ+α)−κ(µ+α)(µ+σ)κ2(µ+α+σ)2=− Pα(µ+α)κ(µ+α+σ)2,which is negative for all α > 0.193C.4 Theorem (Fungus-induced death rate on malaria prevalence in humans).If α = 0 (i.e. no fungus spraying) the human malaria incidence rate he = he(0,σ)is constant in σ . If α > 0 (i.e. the fungus is applied) the malaria prevalence inthe human population he(α,σ), as well as the total number of infected mosquitoesIe(α,σ), both have their maximum atσ∗ =(κ−2µ)(µ+α)(2µ−κ)+2α .Proof: Let α ≥ 0 be fixed. To find the local maximum of he(α,σ)we first calculatethe derivative with respect to σ . This yields∂he∂σ(α,σ) =1+β/(µ+α)(R20(α,σ)+β/(µ+α))2∂R20∂σ(α,σ)so that we see that he(α,σ) has a critical point whenever R20(α,σ) has a criticalpoint. However, R20(α,σ) in turn a critical point whenever Sm(α,σ) has a criticalpoint:∂R20∂σ(α,σ) =β 2γρ(µ+α)H∂Sm∂σ(α,σ).Thus we first study the critical points of Sm(α,σ).∂Sm∂σ(α,σ) = P[α(µ+α+σ)2(1− (µ+α)(µ+σ)κ(µ+α+σ))− µ+σµ+α+σ(µ+α+σ)(µ+α)− (µ+σ)(µ+α)κ(µ+α+σ)2]=Pα(µ+α+σ)2(1−2(µ+α)(µ+σ)κ(µ+α+σ)).Now we see that if α = 0, then Sm(0,σ), and hence he(0,σ) is constant for all val-ues of σ . So from now on let α > 0. Then the value σ∗ that makes ∂∂σ Sm(α,σ∗) =0 solves1 = 2(µ+α)(µ+σ∗)κ(µ+α+σ∗)194⇔ σ∗(κ−2(µ+α)) = (µ+α)(2µ−κ)If κ = 2(µ+α), then the equation above yields 0 = (µ+α)α , which is only truefor α = 0, since µ > 0. As we have asserted before, h2 is constant in this case.Therefore, if κ = 2(µ+α) no maximum exists. If κ 6= 2(µ+α) we obtainσ∗ =(κ−2µ)(µ+α)(2µ−κ)+2α ,i.e. ∂Sm∂σ (α,σ∗) = 0 and thus ∂R20∂σ (α,σ∗) = 0 = ∂he∂σ (α,σ∗). We use the secondderivative test to quickly check that the value at (α,σ∗) is indeed a maximum:∂ 2Sm∂σ2(α,σ∗) =2Pα(µ+α+σ∗)3( =0︷ ︸︸ ︷−1+2(µ+α)(µ+σ∗)κ(µ+α+σ∗)− (µ+α+σ∗)(µ+α)− (µ+σ∗)(µ+α)κ(µ+α+σ∗))=−2 Pα(µ+α)κ(µ+α+σ∗)3(1− µ+σ∗µ+α+σ∗)< 0.Since ∂Sm∂σ (α,σ) and and∂he∂σ (α,σ) have the same sign everywhere this implies thathe also has its maximum at (α,σ∗). Finally, Ie is an increasing function of he andhence is also maximized at (α,σ∗).ParametersWe choose some reasonable parameter values to illustrate our analytical results.Consider a small village with constant population size of H = 3000 humans. It isfair to assume that female mosquitoes typically outnumber humans by a factor ofthree to ten (see [19, 101]), hence we choose the carrying capacity of mosquitoes tobe P˜ = 10000. About half of bites from infectious mosquitoes lead to an infectionin a human [18, 19], i.e. γ = 0.5.The biting rate β is difficult to measure as it depends on many factors, in partic-195ular (seasonal) human behavior. In our simple model we assume a constant mass-action rate. The value used in [101], βγP˜/H = 0.5 would translates to β = 0.3day−1, which is about the maximal number of times one mosquito would want tobite humans per unit time, if humans were freely available, see [18]. Since it isreasonable to assume that humans are somewhat not always freely available in avillage we choose β = 0.15 days−1. This choice does not significantly affect thequalitative results of the study. Infected humans leave the infectious class by natu-ral or malaria-induced death or when they develop (temporal) immunity. The latteris the dominating contributor, and usually happens after a few months to a year,hence we choose an average of 200 days, i.e. ρ = 0.005 days−1 (see [18, 64]).The mean life-time of an outgrown, biting, female mosquito is around ten days[64, 101] and hence the mosquito death rate is chosen to be µ = 0.1 days−1.A typical mosquito population is not constant throughout a year but is heavilyinfluenced by external factors such as rainfall and humidity. A small mosquito pop-ulation at end of a dry season typically experiences a fast growth at the beginningof the rain season. Here is field data from [2], where the number of mosquitoescaught in a trap close to a village in Nigeria was measured between August 2005and July 2006:Aug Sep Oct Nov Dec JanAnopheles gambiae 23 24 25 21 9 5Feb Mar Apr May Jun JulAnopheles gambiae 12 26 47 50 76 46The growth phase from January until June can clearly be seen. We assume that,in this time period, the environmental conditions are so optimal for the mosquitopopulation, that it experiences exponential growth. So we let M = S+ I be the totalnumber of mosquitoes, set α = 0, hence F = 0, since in the data no fungus wasapplied, and fit the data points above to the simplified modeldMdt= (κ−µ)M, M(0) = M0.Then we perform a least-square fit optimization for (κ−µ) and M0 to obtain (κ−µ)≈ 0.38 days−1, or simply κ = 0.48 days−1.19601020304050607080κ - µ = 0.3796A.gambiaepopulation Aug 05Sep 05Oct 05Nov 05Dec 05Jan 06Feb 06Mar 06Apr 06May 06Jun 06Jul 06datadata used for fitbest least−square fitFigure C.1: Data fitting for κ . We fit an exponential function for six of thedata points reported in [2] to find an approximation for κ−µ .In the life-stage-structured model we need to estimate the larval production rateκc and intra-specific larval competition parameter κL. For simplicity, we set κc = κas estimated above, and then choose κL so that the number of mosquitoes is equalto the carrying capacity in the absence of the fungus.Value Interpretation Unit SourceH 3000 Total human population humans -P˜ 10000 Mosquito carrying capacity mosquitoes [18, 101]proportion of infectious bitesγ 0.5 from an infected mosquito - [18, 19]β 0.15 per capita mosquito biting rate days−1 [18]ρ 0.005 recovery rate of infected humans days−1 [18, 64]197Value Interpretation Unit Sourceµ 0.1 Natural mosquito death rate days−1 [64, 101]κ 0.48 Innate mosquito growth rate days−1 [2]α varied Exposure rate of the fungus days−1 -σ varied Fungus-induced death rate days−1 -ξ varied Vertical transmissibility of fungus days−1 -κc 0.48 Mosquito larvae birth rate days−1 see textκL 3.8e-5 Larval competition parameter days−1 larvae−1 see textTable C.1: Summary of estimates and references for the parameters used inthe malaria models.198
Thesis/Dissertation
eng
Mathematics
Vancouver : University of British Columbia Library
Attribution-NonCommercial-NoDerivs 2.5 Canada
Graduate
On the dynamics of HIV and malaria infection : insights from mathematical models
Text