{'fraction_non_alphanumeric': 0.03208183191909799, 'fraction_numerical': 0.008354643728931768, 'mean_word_length': 4.764720663372142, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 13, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Modelling preventive measures and their effect on generation times in emerging epidemics

We present a stochastic epidemic model to study the effect of various preventive measures, such as uniform reduction of contacts and transmission, vaccination, isolation, screening and contact tracing, on a disease outbreak in a homogeneously mixing community. The model is based on an infectivity process, which we define through stochastic contact and infectiousness processes, so that each individual has an independent infectivity profile. In particular, we monitor variations of the reproduction number and of the distribution of generation times. We show that some interventions, i.e. uniform reduction and vaccination, affect the former while leaving the latter unchanged, whereas other interventions, i.e. isolation, screening and contact tracing, affect both quantities. We provide a theoretical analysis of the variation of these quantities, and we show that, in practice, the variation of the generation time distribution can be significant and that it can cause biases in the estimation of reproduction numbers. The framework, because of its general nature, captures the properties of many infectious diseases, but particular emphasis is on COVID-19, for which numerical results are provided.


Introduction
While the reproduction number is usually seen as a dynamic quantity, changing over the course of an epidemic, the generation time distribution is often seen as a static object. For example, during the recent COVID-19 pandemic, major efforts have been made to continuously estimate reproduction numbers, while often outdated estimates of the generation time distribution have been employed in the estimation. The distribution of the generation time, which we define here as the time between the infection of a secondary case and the infection of the corresponding primary case, is not an intrinsic property of an infectious disease, on the contrary, it depends on the environment and on the behaviour of the individuals among whom the disease spreads. Consequently, the generation time distribution can be subject to variations, for example, recent studies hint that generation times of SARS-CoV-2 have significantly shortened during the course of the pandemic [2,13,25,31]. When doing inference, it is important to investigate the extent of these variations and take them into account, when substantial.
The significance of the generation time distribution stems from its relation to the initial exponential growth rate of the epidemic and the basic reproduction number, or equivalently the current growth/decline rate and the current reproduction number. In fact, by observing the incidence, the growth rate is often estimated and used together with the generation time distribution to derive the reproduction number by means of the Euler-Lotka equation, see section 3.2 for more details. Therefore, using a current estimate of the growth rate together with a generation time distribution estimated before preventive measures were in place could lead to a biased estimate of the reproduction number. Estimating the reproduction number R in an ongoing epidemic is crucial for efficient control of the epidemic. If for example R = 1.25, the overall number of contacts of infectious individuals must be reduced by at least 20% to stop the epidemic from increasing ((1 − 0.2)R = 1). Similarly, a community currently having a high level of restrictions and current reproduction number R = 0.8 may relax restrictions as long as the number of contacts by infectious individuals does not increase by more than 25% ((1 + 0.25)R = 1). Biases in estimates of R may hence lead to improper conclusions regarding control measures.
Several issues arise in connection with estimation of the generation time distribution. To begin with, in practice it is usually not possible to observe all of the secondary cases caused by a cohort of primary cases, therefore biases due to missing cases arise. Furthermore, moments of infection are rarely observed and surrogate time points are used, such as time of symptom onset. When the epidemic is exponentially growing, short generation times are overrepresented among the observed ones. The generation time may vary during the course of the epidemic because of significant changes in the number of susceptible individuals, for example near the peaks of incidence. When performing inference it is important to take the above mentioned issues into account, see e.g. [10,28,24,29,7]. Another problem, of a different nature, is that the generation time may vary because of changes in the behaviour of individuals, in particular due to preventive measures introduced to reduce the spread of the disease.
The latter problem has received some attention, see for example [2,25,31] in connection with the COVID-19 pandemic, but, unlike the other mentioned problems, has not been extensively studied yet. It is not uncommon that studies, which focus on the important task of estimating other quantities, use an outdated estimate of the generation time distribution which does not represent the current situation, because of changes in the level of preventive measures among different time periods or among different locations. For example, many influential and highly cited studies, such as [11,12], use the estimate of the generation time distribution of SARS-CoV-2 from early 2020 in Shenzhen, China [6]. See also [13], where this problem is highlighted, and references therein. Other influential studies, e.g. [19], use instead estimates of the generation time distribution [33] of SARS-CoV-1 which despite being similar to SARS-CoV-2, resulted in milder preventive measures.
The choice of using outdated estimates of the generation time distribution to obtain muchneeded estimates of other quantities, such as reproduction numbers, is understandable, however, it may lead to biases. That is why in this paper we focus on illustrating, both theoretically and in a COVID-19 example, how various preventive measures change the generation time distribution in emerging epidemics and we draw attention to some scenarios in which it would be preferable to replace the initial estimate of the generation time distribution with an up-to-date estimate that takes into account the non-negligible effect of interventions. A related problem is the effect of asymptomatic individuals on generation times, which we briefly discuss in Subsection 4.2.
We focus on the initial phase of an epidemic, that is when depletion of susceptible individuals is negligible. As the epidemic progresses, some of the potentially infectious contacts of infected individuals will be with already infected or recovered (assumed immune) individuals and thus the effective reproduction number will decrease. The reduction is proportional to the fraction of individuals that have already been infected and hence only slowly changing in the initial phase of the epidemic. Determining the length of this phase depends on the specific outbreak, and thus goes beyond the scope of this paper, but can be done for example by observing that the infection rate in the beginning of the epidemic is close to constant up until a certain percentage of individuals have been infected, say 5%. The time it takes to reach this threshold identifies the initial phase. Our analysis of the generation time distribution can also be easily transferred to other phases of the epidemic in which the fraction of susceptible individuals does not change significantly. Continuing the previous example, also later in the epidemic the infection rate is close to constant over a period where at most 5% get infected. This period is usually shorter around the peak, for example it might take a few months for the first 5% to get infected and later in the epidemic, around the peak, a few weeks for 5% more to get infected. Note that considering later phases of the epidemics would allow one to take into account naturally-acquired immunity, but not waning of immunity if waning is observed over a longer period than the periods mentioned above.
We present, in Section 2, a general stochastic epidemic model for the spread of infectious diseases with a structure that is particularly indicated to analyse the impact of preventive measures on the distribution of generation times and reproduction numbers. The key feature of the model that facilitates this analysis is a random infectivity profile with a random time at which the contact activity of an infectious individual is reduced. We define this random time to be equal to the time of symptoms onset, when no preventive measures are in place, and equal to the time of detection (that can occur by various means, including symptoms onset), when interventions are in place. We assume that for each individual the rate of symptoms onset is proportional to infectiousness, see Subsection 4.1 for a discussion on this assumption and further details.
In particular, we consider the following interventions: homogeneous reduction of contacts and transmission, vaccination, isolation, screening and contact tracing. Clearly all these preventive measures aim at reducing the reproduction number, however, not all of them have an effect on generation times. The analysis in this paper shows that homogeneously reducing infectivity, by reducing contacts or transmission, as well as vaccination do not change the generation time distribution, see Subsections 5.1 and 5.2. On the contrary, reducing the contact activity of, or isolating, symptomatic individuals does have a significant impact on generation times, see Section 5.3. For example, in the COVID-19 scenario illustrated in Section 6, the natural intuition that this preventive measure shortens generation times is confirmed. Furthermore, our analysis shows that other interventions affecting the generation time distribution are those aiming at expediting the time at which an infectious individual is isolated, or reduces their contact activity, such as screening and contact tracing. In particular, in the COVID-19 scenario with isolation of detected individuals, if the population is screened uniformly, that is, each individual is randomly tested at a certain constant rate, generation times are shortened, and if contact tracing is put in place, the shortening becomes substantial. Using a pragmatic approach, aimed at providing a general analysis of the impact of contact tracing at the population level, we make an approximation of the contact tracing mechanism and we provide a rigorous derivation of the rate at which individuals are contact traced. See Subsection 5.4 and the supplementary material for a detailed discussion on screening and contact tracing.
In Section 5.5 we summarise the results in a general formula for the generation time distribution that takes into account the cumulative effect of all interventions. The model, the analysis and the general formula for the generation time distribution (sections 2 -5) are valid under general conditions and thus can be used to study various infectious diseases by defining a suitable infectivity profile and parameters. In Section 6, we tune the model to fit a COVID-19 scenario to illustrate the theoretical general results in a realistic example, and, perhaps more importantly, to investigate the extent of the impact of interventions on the generation time distribution and reproduction number in a framework that allows for further extensions.
Infectivity process and infectivity function λ = {λ(t)} t≥0 , β Infectiousness process X = {X(t)} t≥0 Contact process C = {C(t)} t≥0 Contact rate before and after symptom onset / detection C 1 , C 2 Time of contact activity reduction and its conditional rate τ, α τ Time of symptoms onset, its conditional rate and corresponding parameter T S , α S , a S Probability of asymptomatic infection p asy Time of detection and its conditional rate T D , α D Time of screening and its rate T scre , α scre , σ Time of contact tracing and its conditional rate T CT , α CT Probability of successful contact tracing p Other quantities related to contact tracing α CT 1 , f, α CT 2 , a CT 2 , d Reduction fractions of contacts and transmission ρ C , ρ X Reduction fractions due to vaccination ρ V and to isolation of symptomatic and detected individuals ρ S , ρ D Fraction of vaccinated individuals v Relative susceptibility (vaccination response) A, a Relative infectivity (vaccination response) B, b

The stochastic model
The model we present can be interpreted as a special case of the very general epidemic models in e.g. [4,28], tailored to consider preventive measures and to study their impact. A summary of the notation, including stochastic processes, random variables, parameters and functions is given in Table 1. We adopt the classical assumption that the population is homogeneously mixing. This is a natural assumption, despite it being a simplification of reality, as it allows an analysis which is valid for the numerous wide-spread models that are based on the very same assumption. Future investigation could consist of removing this assumption and repeating the analysis for more complex models based on networks. In this model, we also assume that all individuals are equally susceptible at the start of the epidemic, whereafter they might be infected and later removed. On the contrary, infectious individuals are not equally infectious, they have infectivity profiles which are independent and identically distributed, as in [4,28]. That is, the infectivity profile of an infectious individual is the realization of a stochastic process λ, the infectivity process, which is the product of a contact process and an infectiousness process, described in the following. This allows modelling some inhomogeneity in the population, in fact, although identically distributed, individuals' contact behaviours and infectiousness can vary. It is known [4] that, when the initial phase of an epidemic is considered, and thus depletion of susceptible individuals is negligible, this epidemic model corresponds to a Crump-Mode-Jagers branching process [18]. This allows using results from the theory of branching processes to analyse the epidemic model.
2.1. Infectiousness process. The infectiousness profile of an infectious individual is an independent realization of the continuous-time, [0, 1]-valued stochastic process X = {X(t)} t≥0 , the infectiousness process. Given X, if a contact between the infectious individual with infectivity profile X and a susceptible individual occurs at time t (since the infection of the infectious individual), then infection of the susceptible individual happens with probability X(t). In the following, we mention two possible choices for the infectiousness process.
Example 1 (Infectiousness profiles with a deterministic shape). Let X 1 be a random variable with values in [0, 1], X 2 a random variable with values in R >0 , and let h : R ≥0 → [0, 1] be a deterministic function. Then a possible construction of the infectiousness process is X(t) = X 1 h(tX −1 2 ). This is based on the assumption that the infectiousness profile has the same shape for all individuals, given by the function h. Furthermore, since not all individuals are equally infectious, each individual is associated to a pair of random variables distributed as (X 1 , X 2 ), which determine the strength and the location of the peak of infectiousness.
Example 2 (Infectiousness profiles in the SIR model). In the well known SIR stochastic model, the infectiousness process corresponds to X(t) = xI [0,I] (t), where x is the probability of infection and I is the (random) length of the infectious period.
2.2. Contact process. The contact activity of an infectious individual is a realization of the continuous-time, R ≥0 -valued, stochastic process C = {C(t)} t≥0 , the contact process. An individual's contact activity may depend on their infectiousness profile, but is assumed to be independent of other individuals' contact activities. Given C, an infectious individual with contact activity C has contacts with other individuals at the time points of an inhomogeneous Poisson process with intensity C(t), time being measured since the infection of the infectious individual.
We assume that the contact process has the following form where τ is a random time at which the initial base contact activity C 1 is reduced to C 2 . The R ≥0 -valued random variables C 1 and C 2 , with C 2 ≤ C 1 , are possibly dependent on each other, but are assumed to be independent of anything else. We assume that the random time τ has conditional rate α τ (t), at time t, given the contact activities, C 1 , C 2 , and given the infectiousness processes until time t, that is, given X t which corresponds to the natural filtration associated to the infectiousness process. This means that the conditional distribution of τ is of the form Having defined a contact process of the form (2.1) allows enough flexibility to describe realistic scenarios we are interested in analysing, while enabling a solid mathematical formulation. In fact, as shown in the next sections, different definitions of α τ , C 1 , C 2 , allow modelling contacts in several scenarios, with and without preventive measures. In particular, τ can be defined to model for example the time of symptoms onset or, more generally, the time of detection by symptoms onset or by other preventive measures, e.g. screening and contact tracing. More details on τ are provided in Section 4 and Subsection 5.4, where modelling of symptoms onset and detection are respectively addressed.
2.3. Infectivity process. Infectivity profiles of infectious individuals are independent realizations of the continuous-time, R ≥0 -valued stochastic process λ = {λ(t)} t≥0 , with The infectivity process λ combines the effects of the infectiouness process and the contact process. In a susceptible population, given λ, an infectious individual with infectivity profile λ infects other individuals at the time points of an inhomogeneous Poisson process with intensity λ(t), time being measured since the infection of the infectious individual. This is equivalent, by properties of Poisson processes, to the description in the previous subsections: the infectious individual has contacts at the time points of an inhomogeneous Poisson process with intensity C(t), and a contact at time t results in an infection with probability X(t). Note that the process that counts the infectious contacts, i.e. the counting process N = {N (t)} t≥0 , with random intensity λ, is a Cox process, also known as doubly-stochastic Poisson process, see e.g. [26]. We have described the role of the infectivity process in a completely susceptible population, instead, if some individuals are not susceptible, contacts with those cannot result in infection. However, in the initial phase of an epidemic, which is what this paper focuses on, depletion of susceptible individuals is negligible and thus the above description of the infectivity process is valid.
3. Some quantities of interest 3.1. Reproduction numbers. In this framework, the infectivity function, i.e. the average rate at which a typical infected individual infects others in a fully susceptible population, is simply the expectation of the infectivity process, that is where G τ (t) is defined in (2.2). Therefore, the average number of individuals infected by a typical infectious individual, the reproduction number, is where is the average number of individuals infected by a typical infectious individual before reducing their base contact activity (e.g. before symptoms onset, or before detection), and is the average number of individuals infected by a typical infectious individual after changing their contact activity. The above formulas for R, R (1) and R (2) give a theoretical means of comparison of the effect of various preventive measures, in particular, considering R (1) and R (2) separately can be useful to better understand strengths and limits of a certain intervention. For example, by simply isolating infectious individuals after they show symptoms, R (2) can be significantly reduced, however, if no other preventive measures are in place, R (1) remains unchanged and thus R cannot be reduced below R (1) . However, often in practice, the reproduction number cannot be estimated directly by formulas of the type above and estimates rely instead on another approach, which is described in the following subsection.

Generation time distribution.
A valuable tool to estimate the reproduction number is the Euler-Lotka equation which relates the reproduction number R to the, usually more easily observable, Malthusian parameter, the exponential growth rate r, see e.g. [32]. As shown in [7], in the initial phase of an epidemic, the incidence quickly approaches exponential growth, with rate r, and thus the Euler-Lotka equation, arising from population dynamics, applies This equation links the reproduction number and the growth rate through the function g, the generation time distribution, which, in the framework of this paper, as in [28], is expressed as It is because of its appearance in the Euler-Lotka equation that the generation time distribution has a crucial role in inference. In fact, knowing g allows deriving R from r or vice versa. As pointed out in [28], the intuitive definition of the generation time as the time between a primary and a secondary case has several mathematical counterparts, and it is thus important to recall that g in the Euler-Lotka equation corresponds to the following definition. Consider a cohort of infectious individuals (referred to as primary cases) and all of their secondary cases. Choose one of the secondary cases uniformly at random and measure the time between the infection of the secondary case and the infection of the corresponding primary case. The probability density function of this random time is equal to g in (3.3), see [28] for more details. Note that this sampling procedure is size-biased, that is, a primary case associated to more secondary cases is more likely to be chosen compared to one associated with fewer secondary cases. For this reason, choosing first a primary case uniformly at random and then one of its secondary cases (also uniformly at random) would yield a different generation time distribution, E λ(t) ∞ 0 λ(u)du , which is not of interest here and should not be confused with (3.3).
This paper focuses on the study of variations of the generation time distribution due to preventive measures. Let us explain why these variations are worth being studied. Imagine an epidemic evolving without preventive measures, with basic reproduction number R 0 , generation time distribution g 0 and growth rate r 0 . When interventions are introduced, R 0 , g 0 , r 0 are replaced by R E , g E , r E . Each of the triplets above satisfies the Euler-Lotka equation. When doing inference before interventions, r 0 is observed and R 0 is derived using g 0 . The same should be done when various interventions are put in place, that is, r E and g E give R E . However, if we observed r E and used g 0 instead of g E , the resulting reproduction number would be biased. The aim of this paper is to study how the generation time distribution varies, from g 0 to g E , when preventive measures are introduced, and how that affects the estimate of the reproduction number.

Modelling symptoms and the neutral scenario
The stochastic model described in Section 2 can capture several scenarios, including the neutral scenario in which no preventive measures are in place. In this case, the random time τ , at which the contact activity of an individual is reduced, is assumed to be equal to the time of symptoms onset T S . In fact, a natural reduction of the contact activity can occur at symptoms onset, even without preventive measures, for example, even if isolation of symptomatic people is not required, having flu-like symptoms naturally reduces contact activity.
Furthermore, by defining τ = T S we can study all those interventions that do not affect the time at which the contact reduction occurs, see Subsections 5.1, 5.2 and 5.3. Whereas, for those interventions that aim at expediting the time at which the contact reduction occurs, e.g. by implementing other means of detection besides symptoms onset, τ needs to be defined differently, i.e. as the time of detection, see Subsection 5.4. This section is dedicated to τ = T S , in particular, Subsection 4.1 is dedicated to mathematical definition of T S , the underlying biological assumptions, and the resulting formulas, which will be crucial in the following sections, while Subsection 4.2 contains a comment on the effect of asymptomatic cases. 4.1. Random time of symptoms onset. Let T S be the time between infection and symptoms onset of an infectious individual. Consider the model of Section 2 with τ = T S . We assume that T S has conditional rate, given X t , α S (t) = a S X(t), where a S ∈ R >0 . In this way the distribution of the time to symptoms onset of an individual depends on their infectiousness process and is independent of their contact process. Furthermore, the above assumption implies that, at any given time, the higher the infectiousness, the higher the rate of symptoms onset. Therefore, it is more likely for a symptomatic infectious individual to show symptoms in proximity to the peak of their infectiousness, in line with what is observed for COVID-19, see e.g. [16,14], and with the viral load of patients with pandemic H1N1 2009 virus infection peaking on the day of onset of symptoms [30]. Furthermore, note that in this model an infectious individual is not necessarily symptomatic, even if highly infectious. We call an infectious individual who never shows symptoms asymptomatic (to not be confused with an individual who has not shown symptoms yet, called pre-symptomatic), this corresponds to T S = ∞. The probability that an individual with infectiousness process X is asymptomatic is This means that the higher the total infectiousness, ∞ 0 X(u)du, the higher the probability of the individual being symptomatic. More generally, the probability that a typical individual is asymptomatic is Making different biological assumptions on symptoms onset would correspond to a different mathematical definition of T S . For example, T S could be defined as the time at which the infectiousness process exceeds a certain threshold. From now on (4.1) is assumed. This is not only a realistic assumption, but also mathematically convenient, yielding explicit formulas for R (1) and R (2) , the average number of individuals infected by a typical infectious individual before and after symptoms onset, respectively. See the supplementary material for more details.

4.2.
Biases due to asymptomatic individuals. Usually the generation time distribution is estimated from data related to symptomatic cases. That is, instead of the real generation time distribution g, the generation time distribution of symptomatic cases, g sy , is estimated, and in turn used to estimate the reproduction number, leading to biases, see e.g. [22,31]. In this subsection we briefly analyse how these two distributions are related.
be the average infectivity rates of asymptomatic and symptomatic individuals respectively. Then the average infectivity rate is Let R asy = ∞ 0 β asy (t)dt and R sy = ∞ 0 β sy (t)dt be the average numbers of individuals infected by a typical asymptomatic infectious individual and by a typical symptomatic individual respectively. It is straightforward to calculate that R = p asy R asy + (1 − p asy )R sy .
The formula above confirms the obvious intuition that the higher the fraction p asy of asymptomatic individuals, the higher the impact of asymptomatic individuals and thus, when data on asymptomatic individuals are unavailable, estimates of R might be biased, unless a correction is made. Furthermore, g sy (t) = 1 R sy β sy (t) and the generation time distribution of asymptomatic individuals is g asy (t) = 1 R asy β asy (t), thus g(t) = q asy g asy (t) + (1 − q asy )g sy (t) where q asy = p asy R asy p asy R asy + (1 − p asy )R sy indicates how much asymptomatic transmission affects the overall generation time distribution.

Interventions
By varying the contact process C, the infectiousness process X, or the random time τ , several types of intervention, and their effect on generation times and reproduction number, can be studied. In particular, the interventions analysed in this paper are grouped in the following categories: • Homogeneous reduction of contact level (e.g. physical distancing, lockdown) • Homogeneous reduction of transmission probability (e.g. face masks) • Vaccination • Isolation of symptomatic individuals • Screening • Contact tracing Note that the latter two interventions aim at expediting the time at which an individual is detected and at lowering their contact activity after detection, while the remaining ones focus on lowering the infectivity process, without affecting the detection time. In the following subsections we analyse the different types of preventive measures, considering one at a time and comparing it with the no-interventions neutral scenario. In Subsection 5.5, the cumulative effect of all interventions is considered and a general formula is provided. 5.1. Homogeneous reduction of contact activity or transmission probability. This subsection is dedicated to the analysis of two types of preventive measures that lead to the reduction of the infectivity process by a multiplicative factor.
The first class of preventive measures that we consider consists of those measures, such as physical distancing or lockdown, that reduce the contact process by a factor ρ C , which is a [0, 1]valued random variable. This means that each individual reduces their contact activity by a factor which is an independent realization of ρ C .
The second class instead consists of those measures, such as introducing face masks, that reduce the infectiousness process by a factor ρ X , which is a [0, 1]-valued random variable. This means that the infectiousness profile of each individual is reduced by a factor which is an independent realization of ρ X .
These measures are homogeneous in the population, that is, we are assuming that each individual is recommended/required to follow the same measures independently of their situation. The random variables ρ C and ρ X are thus independent of the infectivity process. While the measures are homogeneous, the individual response is variable, and thus we use random variables, instead of deterministic constants, to represent the variability in the personal adherence.
Both classes of measures, albeit in different ways, have the same effect on the infectivity process, which is reduced by a multiplicative factor, i.e. λ E (t) = ρ C ρ X λ(t), which yields Therefore, the preventive measures considered in this subsection affect the reproduction number, while leaving the generation time distribution unchanged.

5.2.
Vaccination. In this subsection we complement the underlying epidemic model with a vaccination model as in e.g. [5,3]. We assume that a fraction v of the population receives a vaccine, before the epidemic starts. While this is a simplification of reality, it allows an analysis of the generation time distribution in a population that is partly vaccinated and a comparison with the scenario without interventions. Assume that each vaccinated individual has a random response to the vaccine, determining the reduction in susceptibility and (if infected) infectivity. The response is described by the [0, 1]-valued random variables A and B, the relative susceptibility and the relative infectivity respectively. This means that a vaccinated individual with response A, B has a probability of getting infected reduced by A compared to the probability of getting infected without vaccine, and if ever infected, their infectivity is reduced by a factor B. Note that we are assuming that the vaccine may reduce the infectiousness profile by a multiplicative factor B, without changing its shape, see the supplementary material for a discussion on this assumption.
As in the previous subsection, the infectivity function, as well as the reproduction number, is reduced by a multiplicative factor, E [ρ V ], and therefore the generation time distribution is unchanged. For more details see the supplementary material.
Immunity, or partial immunity, from disease exposure has the same type of effect as vaccination, that is, it reduces the reproduction number without changing the generation time distribution. In fact, as explained in the Introduction, in this paper we are considering a period of time in which the fraction of immune individuals does not change significantly, thus the reasoning around the effect of immune individuals is identical to the one around vaccinated individuals.
Finally, we remark that the effect of immunity waning in vaccinated individuals is not considered here. This goes beyond the scope of the model, since we only focus on dynamics over shorter time periods, i.e. the phases mentioned in the Introduction, rather than on the long term evolution which usually needs to be considered when analysing the effect of waning. 5.3. Isolating symptomatic individuals. As mentioned in Section 4, in a scenario without preventive measures, the initial contact activity C 1 of an individual is naturally reduced to C 2 at the time of symptoms onset, T S . If symptomatic individuals are recommended or required to isolate, then the contact activity after symptoms onset, C 2 , is further reduced by a factor ρ S ∈ [0, 1], ideally close to 0. This preventive measure can be easily included in the model and its effect on the generation time distribution and the reproduction number can be studied by analysing (3.1) and (3.2).
The basic reproduction number, in the no-interventions scenario is R 0 = R 0 . Now assume that symptomatic individuals are required/recommended to isolate, while no other preventive measures are in place. It is straightforward to see that the reproduction number becomes 0 . Therefore, by simply isolating symptomatic individuals, the reproduction can be lowered to a minimum of R (1) 0 , which corresponds to a scenario in which symptomatic individuals are completely isolated and do not have any contact with others. In fact, isolating symptomatic individuals has no impact on the amount of pre-symptomatic or asymptomatic transmission, which defines R Therefore, isolating symptomatic individuals not only affects the reproduction number, but also, unlike the previously analysed interventions, changes the generation time distribution. If other detection measures are in place, the preventive measure discussed in this subsection could be improved by isolating detected individuals in addition to symptomatic individuals. See the next subsections for more details.

5.4.
Screening and contact tracing. In the previous subsections, the time at which an individual reduces their contact activity, τ , was assumed to coincide with the time of symptoms onset. While isolating symptomatic individuals or generally reducing the infectivity process homogeneously in the whole population does not affect τ , other preventive measures instead aim at reducing τ .
Interventions such as screening and contact tracing act by expediting the time at which an infectious individual is discovered to be infectious. This scenario can be modelled by letting τ = T D , the time of detection, and where T scre is the time of screening, T CT is the time of detection by contact tracing. In this framework, we assume that, given the infectiousness and the contact process up to time t, i.e. given X t and C t , the conditional rate of detection at time t since infection is where α S , the conditional rate of symptoms onset, is defined in (4.1), α scre , the screening rate, is defined in (5.2) below, and α CT , the conditional rate of detection by contact tracing, is defined in (5.3) below. We assume screening is performed as follows. Random test are carried out so that the entire population, including infectious and non infectious individuals, is screened uniformly. That is, independently of their infectiousness and contact process, each individual is tested at a constant rate σ. At time t, given X(t), the rate of detection by screening is thus as an individual can only be detected when infectious. This means that, if we consider a small time period of length , any individual, infectious or not, has approximately a probability σ of being tested during that period, thus roughly a fraction σ of the entire population is tested each day, if time is measured in days. Uniform screening is not often used in practice, and thus not representative of most real-world scenarios. The next section illustrates that the effect of uniform screening is moderate, unless σ is large, which in practice requires a substantial screening effort. This motivates why uniform screening is not often implemented as a preventive measure. In order to obtain a bigger impact, it is more efficient to direct testing towards individuals that are more likely to be infectious, as in contact tracing programs, rather than spreading it uniformly over the entire population. Being a more efficient strategy, this is also more representative of the real-world practice, for this reason we now include contact tracing in the model. Modelling contact tracing is notoriously challenging, see [20] for an extensive overview. Various modelling approaches are possible, see for example [8,9] for compartmental models, [25] for deterministic integral equations, [21] for an individual-based stochastic model; and important observations on data have been made, see e.g. [27]. Nevertheless, simpler models that are wide-spread in practical applications rely on strong simplifying assumptions, while more accurate complex models are often intractable in practice. A complicating factor is that, because of contact tracing, infectious individuals are not independent of each other, for example, the infectivity profile of an infector might be truncated because one of their infectees develops symptoms quickly and triggers contact tracing leading to detection of the infector. In order to exactly model contact tracing, it is necessary to keep track of the status of each single individual and of relations between individuals by building additional mathematical structure in the model. An example is given by [21], where each individual in a stochastic SIRS model is associated to an id-number and with the id-number of their infector, this leads to complicated calculations and large simulations, even if the underlying epidemic model is rather simple. The heterogeneity of individuals, which is modelled in this paper by the stochastic infectivity process, leads to further difficulties. Therefore, instead of using a similar approach, aiming at exact expressions and keeping track of each single individual, we focus on approximating the effect of contact tracing to provide insight at population level.
The first approximation that we make is to assume that the infectivity profiles of different individuals are independent of each other, despite contact tracing. Each individual can be contact traced either through one of their infectees, with conditional rate α CT 1 , or through their infector, with conditional rate α CT 2 . As a result of the approximation and of the assumptions described below, the rate at which an infectious individual is detected through contact tracing at a certain time t since their infection, given C 1 and the infectiousness profile up to time t, i.e. given X t , is where p is the probability that contact tracing occurs successfully, pa CT 2 I X(t)>0 is the rate, approximated by a constant, at which an infectious individual is detected through their infector, f is the probability density function of the time between the moments an infectee is infected and detected, and d is the (deterministic) contact tracing delay. It is implied that, if t ≤ d, the integral in 5.3 is equal to zero and thus α CT 1 (t) = 0. We assume that contact tracing stops after one step, which is a reasonable approximation of reality. In fact, it is unlikely that an individual is contact traced through their infectee who in turn has been contact traced, because this would usually take longer than the infectious period. This latter assumption allows deriving an explicit expression for the function f , which would not be possible otherwise, see the supplementary material. Formula 5.3 can be easily generalised to include a random contact tracing delay, as shown in the supplementary material. Finally, assuming that the infector is detected at a constant rate is also an approximation of reality. In fact, this rate varies with time and depends on how long has passed since the infector was infected, while remaining independent of the infectivity profile of the infectious individual under consideration. A non-approximated derivation of this rate is challenging, as explained in the supplementary material, and would require additional structure to be added to the model, which goes beyond the scope of this paper and is left for future work.

5.5.
The cumulative impact of all interventions. Finally, to summarise the analysis of this section, we consider altogether the preventive measures that have been analysed so far and provide a general formula for the generation time distribution under the effect of all preventive measures. When all preventive measures are in place, and in particular, not only symptomatic individuals, but also detected individuals reduce their contact activity by a fraction ρ D , the infectivity function becomes

4) with
where ∧ indicates the minimum and I is the length of the infectious period, i.e. I = ∞ 0 I X(u)>0 du. From the expressions above, it is clear that, while all interventions affect the reproduction number, R E = β E (u)du, only some interventions are found to have an impact on the generation time distribution, g E (t) = β E (t) R E , that is, isolation, screening and contact tracing. In Section 6 the expression above is used to illustrate variations of the generation time distribution in a realistic example.
To relate our results to a model used in numerous applications, we conclude this section with two examples concerning the well-known SIR model, which can be seen as a special case of our general model.

Example 3 (Basic SIR model).
Continuing with the SIR model of Example 2, we recall that the infectivity process is of the form λ(t) = cξI [0,I] , where ξ is the probability of infection, c is the contact rate and I is the length of the infectious period, which is exponentially distributed with parameter a I . In this framework, it is straightforward to show that g(t) = a I exp(−a I t), that is, the generation time is exponentially distributed with parameter a I , see e.g. [29].
Example 4 (SIR model with interventions). Consider a SIR model where the infectious period can be cut short by symptoms onset. That is, the length of the infectious period is I = min{I, T S }. The time of symptoms onset has rate α S (t) = a S ξI [0,I] , thus G T S (t) = exp (−a S ξ(t ∧ I)). It is then easy to show that the generation time is exponentially distributed with parameter a S ξ + a I . Note that in Example 3 neither c nor ξ influence the generation time distribution. On the contrary, in this example, a higher ξ lowers the mean generation time by increasing the rate of symptoms onset, a S ξ.
Screening and contact tracing can be also considered in the SIR model and a formula for the generation time distribution can be easily obtained from formulas 5.4, 5.5, and 5.6, by simply plugging in X(t) = ξI [0,I] , using that I is exponential and analytically computing the integrals. Straightforward but lengthy calculations show that the generation time distribution in this example is a generalisation of a truncated (positive) Gumbel distribution, see the supplementary material for more details.

Illustration: COVID-19 outbreak
In this section we tune the model to resemble a COVID-19 outbreak and illustrate the impact of preventive measures in such a framework. While we use available evidence to define the parameters of the model and thus provide a realistic illustration of Covid-19 scenarios, we do not directly use data in our study. The results presented here are not to be considered as proper estimates of generation times and reproduction numbers for the COVID-19 pandemic, but rather as a means to illustrate the extent of variation caused by interventions.
The infectiousness process is assumed to be of the form described in Example 1 with the function h(t) being a Gamma density, with shape 2.5 and rate 0.5, shifted by 2, in line with the analysis in [16,17], and X 1 and X 2 are uniformly distributed in [0.1, 1.9] and [0.5, 1.5], respectively. We recall that each infectious individual has an infectiousness profile which corresponds to a realisation of the random infectivity profile, thus, in this case, to a realisation of the variables X 1 and X 2 . In Figure 1, some infectiousness profiles, corresponding to different realisations of X 1 and X 2 are plotted. In particular are plotted the underlying profile, corresponding to X 1 = 1, X 2 = 1, and the four profiles corresponding to the extreme cases X 1 = 0.1, 1.9, X 2 = 0.5, 1.5.
In order to model superspreaders, the contact rate C 1 is assumed to have a Pareto II distribution with shape 2.1, scale 5 and minimum 0. The contact rate after symptoms onset or detection is assumed to be C 2 = ρC 1 . For example, ρ = 1 corresponds to no reduction of contact activity after symptoms onset and ρ = 0 corresponds to complete isolation. Furthermore a S = 2, as with this choice the fraction of asymptomatic individuals is around 1 4 , in line with [1]. Monte Carlo integration is used to compute the expectations in (5.4), (5.6). Figure 1. In black, the deterministic curve that shapes the infectiousness process. In colors, various infectiousness profiles, corresponding to the most extreme cases: in blue and light blue, the highest and lowest peak of infectiousness, respectively; in red and orange the latest and earliest peaks of infectiousness, respectively. 6.1. Reducing the contact activity of symptomatic individuals. In this section we analyse the effect of reducing the contact activity of symptomatic individuals by letting ρ vary between 0 and 1 and reporting variations of the generation time distribution and reproduction numbers in Figure 2 and Table 2. We recall that the values presented here are not estimates, they are calculated using the formulas of Subsection 5.5 with the choice of parameters described at the beginning of this section.
When no interventions are in place, it is still unrealistic to expect no reduction in the contact rate due to symptoms, i.e. ρ = 1, first row of Table 2 and blue curve in Figure 2. In fact, an individual with COVID-19 may naturally reduce contact activity when developing symptoms, even if not explicitly recommended or required to do so. This is simply because symptoms, especially if severe, are often associated with a tendency to reduce social activities, as for example is the case with seasonal flu for which no strict isolation measures are in place. Therefore, the scenario without interventions should correspond to one of the first rows of Table 2, for example to ρ = 0.8, as will be assumed in Subsection 6.4. Whereas, the ideal scenario in which all symptomatic individuals are completely isolated at symptoms onset corresponds to ρ = 0. It is evident that, as expected, isolating symptomatic individuals lowers the mean generation time. We conclude that the variation of the generation time due to reducing the contact activity of symptomatic individuals may be, as in this example, quite significant. While the variation of the reproduction number is also significant, this preventive measure cannot bring the reproduction number below a certain threshold, even when applied perfectly, i.e. ρ = 0, because of presymptomatic and asymptomatic transmission.   Table 2. On the left hand side, the generation time distribution (GTD) for different values of ρ, the reducing fraction of contact activity at symptoms onset.
No other interventions are in place, i.e. σ = 0, p = 0. The blue line corresponds to no reduction (ρ = 1) and the red line corresponds to complete isolation (ρ = 0) at symptoms onset. On the right hand side, the corresponding reproduction numbers (total, R, before symptoms, R (1) , and after symptoms, R (1) ) and mean generation times (MGT).

6.2.
Isolating symptomatic and screened infectious individuals. Starting from the assumptions of the previous subsection with ρ = 0, we now include screening. That means that when an individual is detected, through symptoms or screening, their contact activity ceases. In Figure 3 and Table 3 we report variations of the generation time distribution and of reproduction numbers due to the screening rate σ varying between 0 and 0.1. The impact of uniform screening is moderate, mean generation times and reproduction numbers are not affected as much as in the previous subsection. Furthermore, a rate σ = 0.01, entails a high effort in practice, as it requires roughly 1% of the population being screened each day. Higher values of σ are hardly reachable in practice, and as we mentioned above, contact tracing or other targeted testing procedures might be more efficient than increasing the value of σ.

Isolating symptomatic and contact traced infectious individuals.
In this subsection, we exclude screening, i.e. σ = 0 and we consider contact tracing. At symptoms onset or when they are contact traced, individuals are completely isolated, i.e. ρ = 0. The rate at which an individual is detected by through-infector contact tracing is chosen to be a CT 2 = 0.1, the effect of this rate, is analogous to the effect of the screening rate and can thus be seen in the previous subsection, here instead we focus on illustrating the effect of contact tracing through-infectees.
To this aim, we let the probability of successful contact tracing, p, vary between 0 and 1, which respectively correspond to the scenario in which no contacts an individual has made can be traced and the scenario in which all contacts can be traced. The results are reported in Figure 4 and Table 4. The contact tracing delay is chosen to be 24 hours, i.e. d = 1. This is the time between the detection of an infectee and the detection of their infector through contact tracing.  Table 4. On the left hand side, the generation time distribution (GTD) for different values of p, the probability of successful contact tracing. Detected individuals are completely isolated, i.e. ρ = 0, and there is no screening, i.e. σ = 0. On the right hand side, the corresponding reproduction numbers and mean generation times (MGT).
6.4. Biased estimates of reproduction numbers: an example. In the previous subsections we have illustrated that the generation time distribution may vary significantly due to interventions when symptomatic and detected individuals (through screening or contact tracing) are isolated. In this subsection we illustrate how this variation may lead to significantly biased estimates of the reproduction number by presenting several scenarios, one without interventions, one with all interventions and others with some interventions. See Table 5 Table 5. For each scenario the table reports the chosen parameters (reducing fraction of contact activity ρ, screening rate σ and fraction of known contacts p) and the resulting growth/decline rate r, mean generation time M GT and reproduction numbers, R which is estimated from the actual generation time distribution, andR estimated from the generation time distribution g 0 of the neutral scenario.
Neutral scenario: no interventions. Using the same underlying variables as in the previous subsections, we assume that in this neutral scenario without interventions, i.e. σ = 0, p = 0, symptomatic individuals reduce their contact activity by 20%, i.e. ρ = 0.8. Imagine that at the beginning of an outbreak, when no preventive measure is in place, a growth rate, r 0 = 0.23, and a generation time distribution, g 0 with mean 7.38, are estimated. By the Euler-Lotka equation then an estimate of the basic reproduction number, R 0 = 3.98, can be obtained.
All interventions in place. Imagine that, during the same outbreak described in the last paragraph, at a later time, preventive measures are introduced and another growth rate, r E = 0.09, is estimated. We assume that, in this scenario, detected individuals reduce their contact activity by 80%, i.e. ρ = 0.2, that roughly 1% of the population is uniformly screened every day, i.e. σ = 0.01, and that contact tracing is performed in such a way that 70% of the total contacts are reported, i.e. p = 0.7. If we were to use the wide-spread assumption that the generation time distribution does not change during the course of the outbreak, we would use the previously estimated generation time distribution, g 0 , and the Euler-Lotka equation to obtain an estimate of 1.84 for the new reproduction number R E . However, because of interventions, the generation time distribution has in fact changed from g 0 to g E , with a mean of 6.17, which is calculated through the formulas in Subsection 5.5. Using the actual generation time distribution yields the more precise value of 1.67 for R E .
Therefore, the variation of the generation time distribution between the neutral scenario and the scenario with interventions causes a non-negligible bias in the estimate of the reproduction number.
The converse problem can also arise if estimates of the generation time distribution obtained under stricter intervention regimes are used to provide estimates of the reproduction number when interventions are less strict or absent. As mentioned in the introduction, often studies use estimates of the generation time distribution which are based on data collected in China, where extensive contact tracing, including even enforced digital contact tracing, and severe isolation measures were in place. Using this estimate of the generation time distribution to estimate the reproduction number in other countries, where milder preventive measures are in place, may lead to biases, analogously to the situation described above. Likewise, the estimate of the generation time distribution made in one country at a certain time when stricter measures are in place, may lead to biases if used in that same country once those measures are eased. For example, it is relevant to take this issue into account when studying the effect of relaxing preventive measures. The variation of the generation time distribution, and the corresponding bias in the reproduction number estimate, is not always significant and thus can be in some cases neglected, see for example Table 5, where various scenarios with various combinations of interventions are reported. In particular, the closer is the growth/decline rate to zero, the less the estimate of the reproduction number is sensitive to changes of the generation time distribution.

Concluding remarks
The contribution of this paper is threefold. A general model, suitable to describe the spread of various infectious diseases under the effect of various preventive measures, is presented. Variations of reproduction numbers and generation times and related biases are analysed. General theoretical formulas are provided and applied in an illustration of a realistic COVID-19 scenario.
The generality of the model relies on the random infectiousness profile and on the random contact activity of infectious individuals, which allows taking inhomogeneity into account. In this way, the infectivity can vary not only over time, but also among different individuals, depending for example on the severity of the infection. In Section 6 we choose a distribution for the infectiousness profile in line with the results in [16,17], however the formulas in Subsection 5.5 can be used in other settings for any random infectiousness profile, which should be chosen to match appropriate characteristics. Similarly, the random contact activity, which is reduced at a certain random time, allows taking into account different social behaviours of infectious individuals, including for example super spreaders. The model allows a variety of possible choices of explicit forms for distributions, dependencies between quantities and various constants, under non-restrictive modelling assumptions, enabling the representation of most possible interventions.
We perform an analysis of variation of reproduction numbers and generation times. While the variation of the former is a main focus of numerous studies, the variation of the latter is often neglected. In particular, we highlight that variations of the generation time distribution, if neglected, cause bias in the estimate of reproduction numbers, in some scenarios the bias is significant, while in others it is negligible. When doing inference, it is thus crucial to investigate the extent of variations of the generation time distribution in order to determine whether an updated estimate is necessary to avoid significant biases. While the general formula (3.3) is a valuable theoretical tool for this analysis, we also present realistic, although not fitted to real data, examples in order to illustrate the possible variations and draw attention to the problem. We show that in some cases variations of generation times cause significant biases in the estimation of reproduction numbers, which are crucial for example to establish control measures. Because of the general nature of our model, the tools we present can be used in numerous scenarios, combined with real data, to investigate the extent of the variation of the generation time distribution. In this way, proper measures can be adopted to avoid biases when needed, that is, either an estimate of the actual generation time distribution is obtained, or variations of generation time distribution are taken into account in the model itself.
Several challenges remain to be solved and interesting new directions are open for future work. In particular, including a more precise model for contact tracing would sharpen the approximation while requiring additional structure to be included in the model. Furthermore, an in-depth study of how individual variation affects the generation time remains to be done, for example how the variation in C 1 , X 1 and X 2 affects the efficacy of different preventive measures. One such feature of relevance would be to analyse which preventive measures are most efficient in detecting superspreaders, which could be modeled by having large variance of C 1 , and in particular if effective contact tracing is the best method for reducing their effect on an outbreak. Finally, the random infectivity profiles in this paper are suitable to represent the potentially different infectiousness and severity of symptoms related to different variants of SARS-CoV-2, thus enabling an analysis of the impact of new variants on reproduction numbers and generation times, while taking into account the effect of preventive measures. A theoretical analysis, which has been tackled in some specific cases, e.g. [15], would be relevant for the planning of control measures in connection with the emergence of new variants of interest and is left for future work.

Supplementary material
S.1. Disease spreading before and after symptoms. According to the definition of random time of symptoms onset, which is given in Section 4.1, it is possible to provide explicit formulas for R (1) and R (2) , the average number of individuals infected by a typical infectious individual before and after symptoms onset, respectively. By definition,

S.2.
Vaccination. In order to easily illustrate how the infectivity process changes due to vaccination, let us assume, for now, that the vaccine response is deterministic, i.e. for each individual A = a ∈ [0, 1] and B = b ∈ [0, 1]. First of all, the infectivity process is reduced by a factor av + 1 − v because of the reduced susceptibility introduced in the population by the vaccine. Furthermore, the probability that a randomly chosen infectious individual is vaccinated is av av+1−v , in this case the infectivity profile is further reduced by a factor b. Denote by V a Bernoulli random variable that is equal to 1 if the infectious individual is vaccinated, i.e. with probability av av+1−v . When vaccination is in place, the infectivity process is thus If we remove the assumption of a deterministic response, similar formulas hold, involving the expected values of the response random variables, but still leaving the generation time distribution unchanged. We conclude this subsection by discussing the limitations of our initial assumption that the vaccine may reduce the infectiousness profile of a vaccinated infectious individual by a multiplicative factor, without changing its shape. In fact, vaccinated infectious individuals might have an infectious period of a different length, compared to unvaccinated infectious individuals, also, they might be less likely to show symptoms and might have a different behaviour, for example due to the decreased severity of the disease or to the security provided by the vaccine. Therefore, in reality, their infectivity profile might be different, not only by a multiplicative factor, from the unvaccinated infectivity profile. A differently shaped infectivity profile of vaccinated individuals could be included to make the vaccination model more realistic, by incorporating ad hoc assumptions on the infectivity profile, based on available evidence on a specific disease. However, we point out that a differently shaped infectivity profile of vaccinated individuals would contribute to the formula for β E with weight abv abv+1−v , which ideally is a small quantity if the vaccine is effective. This heuristically hints that, under more general assumptions on the infectiousness profile of vaccinated individuals, variations of the generation time distribution due to vaccination are anyway expected to be small for an effective vaccine.
S.3. Contact tracing. As mentioned in Section 2, the epidemic model in this paper corresponds, under certain conditions, to a branching process. Contact tracing could be simulated exactly by superimposing a contact tracing process on the branching process. That is, when an individual is detected, the infectivity profile of the consequently traced individuals is reduced and the original branching tree might be pruned. Whereas, our approximation allows to directly simulate a branching process with discounted birth rates, as shown in the following, incorporating the effect of contact tracing, instead of considering the original branching process with superimposed contact tracing. In particular, we define an infectivity process that accounts for the possible reduction of contact activity due to the individual being contact traced by defining the conditional contact tracing rate, α CT , which increases the detection rate and thus discounts the birth rate in the corresponding branching process. This section contains a rigorous derivation of the contact tracing rate and further discussion on the assumptions. It is known that, given N (t) and λ, the T (i) 's are independent and identically distributed random variables with probability density function λ(t) t 0 λ(u)du I [0,t] , see e.g. [26]. We now use a recursive argument, that is, assuming that T D is already defined and letting L t be the sigma algebra generated by the process λ up to time t, we compute the through-infectees contact tracing rate α CT 1 . To this aim, we compute, conditionally on L t , the probability that the infector has not yet been contact traced through their infectees by time t, i.e. the probability that the time, T CT 1 , at which the infector is contact traced through their infectees, is larger than t. This is equal to the probability that none of the infectees has been detected by time t, assuming for now that there is no delay between detection and contact tracing and that it is possible to trace all contacts. LettingḠ T D (t) = P (T D > t) = E [G T D (t)] be the unconditional distribution of T D , with corresponding probability density functionf , and using the properties of the T (i) 's yields where we have also used that N (t) given L t is Poisson( t 0 λ(u)du), with conditional probability generating function E s N (t) | L t = exp (s − 1) t 0 λ(u)du . Therefore, and differentiating yields Let p be the contact tracing success probability, that is, the probability that a contact can be actually traced. Since we are interested in the contact tracing rate only until detection occurs, in which case λ(t) = C 1 X(t), we obtain, conditionally on C 1 and X t , using integration by parts for the last equality. Therefore, since α D (t) = α S (t) + α scre (t) + α CT 1 (t) + α CT 2 (t), In order to compute G T D , the conditional distribution of T D , by using the equation above,Ḡ T D should be computed first. Assuming that an explicit expression for α CT 2 is known and taking the expectation of the equation above yields an integral equation forḠ T D (t) which should be solved numerically, then, by plugging the numerical solution in (S.1), G T D can be computed. Instead, to obtain an explicit expression for G T D , by making an approximation, it is possible to assume that contact tracing stops after one step, which corresponds to assuming thatḠ T D (t) in (S.1) is replaced by In this case, (S.1) provides an explicit expression for the conditional distribution of the detection time, and the integral equation is avoided.
We can also consider a delay between the moment an infectee is detected and their infector is contact traced. Letting d be the probability density function of the delay time, andf d T D (t) = f T D (t − v)d(v)dv, the through-infectees contact tracing rate becomes If the delay, d ∈ R >0 , is deterministic, we obtain We conclude this section with a discussion on the through-infector contact tracing rate. In fact, while we have assumed it constant, this rate varies with time, depending on how long has passed since the infector was infected. Thus, in a rigorous derivation of this rate, the generation time distribution should be involved. At the same time, the expression of this rate is needed to express the generation time distribution, leading to a loop of definitions that is not easy to disentangle in the current framework. In [25] a deterministic model is used, and an integral equation for the through-infector contact tracing rate is derived, however, a similar argument does not apply here, because of the additional challenges caused by the random infectivity profile. One of the challenges would consist in describing the infectivity profile of an infector, in fact, such an individual ought to be more infectious that an average individual, since at least one infection has occurred. To address these problems, additional structure in the model would be required. Instead, since the rate at which an individual is contact traced through their infector does not depend on their infectivity process, we approximate the through-infector contact tracing rate by a constant. The value of the constant depends on the specific setting and disease of interest, see Section 6.3 for an illustration. Using that I ∼ Exp(a I ), yields 1 − y(t) = a S ξ + σ a I + a S ξ + σ 1 − e −(a I +a S ξ+σ)t .
In order to identify the generation time distribution, we can omit multiplicative constants in the expression above and obtain, using ∝ to indicate proportionality with respect to t, β E (t) ∝ exp − a I + a S ξ + σ + pa CT 2 + pcξ a S ξ + σ a I + a S ξ + σ t · exp −pcξ a S ξ + σ (a I + a S ξ + σ) 2 e (a I +a S ξ+σ)d e −(a I +a S ξ+σ)t .
We recall that the Exponential-Gamma distribution, see e.g. [23], is a generalisation of the Gumbel distribution with probability density function f EGa (t; µ EG , σ EG , α EG ) = 1 Γ(α EGa ) The Gumbel distribution is recovered when α EG = 1. Therefore, by matching the expressions above, it follows that the generation time distribution in this example is a truncated version (with support on the positive real numbers) of an Exponential-Gamma distribution, with parameters µ EG = 1 a I + a S ξ + σ log pcξ(a S ξ + σ) (a I + a S ξ + σ) 2 + (a I + a S ξ + σ)d, σ EG = 1 a I + a S ξ + σ , α EG = 1 + pa CT 2 a I + a S ξ + σ + pcξ(a S ξ + σ) (a I + a S ξ + σ) 2 .