The impact of infection-derived immunity on disease dynamics

When modeling infectious diseases, it is common to assume that infection-derived immunity is either (1) non-existent or (2) perfect and lifelong. However there are many diseases in which infection-derived immunity is known to be present but imperfect. There are various ways in which infection-derived immunity can fail, which can ultimately impact the probability that an individual be reinfected by the same pathogen, as well as the long-run population-level prevalence of the pathogen. Here we discuss seven different models of imperfect infection-derived immunity, including waning, leaky and all-or-nothing immunity. For each model we derive the probability that an infected individual becomes reinfected during their lifetime, given that the system is at endemic equilibrium. This can be thought of as the impact that each of these infection-derived immunity failures have on reinfection. This measure is useful because it provides us with a way to compare different modes of failure of infection-derived immunity.


Introduction
The S E I S (Susceptible-Exposed-Infected-Susceptible) and S E I R (Susceptible-Exposed-Infected-Recovered) models are two commonly used models in epidemiology that embody different assumptions regarding immunity after infection (Anderson and May 1991;Keeling and Rohani 2008). When we adopt the S E I R model, we assume that infection-derived immunity is perfect and lasts for life. Thus, in this case an individual who has recovered from an infection is assumed protected against the same pathogen again. Examples of such infectious diseases would include historical diseases of childhood including measles (Anderson and May 1991;Hethcote 2000) and rubella (Anderson and May 1983), where infection confers lifelong sterilizing immunity, with rare exceptions.
On the other hand, S E I S models reflect instances when there is no infection-derived immunity, so that once an individual recovers from an infection, they are immediately susceptible to the same pathogen with the same risk of infection as before. This assumption is consistent with what we know about several sexually transmitted diseases (STDs) such as herpes simplex A, gonorrhea, syphilis and chlamydia (Turner et al. 2006). It is also appropriate in infectious disease systems such as influenza (Dushoff et al. 2004;Hay et al. 2001), or Streptococcus pneumoniae (Cobey and Lipsitch 2012) where antigenic or serotype diversity mean that infection with one phenotype does not affort protection to subsequent exposures. Finally, there are infectious disease systems where convalescent immunity is insufficient to protect against future infection. For instance, clinical studies of respiratory syncytial virus (RSV) show that infections create incomplete immunity and that the risk of being reinfected is reduced by about 70% for the 6 months following the initial infection (Hall et al. 1991;Pangesti et al. 2018;Ohuma et al. 2012).
Infection-derived immunity can thus fail in different ways and each mode of failure has distinct implications for the reinfection probability of previously infected individuals and the overall dynamic behaviour of the disease system. There is a continuous and multidimensional space of models wherein the level of infection-derived immunity lies somewhere in between the S E I S and the S E I R models. Imperfect immunity in the form of lifelong partial immunity, as well as in the form of temporary fully protective immunity, have both been considered for their role in the transmission of a disease within a population (Gomes et al. 2004;Korobeinikov and Maini 2005;Melesse and Gumel 2010;Trawicki 2017;Yang and Silveria 1998). Nevertheless, there remain important knowledge gaps in our understanding of possible modes of immunity failure as there are many other variations of imperfect immunity that have yet to be considered. Here we consider seven models that contain different forms of imperfect infection-derived immunity, all of which contain the S E I R and S E I S models as limiting cases. The models we consider are: (i) the exponential waning model, (ii) the leaky model, (iii) the all-or-nothing model, (iv) the hyperexponential waning model, (v) the gamma-distributed waning model, (vi) the boosting model and (vii) the asymptomatic model. Some of these models have been studied previously (Bansal and Meyers 2012;Gomes et al. 2004;Rodrigues et al. 2009;Yang and Silveria 1998). In this paper we compare all seven models by deriving expressions for the probability that an individual is reinfected by the same pathogen within their lifetime, under the different model assumptions. This is called the reinfection probability and we will compare the expressions for reinfection probability across the seven models. This paper is structured as follows: In Sect. 2 we describe and define the seven different models that we are comparing. In Sect. 3 we prove the existence and uniqueness of the a disease-free equilibrium and an endemic equilibrium for each model, and derive expressions for the force of infection at each endemic equilibrium. In Sect. 4 we discuss the stability of these equilibria. In Sect. 5 we present expressions for the reinfection probability of each model and compare these expressions. In Sect. 6 we summarize the results and discuss some possible future directions.

Models
The seven different models of reinfection that we consider in this paper are illustrated in Fig. 1. The first three models (exponential waning, all-or-nothing, and leaky) require the standard four compartments: susceptible, exposed, infectious, and recovered. The next three models (gamma-distributed waning, hyperexponential waning and boosting) require a second compartment for the recovered individuals to allow for both gammadistributed or hyperexponential waning, as well as for immune boosting. The last model requires eight different compartments to allow for a different treatment of primary infections and reinfections.
The model equations are given by (1)-(3) and descriptions of the parameters involved for the different models are summarized in Table 1. For all models, we set the compartments of the model to be given as proportions rather than numbers or densities. We also fix a birth rate of μ equal to the per capita death rate in all compartments. Thus, as long as the system is initialized properly, all compartments will remain nonnegative and the sum of all compartments will always equal 1. We assume throughout that there is a transmission rate β between susceptible and infectious individuals, an incubation rate σ going from an exposed to infectious compartment, and a recovery rate γ going from an infectious compartment to another compartments.
The first three models shown in Fig. 1 are the exponential waning model, leaky and all-or-nothing immunity. The equations for these three models are given together in (1). For these three models the parameters relevant to infection-derived immunity are: the waning rate α for the exponential waning model, the probability of not receiving any immunity after infection (also called primary vaccine failure) ε A for the all-or-nothing model, and the "leakiness" parameter ε L for the leaky model. While it is possible to have a combination of different modes of failure in infection-derived immunity (for example, immunity that is both leaky and waning), in this paper we consider just one of the methods of failure at a time, so only one of these parameters can be nonzero at a time.
In the exponential waning model (often simply called the waning model, also called the S E I RS model in the literature) we assume that immunity is perfect until it disappears after an exponentially distributed amount of time. This model has been previously used to explore the resonance effects of seasonal influenza (Dushoff et al. 2004) and to quantify the evidence for loss of natural immunity to pertussis in Thailand (Blackwood et al. 2013a). All-or-nothing Gamma-distributed waning Hyperexponential waning

Fig. 1 Illustration of the models
In the all-or-nothing model, we assume that while the majority of infections lead to life-long immunity, some individuals fail to develop long-term protection, as has been observed in varicella infection (Chaves et al. 2007), for example. Here, a fraction ε A of recovering individuals return immediately to the susceptible class, while the remaining 1 − ε A gain complete and permanent immunity.
In the leaky model, infection-derived immunity is assumed to be permanent but incompletely protective. In this model, individuals in the recovered class have a probability of infection upon exposure that is reduced by a factor ε L relative to a fully susceptible individual. This modeling assumption has been proposed in the study of influenza antigenic evolution where infection with a virus from a previous season may provide only partial immunity (Hill et al. 2019).
The equations for the first three models are identical to those of the S E I R model if ε W = ε L = α = 0. The equations become those for the S E I S model if we set ε A = 1 or ε L = 1 or let α → ∞.
The next three models presented in Fig. 1 are the hyperexponential waning model (which we often just simply call the hyperexponential model), gamma-distributed waning model (which we often just simply call the gamma-distributed model) and boosting models of infection-derived immunity. The equations for these are given in Eq. (2). The key differences between the the more commonly used basic waning model (exponential waning model, also called the S E I RS model) and the hyperexponential and gamma-distributed models concerns the distribution of waiting time in the immune class. The basic waning model has an exponentially distributed waning time with mean of 1 α and variance 1 α 2 . The waning time in the gamma-distributed model is gamma-distributed (Erlang) with shape parameter of 2 has a mean of 1 α G and variance 1 2α 2 G . Hence, if α = α G this model offers a distribution with a reduced variance and as the shape parameter is increased, there is a greater central tendancy in the distribution (Keeling and Rohani 2008;Wearing et al. 2005). In contrast, the hyperexponential model offers the possibility that variance in waning times may in fact be larger than that generated by the exponential distribution. This is achieved by incorporating two compartments with associated (exponential) waning rates α 1 and α 2 through which fractions ε H and 1 − ε H , respectively, of recovered individuals may regain susceptibility. Thus, a fraction ε H of recovered individuals have immunity waning at rate α 1 and the remaining having immunity waning rate of α 2 , respectively. This results in the mean and variance of the immune period given by ε H α 1 + 1−ε H α 2 and 2 ) 2 , respectively. As far as we are aware, this model has not previously been explored in epidemiology.
The boosting model comprises a substantially more complicated mechanism of infection-derived immunity. In this model, it is assumed that previously infected individuals initially enter the R 1 compartment where they are fully protected. However, their immunity eventually wanes and they enter the R 2 compartment where immunity is partial with a proportion k of exposures in this class leading to re-infection. Partial immunity reduces the hazard of infection by the parameter δ ∈ [0, 1). The remaining proportion 1 − k of re-exposed individuals instead experience a boost in immunity and return to R 1 . For individuals not re-exposed to the pathogen, immunity in R 2 eventually wanes and individuals become fully susceptible once again. The concept of immune boosting is further discussed in Wearing and Rohani (2009) and a models incorporating this mechanism for both infection-and vaccine-derived immunity have been fitted to pertussis time-series data in (Blackwood et al. 2013b;Lavine et al. 2013Lavine et al. , 2011Wearing and Rohani 2009).
The equations involved for the seventh and last model (the asymptomatic model) are given by Eq. (3). This model includes two parameters that influence immune failure and its epidemiological consequences: mean waning rate α and a relative infectiousness parameter θ that is equal to the reduction in infectiousness of individuals previously infected relative to naive infections. This model structure has been previously studied to examine the epidemiological consequences of repeat infections in pertussis (Blackwood et al. 2013b;Cellès et al. 2018;Wearing and Rohani 2009), rotavirus (Pitzer et al. 2009) and COVID-19 (Saad- Roy et al. 2021).
In the asymptomatic model, the S 1 compartment contains individuals that have never been infected before. If these individuals get exposed, they go through the first exposed class E 1 then first infectious class I 1 and we assume that these infectious individuals are symptomatic and infectious. Individuals that recover go to the R 1 then R 2 classes where we assume immunity is gamma-distributed. Afterwards, they become susceptible again and thus can be infected again. However, if they are re-infected we assume that they are asymptomatic, and possibly less infectious. For this reason, we have to have the S 2 class, which are susceptible individuals that have been infected before. Individuals that are reinfected then go to E 2 and I 2 classes and we assume that I 2 is only a fraction θ , with θ ∈ [0, 1], times as infectious as I 1 due to these individuals being asymptomatic. Since the waning period of immunity in (3) is gamma-distributed, the gamma-distributed model can be derived as a special case of the asymptomatic model with θ = 1.
All model parameters are defined in Table 1. In all of the models, secondary infections do not affect the basic reproduction number (Diekmann et al. 1990; van den Driessche and Watmough 2008) of the systems. Thus for all of these models we still have as in the S E I R and S E I S models. This is clear because the basic reproduction number for systems like this is defined to be the spectral radius of the next-generation matrix linearized at the disease-free equilibrium (Diekmann et al. 1990; van den Driessche and Watmough 2008) and thus does not involve reinfections.

Disease-free equilibrium
Disease-free equilibria are equilibria of each system of differential equations with the infectious compartments (I in the first six models, I 1 and I 2 in the last model) set to zero. Setting I = 0 in (1) easily yields that (S, E, I , R) = (1, 0, 0, 0) is the unique disease-free equilibrium of the waning, all-or-nothing and leaky models. Similarly, setting I = 0 in (2) yields that (S, E, I , R 1 , R 2 ) = (1, 0, 0, 0, 0) is the unique diseasefree equilibrium of the gamma-distributed, hyperexponential and boosting models. Finally, setting (1, 0, 0, 0, 0, 0, 0, 0) is the unique disease-free equilibrium of the asymptomatic model. The stability of each disease-free equilibrium depending on the values of the parameters of the models is discussed in Sect. 4.

Endemic equilibrium
Here we prove the existence and uniqueness of the endemic equilibrium for each of the different models by proving the existence and uniqueness of a positive "force of infection" at equilibrium. The force of infection is the value denoted by λ for each model. This is the rate at which susceptible individuals are infected and it depends on the values of the infectious compartments. We denote its fixed value at an endemic equilibrium by λ * , solve the equilibrium equations of each model for λ * and show that each system yields a unique positive solution.  Asymptomatic α Mean waning rate of immunity. Waning period has Erlang distribution with shape parameter 2 and rate 2α.
[0, ∞) The default values of the parameters used in plots (unless otherwise specified) are also given. Note that the default values were chosen so that the population is assumed to have an average lifetime of 60 years and the disease has an incubation period of 5 days and infectious period of 8 days For some of the models it is easy to derive exact expressions for λ * . To simplify some of our calculations, we define the following quantity, = probability of going from exposed to recovered (4)

Exact expressions for *
We first look at the expression for λ * for the S E I R model, which is a special case of (1) with ε L = ε A = α = 0. The force of infection at the endemic equilibrium is, The S E I S model is a special case of (1) with ε A = 1 (or ε L = 1 or α → ∞). The force of infection at this equilibrium is given by, For four of the seven models of imperfect immunity that we have considered, it is also possible to derive a simple form for the force of infection using an "effective" failure parameter ε eff . These four models are the waning, all-or-nothing, gamma-distributed, hyperexponential models and each ε eff is defined in Table 2. Given this, the force of infection at endemic equilibrium is given by, The definition of ε eff = α α+μ for the exponential waning model has been used before in Magpantay et al. (2014) for a model of vaccination, with a similar interpretation (the probability of immunity waning within a lifetime). There do not appear to be a simple ε eff expressions for the leaky, boosting and asymptomatic models such that we can write (7) for these models.
The endemic equilibrium force of infection for the leaky model is the positive solution to the following quadratic equation in λ * , For this model we know that there is only one positive equilibrium and it is given by, Waning Similarly, the endemic equilibrium value of the force of infection for the boosting model can be found by finding the positive root λ * to the following quadratic equation: The exact equilibrium value for the asymptomatic model can be found by finding the positive root λ * to the following quadratic equation: We omit finding the explicit expressions for λ * in (10) and (11).

Properties of * using auxiliary function f
The explicit expressions for the force of infection at endemic equilibrium of the boosting and asymptomatic models (found by solving (10)- (11)) are long and it is not easy to show that they are unique. However we can actually prove uniqueness and derive properties of λ * for all the models indirectly. This is done by writing an expression involving λ * with the following form: In Table 3 we present the forms that f takes for each of the different models. We omit the derivation of these forms. Let g(λ) = λ − μ(R 0 − 1). From (12), the endemic equilibrium force of infection λ * is a solution to g(λ) = f (λ). We next show that this equation always has one unique solution on (0, ∞) for all the models. Clearly the solution of the S E I R model is λ = μ(R 0 − 1). As for the other models, if the model parameters are all nonzero, we can show that in all these cases, f (0) = 0 and f (λ) > 0 for all λ ≥ 0. It follows from this that there is at most one positive solution to (12).  (12) Model Auxiliary function f (λ)

SE I S qλ
Waning ε eff qλ All-or-nothing ε eff qλ Since g is a simple straight line with slope equal to one, we can show that if f (λ) ≥ 0 for all λ > 0 and f (∞) = lim λ→∞ f (λ) < 1, then there is a unique positive solution λ * to g(λ * ) = f (λ * ) and this solution satisfies For instance, the auxiliary functions for the waning, all-or-nothing, hyperexponential and gamma-distributed models all have f (λ) = qε eff < 1 and f (λ) = 0. Thus, the solution to g(λ * ) = f (λ * ) satisfies λ * ∈ μ(R 0 −1) 1−qε eff , μ(R 0 −1) 1−qε eff . Hence, λ * = μ(R 0 −1) 1−qε eff in these cases, which is what we already found before in (7). Expression (12) is useful to derive the range of values of the leaky model whose auxiliary function is non-linear unlike in the previous models. The first and second derivatives of the leaky model's auxiliary function are given by It follows that f (0) = qε L and f (∞) = q. Both the first and second derivatives are strictly positive for all λ > 0. Therefore, the solution to g(λ * ) = f (λ * ) must be unique and, This shows that the force of infection of the leaky model is greater than μ(R 0 −1) 1−qε L which is the force of infection expression for waning/all-or-nothing/hyperexponential/gamma-distributed models with ε eff = ε L , and less than μ(R 0 −1) 1−q which is the force of infection for the S E I S model.  (14) to the solution of g(λ * ) = f (λ * ) for the leaky model. The intersection between the line g(λ) and the curve f (λ) is the solution. The dotted orange line is f (0)λ and its intersection with g(λ) establishes the lower bound in (14). Likewise, the dotted purple line is f (∞)λ and its intersection with g(λ) establishes the upper bound in (14).
The bounds on λ * that we found for the leaky, boosting and asymptomatic models are summarized below in Table 4. The tightness of the bounds about the exact value of λ * depends on the parameters of the model. For all three models the difference between the upper and lower bounds increase with increasing value of the basic reproduction number R 0 . If μ, σ , γ and β are fixed (and therefore R 0 and q are also fixed), this difference still depends on the model-specific parameters. For the leaky model, the difference increase as the value of the leakiness parameter ε L increases. For the boosting model, the ratio between the two bounds depends on the value of (α+δkμ)(ξ k+μ) (α+μ)(ξ +μ)k (if this were equal to one then the interval for the endemic force of infection would contain just a single point). For the asymptomatic model, the bounds depend on the model-specific parameters θ and ε in a more complicated manner.

Model
Interval for λ *

Stability of equilibria
We use the notation R n + to denote the positive cone given by Since all models were set up such that the overall birth rate equals the per capita death rate from each compartment, solutions to (1) 1}. When we discuss global asymptotic stability of the systems, we only mean this in the context of solutions initialized within each given invariant set.

Global asymptotic stability of the disease-free equilibrium
From the general theory of compartmental epidemiological models (van den Driessche and Watmough 2002), we know that the unique endemic equilibrium of each model is at least locally asymptotically stable if the basic reproduction number R 0 < 1. To prove global asymptotic stability we use LaSalle's Invariance Principle (LaSalle 1976;Muller and Kuttler 2015). For the waning, all-or-nothing and leaky models given by (1), we define The derivative of L along the trajectories of (1) is given by, In the set = {(S, E, I , R) ∈ R 4 + , S + E + I + R = 1}, we know that S + R ≤ 1 which means S + ε L R ≤ 1. If R 0 < 1 then d L dt < 0 for as long as I > 0. We see that d L dt = 0 only on the subset of where I = 0, and the largest invariant subset of this is {(S, E, I , R) ∈ R 4 + , E = I = 0, S + R = 1}. Thus all trajectories starting from tends towards E = I = 0, and using this in (1) we see that, for each model, all such trajectories must approach its unique disease free equilibrium. This proves the global asymptotic stability of the unique disease-free equilibrium corresponding to each of the three models described by (1).
For the gamma-distributed, hyperexponential and boosting models given by (2), we again define L = E + μ+σ σ I . Taking the derivative of L along solutions to (2) and simplifying yields, dt < 0 for as long as I > 0. Following the same reasoning as before, we can prove the global asymptotic stability of the disease-free equilibrium corresponding to each of the three models described by (2).
Finally, for the asymptomatic model give by (3), we define Taking the derivative of L along solutions to (3) and simplifying yields, dt < 0 for as long as I 1 > 0. We see that d L dt = 0 only on the subset of where I 1 = 0, and the largest invariant subset of this is {(S 1 , E 1 , I 1 , R 1 , R 2 , S 2 , E 2 , I 2 ) ∈ R 8 + , E 1 = I 1 = E 2 = I 2 = 0, S 1 + R 1 + R 2 + S 2 = 1}. Thus all trajectories starting from tend towards E 1 = I 1 = E 2 = I 2 = 0, and using this in (3) we see that all such trajectories must therefore approach the unique disease free equilibrium of the asymptomatic model.

Local asymptotic stability of the endemic equilibrium
From van den Driessche and Watmough (2002), we know that the unique endemic equilibrium of each model is at least locally asymptotically stable if R 0 > 1. Sample trajectories of these models suggest that as long as the models are initialized such that the exposed and infectious compartments are not all zero, trajectories of all the models do tend towards the endemic equilibrium if R 0 > 1. Some references confirm this "global stability" property for some special cases such as in the S E I R, S E I S and S E I RS (waning) models (Li and Muldowney 1995;Li and Wang 2002). There are some general methods using the LaSalle Invariance Principle and Volterra-type functions to prove global stability of the endemic equilibria of vaccination models (with imperfect vaccine-derived immunity but perfect infection-derived immunity) (Li et al. 2011), however these did not work out for our systems of equation which had no vaccination but imperfect infection-derived immunity. We do not prove global stability of the endemic equilibrium of the models in this paper, however this does not affect our results. The reinfection probabilities that we derive in the next section are computed at the endemic equilibrium which we know to at least be locally asymptotically stable.

Reinfection probability
One way to measure the impact of imperfect infection-derived immunity is to find the probability of reinfection (the probability of returning to an exposed class within the individual's lifetime after leaving it for the first time). This probability changes with the number of individuals infected. In this work, we evaluate this at the unique endemic equilibrium of each model.

Definition 1 (Reinfection probability)
Let r be the probability, at endemic equilibrium, that an individual goes back to being in an exposed state a second time after being in an exposed state the first time.
Since r is evaluated at endemic equilibrium, it depends on the value of λ * . The value of r for each model is given in Table 5.
The expressions for r can be derived by following an individual in the E compartment and multiplying together the independent probabilities of traveling from each compartment to the next until the individual reaches the E compartment once again. For example, in the waning, all-or-nothing, hyperexponential and gamma-distributed models, the probability of going from E to R is given by q. The probability of going from R to S is given by ε eff . Finally, the probability of going from S to E is given by λ * λ * +μ . Thus, the reinfection probability expressions for these models are given by r = qε eff λ * λ * +μ . The expressions for the S E I S and leaky models can be just as easily derived.
The expression for the boosting model was found by simplifying the expression: This expression accounts for all the ways that an individuals from the E class can go back again to the E class in the boosting model.
We note that the r values for all models except for the asymptomatic model have the form f (λ * ) λ * +μ , where f is auxiliary function given in Table 3. The asymptomatic model does not have this form because in this case r is the probability of going from E 1 to E 2 instead of returning to the same E class. Thus in this case the reinfection probability is simply q times ε = 2α 2α+μ 2 , which is the probability of going from R 1 to S 2 , then times λ * λ * +μ . We also computed the reduction in reinfection probability relative to the S E I S model. This is computed for each model by taking its r value and dividing it by the r value for the S E I S model with the same R 0 . We plot the relative reduction in reinfection probabilities in Figs. 4 and 5.

Summary and conclusions
Imperfect infection-derived immunity is a feature of many communicable diseases such as influenza, tuberculosis and potentially even COVID-19 (Roy 2020). Infectionderived immunity can wane over time, be only partially protective, completely fail in some individuals or have more complicated interactions due to immune boosting. In this study we reviewed seven compartmental disease models that feature one or more of these immunity imperfections.
To assess the impact of each models' respective immunity failure we defined the "reinfection probability," the probability that an individual in an exposed state goes back to the exposed state again in the future, given that the system is at endemic equilibrium. This gives a rigorous measure of how much infection-derived immunity individuals get from infection. We note that the reinfection probability for the S E I R . Note that for the SE I R model, λ * > 0 (but looks close to be zero in this scale) and r = 0. The SE I S model has r ∈ (0, 1). The relative reinfection probabilities are the reinfection probabilities r of each model divided by the r for the SE I S model. Values of μ, σ and γ are given by the default values listed in Table 1. We used β = 60 yr −1 corresponding to R 0 ≈ 1 .3 for (a, b), and β = 200 yr −1 (corresponding to R 0 ≈ 4.4) for (c, d) (colour figure online)  Table 1 model is zero and that of the S E I S system is between zero and one, depending on other factors such as the basic reproduction number of the system. This risk of reinfection for previously infected individuals can have implications for public health policies aimed at reaching herd immunity, such as the rollout of mass vaccination once a vaccine becomes available.
To derive the reinfection probability for each model, we first demonstrated the uniqueness of the endemic equilibrium for each model, and derived expressions and bounds for the forces of infection at the endemic equilibrium. We proved that, as expected, the force of infection for the S E I R and S E I S models are respectively the lower and upper bounds for the seven models' force of infection. We see that the waning, all-or-nothing, hyperexponential and gamma-distributed models have a similar dynamics in which they all have an "effective failure" parameter. When these effective failure parameters are equal to 1, these models become exactly the S E I S model; when they are equal to 0, these models become exactly the S E I R model. From this, it is clear that the force of infection for these particular models lie somewhere, depending on the value of the effective failure parameter, between that of S E I R model's and that of the S E I S model's.
The other three models (leaky, boosting and asymptomatic models) however, have more complicated force of infection expressions that are difficult to directly compare with the S E I S and S E I R models. We therefore derived auxiliary functions to help find properties of the endemic equilibrium forces of infection for these models. These auxiliary functions reflect how much greater each models' force of infection is to that of the S E I R model, where there is no possibility for reinfection. Additionally, the auxiliary functions allow us to establish the bounds for the leaky, boosting and asymptomatic models' actual force of infection.
After deriving the endemic equilibrium forces of infection for all seven models, whether in explicit form from (7) and Table 2 or through the use of the auxiliary functions from Table 3, we derived the reinfection probability for each model. The reinfection probabilities allow us to give a measure of the impact that different types of immunity failures have on individuals. These are presented in Table 5, and we compare these to the reinfection probabilities of corresponding S E I R and S E I S models in Figs. 4 and 5. The results in Tables 2, 3, 4 and 5 summarize how the different modes by which infection-derived immunity can be lost would affect the reinfection probability and overall disease dynamics (in terms of the long-run prevalence of the disease). For example, even if the (exponential) waning and gamma-distributed waning models have the same mean waning rate (α = α G ), they would have different ε eff (see Table 2) and therefore different reinfection probabilities. Thus, even if we already know that immunity is waning (as opposed to leaky or all-or-nothing) it is not enough to know just the mean waning period of acquired immunity, we still need to know how waning occurs.
This study opens many directions for future study. The different models with a defined ε eff (Table 2), if they are assumed to have the same basic reproduction number will have the same endemic equilibrium disease prevalence values for the same ε eff values. This suggests that it may be difficult to distinguish between these models if we are only looking at equilibria, however the models may have very different transient dynamics that show signatures of the type of infection-derived immunity. Fig. 6 Sample trajectories of the waning and all-or-nothing models showing differences in their transient dynamics before they approach endemic equilibrium. We set A = 0.2 and α = 1 240 yr −1 so that ε eff = 0.2 for both models. The values of μ, σ and γ are given by the default values listed in Table  1, and we used β = 60 yr −1 corresponding to R 0 ≈ 1.3. With these values, the endemic equilibrium for both models can be found using (7) and is equal to Infected proportion of population Waning All-or-nothing As an example, in Fig. 6 we present an illustration of the trajectories of the waning and all-or-nothing models with the same initial conditions and same values of μ, γ , σ (from Table 1), β = 200 (so that R 0 ≈ 1.3) and ε eff = 0.2. Thus, from our results we know that these two models have the same unique endemic equilibrium which we can find from the force of infection given using (7) and Table 2. Both trajectories show that the trajectories show a peak in the infectious class before approaching the endemic equilibrium, and the peak for the all-or-nothing model is higher and later than that of the waning model. It would also be interesting to study the leaky model further. This is the model that provides the most homogeneous sort of infection-derived protection. We note that the prevalence of infection in the leaky model is higher than the other models with a defined ε eff if ε L = ε eff (this is evident from Table 4). We also observe that the leaky model seems to have a sudden transition from being S E I R-like to S E I Slike as ε L is increased. This transition appears to occur at the so-called "reinfection threshold" (Gomes et al. 2004(Gomes et al. , 2005.
in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.