1. Introduction and Related Background
Stochastic infectious disease models can be a crucial public health tool for understanding and managing disease progression. More specifically, such models may be used to analyze the efficacy of suggested control measures [
1,
2] or to examine vaccination strategies [
3]. The global COVID-19 epidemic serves as the best illustration of the importance of these models, where the results of such epidemiological modeling have been used to estimate the basic reproduction number [
4,
5], assess the effectiveness of disease-control measures [
6,
7] and inform policy-making [
8]. These models, however, are of limited use in practice unless they allow efficient estimation of their parameters and offer a good fit to actual epidemic outbreaks. Unfortunately, stochastic epidemic models do not lend themselves to simple parameter inference or model selection. This is because the context of an epidemic is characterized by the difficulties involved, such as the dependence and incompleteness of epidemic outbreak data.
Even if a model’s parameters can be inferred, selecting the best-suited model is a challenging task. For instance, as epidemic data are not independent, straightforward and standard measures of model selection cannot be applied directly. Due to these issues, stochastic epidemic model selection is still in its infancy, and there is a clear need for development [
9,
10,
11].
The focus of this paper is on model selection given complete epidemic data as the researcher’s intention is to derive explicit expressions for the Bayes factor in asymmetrical epidemic settings to gain some insight into the value of Bayes factors as a tool for model selection, and to validate the estimate of the Bayes factor derived from other computational methods proposed in the literature in order to see how reliable they are in situations where complete epidemic data are available but Bayes factors cannot be obtained in closed forms.
1.1. The Stochastic SEIR Epidemic Model
The SEIR model is defined as in [
12,
13,
14]. A closed population of size
is considered, where
n and
k denote the initial number of susceptible and infective individuals, respectively. The population is divided into four compartments. These are called the susceptible, exposed, infectious and removed classes. Let
and
denote the numbers of individuals in the different classes at time
t (so
for all
t). It is also assumed that the epidemic starts at
with
. An individual, while infectious, has contacts with other individuals at the time points of an in-homogeneous Poisson process with rate
, where
is referred to as the infection rate parameter. The overall infection rate function depends on the infection process assumptions. Each such contact results in the susceptible immediately becoming infective. Individuals that receive an infection are initially latent for a time period of
with distribution
, then infectious for a duration of
with distribution
, and finally they become recovered for the remaining time period. The disease spreads until there are no exposed or infectious individuals left in the population for the first time. At this point, no more individuals can receive the infection, therefore the epidemic ends. All latent periods, infectious periods, Poisson processes, and uniform contact choices are assumed to be mutually independent.
In this work, we shall focus on assessing the extent to which the infection mechanism is important in the disease spread via asymmetric epidemic scenarios [
15,
16,
17,
18]. In particular, we consider comparing the standard SEIR model described above with two alternative SEIR epidemic models. The three models are:
: The SEIR with overall infection rate .
: The SEIR with overall infection rate .
: The SEIR with overall infection rate .
The second model is a variation of the standard SEIR model created by relaxing the assumption of a constant infection rate. In epidemic modeling, it is a common assumption that the infection rate, , remains constant throughout time; however, this is not always accurate. Specifically, the implementation of control measures or changes in behavior in reaction to the epidemic could both have an impact on the infection rate over time. In this model, a time-dependent infection rate, , is considered, where we shall assume that in order to discriminate from as setting in the former yields the latter.
The third model
is similarly an adaptation of the standard SEIR model
, where the power parameter
represents the degree of interaction among infectious and susceptible individuals. We shall assume that
[
10,
19] in order to more clearly distinguish between the two models
and
. This way of modeling the infection rate is justified by the fact that the rate of new infections need not increase linearly in
and
. As the epidemic grows, for instance, susceptibles could become more conscious of the possibility of catching the disease and adjust their behavior accordingly. As a result, the power coefficient parameter
is introduced, where the smaller the
, the less susceptibles are exposed to the infectives.
1.1.1. Transition Probabilities
For the model
(
and
can be done similarly), if both
and
are exponentially distributed (with rates
and
, say), the model is called a Markovian SEIR model (see
Figure 1). A special case of this SEIR model is one in which the exposed (latent) period
is not random, as in [
12,
13,
14]. In this study, a fixed latent period of length
l is assumed. The epidemic then develops based on the following transition probabilities in a small interval
,
1.1.2. Types of Epidemic Data
There are generally two types of epidemic data, temporal data and final size data [
20]. Final size data do not show how the disease spreads over time during the epidemic; they only show snapshot information at the beginning and end of the outbreak. Temporal data, on the other hand, reveal details about the state of individuals during the epidemic. Data that contain both infection and removal times are referred to as complete temporal data, whereas data that only include removal times are referred to as partial temporal data. Temporal data may correspond to the times at which individuals are infected or removed.
1.1.3. The Basic Reproduction Number
Threshold behavior is frequently shown in epidemic models. This roughly suggests that during an epidemic, either relatively few individuals become infected or a substantial number are infected. The basic reproduction number,
, which is heuristically defined as the average number of new infections brought on by a single infective in a large susceptible population, is a quantity of critical relevance in mathematical epidemic theory (see, e.g., [
21]). This quantity is important because roughly speaking, in a population of infinitely many susceptibles, if
then, with probability one, only a finite number of susceptibles will become infected (i.e., minor outbreak). However, if
there is a positive probability that infinitely many susceptibles will become infected (i.e., major outbreak) and the disease becomes endemic. Knowledge of the value of
makes it possible to calculate the proportion of a population that should be vaccinated in order to prevent an epidemic from spreading.
1.2. Marginal Likelihood Estimation
The marginal likelihood [
22,
23], also referred to as the evidence or integrated likelihood, is a quantity that gives a standard measure of the fit of a model in a Bayesian setting. Given multiple models that give reasonable predictions, the marginal likelihood of each model offers a mechanism to discriminate between them. What it gives is a measure of the likelihood of the data under the considered model. The issue is that, because it is often analytically challenging, computing the marginal likelihood is rarely straightforward, even in simple models. To calculate the marginal data densities in more complex models, high-dimensional integration is necessary. However, in majority of models, it is not possible to analytically integrate out parameters from the joint distribution for the data and the parameters. This means that numerical methods are required to obtain estimations, and these methods may be computationally costly.
The marginal likelihood could be formally defined as follows. Given a data set
, a statistical model
M with parameter
, a prior distribution
, a likelihood
and a posterior distribution
, then
is the marginal likelihood of the model. It represents the likelihood of the data given the model. It can be calculated by using the equality
where approximations shall be denoted as
, and the conditioning on
M shall be omitted for notational simplicity.
1.3. Bayes Factors
Bayes factor [
23] is one of the most crucial tools for Bayesian model comparison and hypothesis testing. The Bayes factor, which enables model comparison, may be calculated once the marginal likelihood has been determined. Now, suppose there are two competing epidemic models,
and
, with parameters
and
, respectively, and
is the observed data set. The Bayes factor in favor of model
over model
is then given by
where here, and throughout the paper,
denotes a density function.
Analytical calculation of Bayes factors is often challenging. Moreover, the estimation of Bayes factors is, in general, difficult. Many approaches exist to estimate it, but here we focus specifically on simulation-based and easy-to-implement methods. The fact that these techniques are relatively prescriptive and provide the user with few implementation options that might substantially impact the performance of the resultant algorithms is one of its appealing features.
1.4. Model Selection within the Stochastic Epidemic Models Literature
There is currently no favored approach for model selection in the literature of epidemic modeling [
11]. In the Bayesian setting, approaches include the use of Bayes factors [
24,
25,
26,
27], criteria such as the Deviance Information Criterion (DIC) [
26,
27,
28], and methods based on the predictive distribution of future outbreaks [
10,
29]. Bayesian model selection tools have been applied to epidemic models with final size data and temporal data in certain scenarios. Here, we focus on the use of Bayes factors via marginal likelihood estimation.
The use of reversible jump Markov chain Monte Carlo techniques has been a common approach for computing Bayes factors for epidemics [
24,
25], although these methods are often problematic in practice due to the challenge of designing efficient algorithms. Given removal data, a combination of MCMC methods and importance sampling was used to estimate marginal likelihoods from which Bayes factors can be calculated [
30]. A path-sampling method [
31] was implemented to compare epidemic models given data on the final outcome of the epidemic in [
26]. The power posterior approach [
32] was extended and implemented for estimating the Bayes factor in the epidemic context where the epidemic data are only partially observed [
27]. A more complete picture about this topic can be found in [
10,
11].
2. Bayesian Inference via MCMC Methods for the SEIR Model with Time-Dependent Infection Rate
2.1. Complete Data Case
Suppose that an SEIR system is considered and let m denote the number of individuals becoming infectious at times and removed from the population at times with . Similarly, let denote the set of the exposure times, that are the times at which individuals catch the infection but are unable to spread it, such that for refers to the exposure time of the individual who becomes infectious at time and recovered at time , where the initial exposed individual is labeled by such that for all .
Now, taking into account model
, the likelihood of the data given the model parameters may be written as
where
, with
for
, and
indicates the parameter governing the infectious period,
, where
may be a vector.
Note that, when the infectious period distribution is exponential with rate
(
), then
Given complete epidemic data, the Bayesian framework can first be used by assigning the model parameters’ independent conjugate gamma prior distributions as in [
33], namely
, and
. Then, the joint posterior density for
and
(assuming
is known) is obtained by multiplying the prior distributions and the likelihood as follows.
where
The parameters
and
are a posteriori conditionally independent, so we have
The posterior distributions of the two parameters, and , are thus easily accessible, making it simple to obtain any function of these parameters.
Note that the inference for models
and
, given complete data, can be performed in a similar manner (see, e.g., [
10,
14]).
2.2. Incomplete Data Case
When the exposure times and hence the infection times are not observed, the likelihood of the removal times becomes intractable. A common way to handle this issue is to use data augmentation technique [
34,
35] by treating the missing data as extra parameters to be inferred from the data [
33].
We again derive the following full conditional posterior distributions by assigning independent conjugate gamma prior distributions for the model parameters
and
, and further assuming
has an improper uniform prior density on
,
and
Given that the model parameters
and
have closed forms of the posterior distribution, updating them can be performed via Gibbs sampling steps [
10,
33,
36]. However, as the posterior distribution of the component
is not explicitly provided, it needs to be updated using the Metropolis–Hastings step. In general, it is possible to apply (with minor adjustments) the MCMC technique in [
10,
33] to update both the model parameters and the missing exposure and infection times. Bayesian inference for models
and
can be performed in a similar way (see, e.g., [
10,
27]).
However, the focus of this paper is on model choice given complete epidemic data, where we aim to derive explicit expressions for the Bayes factor in asymmetric infection process settings to validate the estimate of the Bayes factor derived from other proposed methods.
2.3. The Behavior of the SEIR Models Featuring Asymmetrical Dynamics of Transmission
One crucial issue of special significance when modeling an infectious disease is how infectious the disease is. The rate at which individuals contract a disease, in other words. The use of strategies to stop the spread of a disease among a population can be facilitated by having access to such knowledge. The effective of having different infection processes can be observed by comparing the removal trajectories and the epidemic duration for an epidemic.
The behavior of models and was investigated using the removal trajectories and the outbreak duration. A simulation study was conducted to investigate how the two SEIR models behave. We simulated 5000 removal trajectories from each SEIR model with for the model and for the model, using a population of size .
The major outbreak components of the final size distributions were permitted to be comparable in the sense that they peaked at around the same values for both models, and we set the mean infectious period to be the same in both models (). The length of the latent period was set at in both models.
It is clear from
Figure 2 that the removal trajectory distributions of the two SEIR models differ in terms of their position and shape. In particular, the
model peaks quicker and has more variants, whereas the
model tends to be more widespread and has a longer epidemic duration.
3. Bayes Factors and Marginal Likelihood Estimation for SEIR Epidemic Models Given Complete Data
In this section, assuming complete outbreak data, we shall derive explicit expressions for the Bayes factor across several epidemic scenarios. This assumption could be unrealistic in practice, although it may arise when outbreaks are being closely monitored. For instance, complete data can be gathered in the early phases of a suspected major epidemic, or in experimental settings for animal diseases. The motivations for looking at Bayes factor formula are that it is of interest in its own right and it provides us of some insights into how to better comprehend this Bayesian model selection tool. In addition, we can validate the estimate of the Bayes factor derived from other methods proposed in the literature such as the arithmetic mean and harmonic mean methods in order to see how reliable they are in situations where complete epidemic data are available but Bayes factors cannot be obtained in closed forms.
3.1. Bayes Factors: Theoretical Aspects
The Bayes factor in favor of model
over model
can be calculated as follows.
The epidemic likelihood may be broken into two independent (infection and removal) parts and, as the removal processes are the same for both SEIR models, they are canceled out. Therefore, we have the following Bayes factor expression:
where
Now, we have
as
, therefore
has an upper bound, that is
In addition, to see the impact of the infection rate prior distribution on the behavior of
, we rewrite
in terms of the mean and variance of the prior distribution, that are
which implies
and
. Substituting these values into (
10) yields
Consequently, as
or
, we have the following limits for the Bayes factor
, namely
and
It can be noticed that as the prior becomes more and more concentrated at (), the Bayes factor becomes more decisive in supporting .
Similarly, the Bayes factor in favor of model
over model
can be obtained as follows.
where,
By rewriting
in terms of the mean and variance of the prior distribution, we have
Consequently, as
or
, we have the following limits for the Bayes factor
, namely
and
It is evident that decreasing the prior uncertainty leads to favoring the model.
These theoretical aspects and explicit Bayes factor expressions are of particular assistance in gaining some insights into what estimated values of Bayes factors might be expected, specifically under different prior assumptions. For this particular epidemic setting, we may conclude that increasing (decreasing) the prior uncertainty of the model parameters reduces (increases) the Bayes factor value.
As an aside, one should be aware of any potential connections to Lindley’s paradox [
37] when employing the Bayes factor criteria to conduct a Bayesian model choice task. However, in this epidemic setting, models are not nested and have the same level of complexity.
Prior Sensitivity Simulation Study
It is well known that Bayes factors can exhibit strong dependence on the within-model prior distributions [
38]. In our epidemic setting, we explore this issue in detail, considering what happens to the Bayes factors for an asymmetrical diffuse prior distribution. A typical case in practice is when
and
(see, e.g., [
27,
39,
40]).
Figure 3 (left) shows
values for some complete epidemic data generated under model
in a closed population of size
, 92 of whom were infected, with parameter values
. The parameter
in model
was set to
, and then
was calculated for various values of
. It is clear that as the prior become more informative (i.e.,
increases), the
becomes more supportive to the data-generating model
.
Figure 3 (right) shows
values for some complete epidemic data generated under model
in a closed population of size
, 92 of whom were infected, with parameter values
. Again, we set
in model
, and then
was calculated for various values of
. It is evident that as
increases (the prior becomes more informative), the
tends to favor the true model
.
3.2. Computational Methods for Marginal Likelihood Estimation
As introduced earlier, and denote the observed exposure, infection and removal times, respectively, with and representing the models’ infection and removal rates parameters. Here we discuss three computational methods to estimate the marginal likelihood presented in the literature of model choice but not applied in model selection of stochastic epidemic models. The rationale is to see how robust and reliable they are when considering dependent data with complex likelihoods such as the ones involved in our epidemic models settings.
3.2.1. Arithmetic Mean Estimator (Naive Monte Carlo Estimator)
Dropping the notational dependence on
M, the marginal likelihood becomes
The arithmetic mean (AM) estimator for
can be obtained by a simple Monte Carlo integration method, that is
where
and
are samples generated from the priors
and
, respectively.
It is well-known [
23] that since the likelihood is typically sharply peaked, most of the prior samples have very small likelihood values, in particular when the prior is diffuse. Therefore, unless
K is very large, the prior samples will contain virtually no points from the high-likelihood region, leading to poor and inadequate estimation of the marginal likelihood. However, by the law of large numbers, this estimator converges to the true expectation as the number of independent samples,
K, drawn from the prior, tends to infinity [
41]. Additionally, this estimate can perform well when the dimensionality of the parameter space is modest, so that enormous prior samples can be generated very quickly.
In what follows, we conducted a simulation study to illustrate the effectiveness of the AM estimator of the marginal likelihood in approximating the true marginal likelihood and hence the Bayes factor. This simulation example was performed under different prior assumptions for each model parameter. As we have a prior of two dimensions in each model,
and
, we expect the arithmetic mean estimates of the marginal likelihoods, namely
and
to be effective in the estimating and recovering the true value of the Bayes factor. Here,
and
, where
, are independent samples drawn from the gamma prior distribution.
We simulated two typical epidemic data sets, one data set was generated under and the other data set was simulated from . Each outbreak was in a closed population consisting of 99 initially susceptible individuals and a single initially infected case. The model parameters for the simulation were () for model and () for model . The resulting final size was 92 under both models. The parameter was set to when fitting .
Under each prior assumption, namely
and
, the true values of the logarithm of Bayes factors were calculated using (
10) and (
14). The estimated values of the logarithm of Bayes factors, under different prior distributions, were computed as follows. Initially, we simulated
K samples from the prior for each parameter and evaluated the marginal likelihoods based on these prior samples using (
20)–(
22). Then, the logarithm of Bayes factors was estimated using the following equations.
The results are displayed in
Table 1. It was found that increasing prior uncertainty of the model parameters does not have much effect on the precision of Bayes factor estimation via AM method, as the prior in our case is low-dimensional and so fast to sample from. These results suggest that as the flat prior distribution expresses a form of neutrality and lack of previous knowledge, its use is possible in the present application. In contrast, a more informative prior (e.g.,
) also has the advantage of estimating
and
more accurately. These results indicate the possibility of using the arithmetic mean estimator of the marginal likelihood as a simple but effective way of approximating Bayes factors in situations where complete epidemic data are available but Bayes factors cannot be obtained in a closed form. For instance, when comparing these SEIR models with unknown
or when comparing the SEIR model with different infection mechanisms and unknown power parameter
.
3.2.2. Harmonic Mean Method
Estimation of the marginal likelihood by harmonic mean approach has become a popular method due to its simplicity. The harmonic mean (HM) estimator was first proposed by [
42] who showed that the marginal likelihood can be estimated from the harmonic mean of the likelihood, given posterior samples. Under the assumption that the prior distribution of the parameters is proper, we have
Therefore,
where
denotes the expected value with respect to the posterior distribution of the models parameters.
The harmonic mean estimator is given by
where
and
are sets of MCMC draws from the posterior distribution.
The simplicity (easy and fast) of the HM approach is its main advantage over other more specialized techniques. It uses only within-model posterior samples and likelihood evaluations, which are often available anyway as part of posterior sampling. This estimator is consistent, but sometimes its variance can be large, since occasionally a sample may be taken into consideration with low likelihood, which significantly affects the result due to the reciprocal presented in (
25). The HM estimator is often biased and results in overestimating the true marginal likelihood [
43]. It is included here because of its simplicity and being not applied as a model selection tool in stochastic epidemic modeling.
3.2.3. Power Posterior Method
An approach for estimating the marginal likelihood based on the idea of thermodynamic integration [
31] was developed in [
32]. The authors introduced an auxiliary variable (temperature parameter)
and defined the power posterior (PP) as
where by construction the normalizing constant of the power posterior is
Clearly, as
p moves from
to
, the power posterior follows a path from the prior to the posterior density, where
is the integral of the proper prior of
and
is the marginal likelihood. It can be shown that
In [
44], the approach was refined so that the power posterior estimate of
becomes
where
and
are the expectation and the variance of
at
q, respectively; and
r is the number of points in the interval
in the temperature schedule.
When considering
model (
and
are performed similarly), at temperature
p, the power posterior densities for
and
can be obtained using (
26), which gives
More details about this method when applied to stochastic epidemic outbreak data can be found in [
10,
27], where the performance of this approach in estimating Bayes factors was investigated and assessed.
4. Extensive Simulation Study
In this section, we present an extensive simulation study for the three considered approaches in which the true values of the marginal likelihoods and hence Bayes factors are known (i.e., can be calculated analytically). Throughout this section, we assumed a fixed latent period of , and we chose . Then, two simulated scenarios were preformed, each scenario was based on 120 epidemic outbreak data sets. These epidemic data sets were simulated using various population sizes () and fitted under two asymmetric prior assumptions, namely and .
To make each of the approaches (AM, HM and PP) for computing the evidence as comparable as possible, we tried to make each of the algorithms equivalent in terms of the number of iterations. Therefore, the results were based on a run of 100,000 after a burn-in period of 5000 iterations, and thinning the chain by taking each 5th value.
Table 2 summarized the two simulated scenarios.
4.1. Scenario I
In this simulated scenario, the data-generating model was
, where, using each population size,
and 100, 20 outbreak data sets were generated. Then, under the two prior assumptions, namely
and
, the true values of the
were calculated using (
10) and the
values were computed using AM, HM and PP methods and their means over the 20 data sets are presented in
Table 3, where each row gives results from 20 simulated epidemics in which the final sizes are matched to
m.
Surprisingly, in this experiment, the AM approach performed very well. This might be a result of having low-dimensional parameter space in our setting. The poorest performance was from the HM estimator. The PP method proved its robustness in estimating Bayes factors.
The mean values of the
and the means of
indicated that as the prior becomes diffuse, the true value of Bayes factors and their estimates using all approaches decrease. In addition to that, the values of Bayes factor were sensitive to epidemic data and were independent of the epidemic sizes. Another point to be mentioned here is that, with small outbreaks, having a vague prior distribution is not recommended and can affect this diagnostic tool for model choice as seen in
Table 3 (the fourth row).
4.2. Scenario II
In the second scenario, the epidemic data were simulated from model
. Using each population sizes, namely
and 100, we generated 20 outbreak data sets. Then, under the two prior assumptions, namely
and
, the true values of the
were calculated using (
14) and their mean is shown in
Table 4. The
values were estimated using AM, HM and PP methods, and their means over the 20 data sets are presented in
Table 4, where we matched the final size of the 20 outbreak data sets to
m.
The AM approach performed very well in this simulated example as a result of the relatively low number of parameters. The HM estimator was poor in recovering the true mean values of the . The estimates produced by the PP method had a high degree of accuracy.
Again, mean values of the and the mean of showed that the true value of Bayes factors and their estimates using all approaches decrease as the prior becomes diffuse. Moreover, unlike in the first scenario, the mean values of were impacted by epidemic sizes. In other words, as the final epidemic increases the evidence becomes clear in supporting the true model.
5. Concluding Remarks
In this paper, we have demonstrated that Bayes factors can be obtained analytically for situations where complete epidemic data are available based on various asymmetrical dynamics of infection transmission. In addition, three computational methods to estimate the marginal likelihood and hence Bayes factor have been discussed: A Monte Carlo estimate employing samples drawn from the prior distribution, known as the arithmetic mean estimate; a Monte Carlo estimate employing samples drawn from the MCMC posterior distribution, also known as the harmonic mean estimate; and a discretized numerical approximation of the thermodynamic integration known as the power posterior estimate. Various asymmetric prior distribution assumptions have been used to see their effects on values of Bayes factors.
Bayes factor expressions that have been derived based on complete outbreak data were of particular assistance in gaining some insights into what estimated values of Bayes factors might be expected, specifically under different prior assumptions. The results also indicated the possibility of using the arithmetic mean estimator (AME) of the marginal likelihood as a simple but effective way of approximating Bayes factors in situations where complete epidemic data are available but closed forms of Bayes factors cannot be obtained.
The results presented in this research should be interpreted as a broad indicator of the level of accuracy of these approaches. It is acknowledged that there are various ways in which some of the algorithms could be optimized, such as the tempering scale in power posterior method and considering other adjusted versions of the harmonic mean approach. Although saying that the AM method clearly performs well, it remains to see how well it performs with more complicated models and different epidemic data. In the author’s opinion, the PP method showed the most promise in terms of accuracy and generality.
The evidence is typically a challenging quantity to estimate, especially if the prior distribution is dispersed, thus it is not surprising that its estimation process may need considerable work in terms of computation time and computer coding. As is the case with the harmonic mean estimator, sometimes the simplest approach may not yield the most precise results.
For further work, it would be interesting to see the efficacy of the methods for estimating the marginal likelihood and Bayes factors in other epidemic settings such as epidemic models with different removal process assumptions. It has not passed our attention to apply this work for incomplete epidemic data; however, we leave this for future work. The comparison of model selection by other model selection criterion such as DIC would be another area of investigation.