You are a helpful assistant generating synthetic data that captures *System 1* and *System 2* thinking, *creativity*, and *metacognitive reflection*. Follow these steps in sequence, using tags [sys1] and [end sys1] for *System 1* sections and [sys2] and [end sys2] for *System 2* sections.

1. *Identify System 1 and System 2 Thinking Requirements:*
   - Carefully read the text.
   - Identify parts of the text that require quick, straightforward responses (*System 1*). Mark these sections with [sys1] and [end sys1].
   - Identify parts that require in-depth, reflective thinking (*System 2*), marked with [sys2] and [end sys2].

2. *Apply Step-by-Step Problem Solving with Creativity and Metacognitive Reflection for System 2 Sections:*

   *2.1 Understand the Problem:*
   - Objective: Fully comprehend the issue, constraints, and relevant context.
   - Reflection: "What do I understand about this issue? What might I be overlooking?"
   - Creative Perspective: Seek hidden patterns or possibilities that could reveal deeper insights or innovative connections.

   *2.2 Analyze the Information:*
   - Objective: Break down the problem logically.
   - Reflection: "Am I considering all factors? Are there any assumptions that need challenging?"
   - Creative Perspective: Explore unique patterns or overlooked relationships in the data that could add depth to the analysis.

   *2.3 Generate Hypotheses:*
   - Objective: Propose at least 10 hypotheses, each with a Confidence Score (0.0 to 1.0) and Creative Score (0.0 to 1.0), reflecting originality, surprise, and utility.
   - Reflection: "Have I explored all possible explanations or approaches, both conventional and unconventional?"
   - Creative Perspective: Consider novel angles that might provide unexpected insights.

   *2.4 Anticipate Future Steps and Obstacles:*
   - Objective: Make predictions, accounting for potential outcomes and obstacles.
   - Reflection: "What challenges might I face? Is my plan flexible for different scenarios?"
   - Creative Perspective: Visualize unforeseen outcomes and adapt plans to make use of them effectively.

   *2.5 Evaluate Hypotheses:*
   - Objective: Assess hypotheses based on feasibility, risk, and potential impact.
   - Evaluation: Refine Confidence and Creative Scores as needed.
   - Reflection: "Am I unbiased in my assessment? Which options fit best with the overall objectives?"
   - Creative Perspective: Identify hidden opportunities or overlooked details in each hypothesis.

   *2.6 Select the Best Hypothesis:*
   - Objective: Choose the most promising, strategic hypothesis.
   - Reflection: "Why does this hypothesis stand out? How does it uniquely address the issue?"
   - Creative Perspective: Consider any underutilized potential in the selected approach.

   *2.7 Implement the Hypothesis:*
   - Objective: Outline actionable steps for testing the hypothesis.
   - Reflection: "Is this plan practical? What resources or preparation are required?"
   - Creative Perspective: Refine steps to maximize effectiveness and yield unexpected benefits.

   *2.8 Monitor and Review Progress:*
   - Objective: Review progress, noting areas for improvement.
   - Reflection: "What’s working well? What could be improved?"
   - Creative Perspective: Look for emerging patterns that could refine future approaches.

   *2.9 Reflect and Capture Insights:*
   - Objective: Summarize lessons learned and insights gained for future reference.
   - Reflection: "What new understanding has emerged from this process?"
   - Creative Perspective: Identify innovative insights or patterns that could be applied to similar challenges.

3. *Generate Text Output with Interleaved System 1 and System 2 Responses:*
   - Use the tags [sys1] and [sys2] throughout.
   - Aim for a lengthier, detailed response. Combine both direct, straightforward *System 1* insights and reflective, deeply analytical *System 2* segments to capture a blend of quick observations and thoughtful analysis.

---

### *Example Input Text:*

You are tasked with analyzing a sudden shift in customer preferences in a tech market. There has been a noticeable decline in demand for physical devices, with customers increasingly interested in digital-only options. The challenge is to understand this shift, generate hypotheses for why it might be occurring, and explore potential strategies for adapting to this new trend.

---

### *Processed Output with System 1 and System 2 Thinking:*

The tech market is experiencing a shift in customer demand, moving away from physical devices toward digital-only options.

[sys1]
Customer demand has shifted from physical devices to digital-only options.
We need to understand why this change is happening and find strategies to address it.
Key factors may include cost, convenience, and technological trends.
[end sys1]

[sys2]
**2.1 Understand the Problem:**
The goal is to understand the underlying reasons for the shift in demand from physical devices to digital-only options, then develop a strategy to adapt.

*Reflection:* 
"I understand that preferences are changing, but what might be driving this? Is it primarily cost, or are there other factors such as convenience or sustainability?"

*Creative Perspective:* 
"Could there be a larger trend in digital minimalism or a preference for eco-friendly solutions that we’re missing? What unseen motivations might explain this shift?"

**2.2 Analyze the Information:**
There are multiple possible factors driving this shift, from economic influences to cultural shifts. It’s essential to isolate each factor and understand its impact.

*Reflection:* 
"Am I fully considering the various economic and social influences? Could there be a technological factor, like better internet speeds, that makes digital-only products more accessible?"

*Creative Perspective:* 
"Are there patterns or trends in other markets that could shed light on this shift? Could this be part of a larger trend toward virtual experiences?"

**2.3 Generate Hypotheses:**
1. Customers prefer digital options due to lower costs. (Confidence: 0.8, Creative: 0.4)
2. There’s a growing trend toward minimalism and reduced physical clutter. (Confidence: 0.7, Creative: 0.7)
3. Digital products offer greater flexibility and ease of use. (Confidence: 0.6, Creative: 0.6)
4. Environmental concerns are pushing consumers away from physical goods. (Confidence: 0.6, Creative: 0.8)
5. Advances in tech make digital-only options more functional. (Confidence: 0.8, Creative: 0.5)
6. Pandemic-era remote work increased demand for digital solutions. (Confidence: 0.7, Creative: 0.6)
7. Media coverage of the environmental impact of physical devices affects preferences. (Confidence: 0.5, Creative: 0.7)
8. There’s an increase in global digital literacy, expanding market access. (Confidence: 0.6, Creative: 0.6)
9. Customers view digital as more convenient and scalable for future needs. (Confidence: 0.7, Creative: 0.5)
10. Younger consumers prefer the aesthetics and convenience of digital products. (Confidence: 0.6, Creative: 0.6)

*Reflection:* 
"Have I considered all possible influences? Are there any surprising factors that could explain this shift?"

*Creative Perspective:* 
"Could specific social trends, like the rise of influencer culture or digital-first lifestyles, be influencing customer choices?"

**2.4 Anticipate Future Steps and Obstacles:**
*Objective:* Anticipate possible challenges, such as resistance from segments still preferring physical products.

*Reflection:* 
"What market obstacles might we face if we shift our focus to digital-only? Are there sub-segments that still prioritize physical products?"

*Creative Perspective:* 
"Could expanding digital options help us reach a more global audience? Are there emerging trends that we could leverage in our strategy?"

[end sys2]

[sys1]
To address this shift, consider a strategy that incorporates both digital-only offerings and educational campaigns about the benefits of digital solutions.
Use insights from customer feedback and current trends to guide product development.
Focus on flexibility and adaptation to cater to different customer segments.
[end sys1]


Introduction {#Sec1}
============

Infectious diseases are among the most visible and costly threats to individual and public health. Antibiotics, vaccines, and the molecular revolution in biology have not erased their mark. Millions of persons die every year from treatable ancient diseases, such as malaria (Gething et al. [@CR23]; WHO [@CR54]), tuberculosis (Dye et al. [@CR20]), and measles (Orenstein and Hinman [@CR38]; Simons et al. [@CR48]). Sometimes, elimination of these diseases through vaccination, prophylaxis, and/or vector control is possible, but sustaining elimination campaigns is difficult as pathogens approach the point of elimination (Cohen et al. [@CR12]). Conversely, emerging pathogens such as SARS and swine-origin influenza A (H1N1) cause excess mortality, disrupt business, terrorize vulnerable populations, and lead to new, sometimes ineradicable endemic diseases (e.g., HIV/AIDS). The benefits of accurately forecasting disease emergence would be tremendous: in the case of a low-incidence SARS-like pathogen, the savings could be tens of billions of \$US (Rossi and Walker [@CR43]; Smith et al. [@CR49]); an illness resembling the 1918 influenza virus might take millions of lives and impose costs of the same order as a year's gross domestic product (Osterholm [@CR39]).

Elimination and emergence of infectious disease both involve a transmission system that is pushed over a critical point. In most cases, criticality occurs at the point where the basic reproduction number, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$R_{0}$\end{document}$, the number of secondary infected cases arising from a single infected case in an entirely susceptible population, is equal to one (Heffernan et al. [@CR28]). Similar critical points occur in other complex systems (Strogatz [@CR51]; Sole [@CR50]). Particularly, in noisy (stochastic) systems, these critical points manifest as transitions between alternative modes of fluctuation (Scheffer [@CR44]; Scheffer et al. [@CR45]; Lenton [@CR33]; Scheffer et al. [@CR46]). We call such a stochastic transition a *critical transition* if there exists a bifurcation in a suitably constructed limit case of the mean field model. A central problem in the study of critical transitions is the identification of phenomena indicating the proximity to a critical transition in the absence of a detailed understanding on the system's dynamical equations and/or the forcing variables causing the change (Scheffer et al. [@CR45]; Scheffer et al. [@CR46]; Boettiger and Hastings [@CR7]). Recent studies have established that some noise-induced phenomena may signal the approach to a critical transition in a slowly forced dynamical system (Ives and Dakos [@CR29]; Dakos et al. [@CR15], [@CR16]; Dakos et al. [@CR13]; Carpenter and Brock [@CR9]; Donangelo et al. [@CR19]; Seekell et al. [@CR47]; Carpenter and Brock [@CR10]; Brock and Carpenter [@CR8]; Dakos et al. [@CR14]; Carpenter et al. [@CR11]; Guttal and Jayaprakash [@CR25], [@CR26]). If this property would apply to infectious diseases, it would suggest a model-independent route to forecasting infectious disease emergence in subcritical systems with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$R_{0}<1$\end{document}$ (i.e., crossing the critical point "from below") and documenting the approach to elimination in endemic (supercritical) disease systems where $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$R_{0}>1$\end{document}$ (crossing the critical point "from above").

Many of these characteristic noise-induced phenomena involve *critical slowing down*, a decline in the resilience of the system to perturbations, which generally gives rise to an increase in the variance and autocorrelation of fluctuations as the system approaches the transition (van Nes and Scheffer [@CR53]; Dakos et al. [@CR15]). But, these properties require that the transition be suitably regular (Hastings and Wysham [@CR27]). Specifically, to observe critical slowing down requires that the potential function of the system, if it exists, be smooth. Also, for systems with multiple attracting sets (e.g., bistable systems), a sufficient level of noise gives rise to "flickering" which exhibits the characteristic increase in variance (but for a different reason) and not the increase in autocorrelation (Scheffer et al. [@CR45]; Dakos et al. [@CR16]). Other obstacles to anticipating critical transitions in infectious diseases include that epidemiological systems are complicated by amplification of transients and oscillatory dynamics (Rohani et al. [@CR42]; Bauch and Earn [@CR6]), that infectious diseases are often seasonally forced (Altizer et al. [@CR3]; Fraser and Grassly [@CR21]) and propagate in demographically open systems subject to imported cases (Keeling and Rohani [@CR30]), and that diseases that are close to elimination or close to emerging are, by definition, characterized by low prevalence and, therefore, both subject to demographic stochasticity and difficult to observe (Lloyd-Smith et al. [@CR35]). Therefore, to determine whether diagnostic noise-induced phenomena accompany the critical transitions that occur in infectious disease dynamics, namely the transition to endemicity of emerging infectious diseases and the transition to extinction in disease elimination, it will be useful to have a quantitative theory, both to guide the selection of statistical quantities to be investigated and to predict the form that observable quantities should take as the transition is approached.

This paper is a contribution to this theory. We consider the compartmental *susceptible--infectious--susceptible* (SIS) and *susceptible--infectious--recovered* (SIR) models, which are widely used to represent the dynamics of a range of nonimmunizing and immunizing pathogens and may be viewed as approximations to an even broader class of infectious diseases. In their deterministic formulations, these models are characterized by a transcritical bifurcation at $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$R_{0}=1$\end{document}$, where the endemic and disease-free steady states meet and exchange stability. The epidemic models we investigate are generalizations of the closed population SIS and SIR models that allow for immigration from external sources, of which the more familiar models without immigration that are characterized by a transcritical bifurcation are special cases. To appropriately model the slowly forced dynamical system, we first develop mean field theory for the nonstationary systems gradually approaching a bifurcation. We develop the mean field theory here because slowly forced dynamical systems approaching a bifurcation have rarely been investigated (but see Kuehn ([@CR32])). We then develop the full stochastic description in terms of a master equation. Our strategy is to use the van Kampen system size expansion to separate the mean field dynamics from the fluctuations induced by demographic stochasticity. These fluctuations are described by a Fokker--Planck equation, from which the power spectrum, variance, autocorrelation, and coefficient of variation may be analytically obtained. Our main result is contained in Table [4](#Tab4){ref-type="table"}, which provides formulas expressing these theoretical predictions in terms of the dominant eigenvalue of the mean field solutions, which goes to zero as the system approaches the critical transition. Hence, these formulas express how epidemiologically measurable quantities are expected to change as the system approaches the critical transition. A number of approximations are introduced in the derivation of these formulas, including separation of time scales, second-order description of the fluctuations, and continuum representation of the state space. We, therefore, performed simulations to study the possible detrimental effects of these approximations. Specifically, we examined the agreement between the theoretical predictions and "measured" statistics obtained in a moving window, as one would analyze real-world data, in both discrete state-space and continuous state-space simulations. We show that the analytical expressions are robust, provided the conditions of fast--slow systems are met. These results demonstrate that the critical transitions associated with disease emergence and elimination may be anticipated even in the absence of a detailed understanding of their underlying causes.

Theory and methods for emergence and elimination {#Sec2}
================================================

SIS model {#Sec3}
---------

### Mean field theory of SIS model {#Sec4}

We first consider a general SIS model that allows for immigration. Denoting the proportions of susceptible and infectious populations by $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$x(t)$\end{document}$ and $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$y(t)$\end{document}$, respectively, the SIS model in a population of size *N* is given by $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$ \begin{array}{rll} \dot{x} &=& -\beta x y - \eta x +\gamma y \\ \dot{y} &=& \beta x y + \eta x -\gamma y, \end{array} $$ \end{document}$$where $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\beta $\end{document}$ is the the transmission rate, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\gamma $\end{document}$ is the rate of transfer from the infectious class to the susceptible class, and a dot denotes the time derivative. The model assumes that infection may also occur through contact with a trickle of infectious imports at a rate $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta $\end{document}$, either by susceptibles briefly leaving the population and making contact with infectious individuals located elsewhere or through infectious visitors briefly entering the population and making contact with susceptibles, so that the total force of infection is $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\Lambda = \beta y + \eta $\end{document}$. Since the population size *N* is constant, i.e., $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$x+y=1$\end{document}$, the SIS model may be described by a single equation, $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$ \dot{y} = \beta (1-y) y + \eta (1 -y) -\gamma y. $$ \end{document}$$

We note that Eq. ([2](#Equ2){ref-type=""}) can encompass a variety of infectious disease systems, including closed population SI models. Thus, the system can be used to model diseases that confer no long-lasting immunity, e.g., sexually transmitted diseases or acute infections such as influenza or diseases that are fatal. If $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta = 0$\end{document}$, Eq. ([2](#Equ2){ref-type=""}) has two equilibria: the disease-free equilibrium $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$y_{0}=0$\end{document}$ and the endemic equilibrium $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$y^{\ast } = (1-1/R_{0})$\end{document}$, where $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$R_{0} = \beta / \gamma $\end{document}$ denotes the basic reproduction number. When $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$R_{0}>1$\end{document}$, the infection can persist, but if $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$R_{0}<1$\end{document}$, then the infection dies out. The equilibria $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$y_{0}$\end{document}$ and $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$y^{\ast }$\end{document}$ meet and exchange stability when the basic reproduction number $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$R_{0}=1$\end{document}$, i.e., a transcritical bifurcation occurs. We will refer to the SIS model with no immigration as the limiting case. However, it is usually more realistic to assume that a low level of immigration occurs, i.e., $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta $\end{document}$ is positive. If $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta >0$\end{document}$, then Eq. ([2](#Equ2){ref-type=""}) has a single positive equilibrium that is always locally stable, provided $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\beta , \gamma >0$\end{document}$, since the slope at the equilibrium $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\lambda = \beta - 2 \beta y^{\ast } - \gamma -\eta $\end{document}$ is negative. Moreover, whether $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta = 0$\end{document}$ or $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta >0$\end{document}$, the return time $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$-1/\lambda $\end{document}$ decreases in the limit $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\beta \rightarrow \gamma $\end{document}$. At the critical point in the limiting case SIS model, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\lambda =0$\end{document}$. Therefore, the transcritical bifurcation occurs in a suitably constructed limiting case ($\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta =0$\end{document}$), which we suggest gives an indication for the behavior of the fluctuations for the stochastic version of the model with immigration, provided $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta $\end{document}$ is small.

Slow changes in the transmission rate $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\beta $\end{document}$, through demographic or evolutionary means, may induce a transcritical bifurcation of Eq. ([2](#Equ2){ref-type=""}). For example, transmission may decrease as a result of slow increases in vaccination uptake among the population, leading to extinction of the pathogen, or it may increase due to slow decreases in vaccination uptake, potentially causing a transition to endemicity. To formally incorporate slow changes in transmission into the model, we rewrite Eq. ([2](#Equ2){ref-type=""}) as a fast--slow system: $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$ \begin{array}{rll} \dot{I} &=& \beta (1-y) y + \eta (1-y) -\gamma y,\\ \dot{\beta} &=& \epsilon f(y, \beta) , \end{array} $$ \end{document}$$where $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$0< \epsilon \ll 1$\end{document}$ and the function *f* describes the change in transmission rate. In this paper, we assume that transmission is a slowly changing linear function of time, i.e., $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\beta = \beta (t) =\beta (1-p(t))$\end{document}$. The proportion of the population that are vaccinated is modeled by the function $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p(t)=p_{s}+p_{0} t$\end{document}$, with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0}$\end{document}$ an incremental change in $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\beta $\end{document}$. Hence, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\dot {\beta } = p_{0}$\end{document}$. If $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0}>0$\end{document}$, then the rate of transmission is slowly declining over time, and if $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0}<0$\end{document}$, it is slowly increasing. The limit case $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ of Eq. ([3](#Equ3){ref-type=""}) is Eq. ([2](#Equ2){ref-type=""}), and thus, the endemic equilibrium of the limit case assumes $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\beta = \beta (1-p_{s})$\end{document}$, which arises from the level of vaccination uptake $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p(t)$\end{document}$ (the bifurcation parameter). Figure [1](#Fig1){ref-type="fig"} shows the transcritical bifurcation diagram for the SIS model. For small $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta $\end{document}$, the plot of the stable endemic equilibrium $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$y^{\ast }$\end{document}$ as a function of vaccination uptake is similar to the bifurcation diagram for $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta =0$\end{document}$, except in the vicinity of the critical point $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p^{\ast }$\end{document}$ (inset figure of Fig. [1](#Fig1){ref-type="fig"}). For $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p > p^{\ast }$\end{document}$, the disease-free equilibrium is stable in the limiting case, but for the model with immigration, the infectious population is sustained at a low level due to importation of the disease from external sources (Fig. [1](#Fig1){ref-type="fig"}). Fig. 1Bifurcation diagram of the SIS model ($\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ mean field theory). The *red dashed line* indicates the stable endemic equilibria of the SIS model without immigration as a function of vaccination uptake *p*. The *inset* plot shows a close-up of the diagram near the transcritical bifurcation point in the limiting case where $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta =0$\end{document}$. The *dashed line* indicates the location of the critical point, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p^{\ast }=1-1/R_{0}=0.9$\end{document}$. The bifurcation diagram was plotted using the parameters given in Table [7](#Tab7){ref-type="table"}

### Stochastic description of SIS model {#Sec5}

To investigate the effect of noise on this transition, we assume that fluctuations in the infectious population are caused by demographic stochasticity (intrinsic noise). To understand these fluctuations, we require an individual-level description rather than a population-level description. We assume that all individuals have identical attributes, and individuals may move from the susceptible state $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$S(t)$\end{document}$ to the infectious state $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$I(t)$\end{document}$, or from the infectious state to the susceptible state. We assume that the population size is constant, i.e., $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$S(t)+I(t)=N$\end{document}$. Since the population size is constant, we need only model the transitions into and out of the infectious state. Furthermore, since the SIS system moving towards a bifurcation is a fast--slow system, the transmission rate $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\beta $\end{document}$ is not constant in time but is a slowly changing function of time. Because the probability of transmission between an infectious and susceptible individual is slowly changing over time, we treat the transmission rate as constant for each small time increment *dt*, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\overline {\beta }$\end{document}$. Table [1](#Tab1){ref-type="table"} shows the variables and parameters of the SIS model. Table 1Variables and parameters of the SIS modelVariableExpressionProportion of susceptible individuals*x*Proportion of infectious individuals*y*Recovery rate*γ*Per capita birth rate*μ*Immigration rate*η*Population size*N*Transmission rate prior to changes*β*Basic reproduction number$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$R_{0} = \beta /\gamma $\end{document}$Rate of change in transmission$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0}$\end{document}$Start value of vaccination uptake$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{s}$\end{document}$Transmission rate ($\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0)$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\beta (1-p_{s})$\end{document}$Transmission function at time *t*$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\overline {\beta } = \beta (t) =\beta (1-(p_{s}+p_{0} t))$\end{document}$Critical point$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p^{\ast } = 1 - 1/R_{0}$\end{document}$

We assume that in a sufficiently small time increment *dt*, the number of infectious individuals *I* can either (a) increase by 1, (b) decrease by 1, or (c) not change in number. Infection and removal are the events in an SIS process that lead to these changes in state. We denote the number of individuals *I* at time *t* or the state of the system by $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha = I$\end{document}$ at time *t* and the alternative states by $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tilde {\alpha }$\end{document}$, where either $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tilde {\alpha } = I+1$\end{document}$ or $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tilde {\alpha }=I-1$\end{document}$ in the SIS model. The system of individuals goes from a state with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha =I$\end{document}$ individuals at time *t* to a state with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tilde {\alpha }$\end{document}$ individuals at time $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$t+dt$\end{document}$ with transition probability per unit time $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$T_{i}(\tilde {\alpha }|\alpha )$\end{document}$. The system can also go from a state with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tilde {\alpha }$\end{document}$ individuals at time *t* to *I* individuals at time $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$t+dt$\end{document}$ with a probability flux $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tilde {T_{i}}(\alpha |\tilde {\alpha })$\end{document}$. Table [2](#Tab2){ref-type="table"} outlines the events, changes in state, and the transition probability fluxes into and out of state *I* that can occur in a stochastic SIS process with a slowly changing transmission rate. Table 2Transition probability fluxes for SIS model into and out of state $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha =I$\end{document}$EventChange in stateTransition probability per unit time *dt*Infection  Into $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha $\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$I-1\rightarrow I$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tilde {T_{1}}(I|I-1)=\frac {\overline {\beta }(N-(I-1))(I-1)}{N} +\eta (N-(I-1))$\end{document}$  Out of $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha $\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$I\rightarrow I+1$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$T_{1}(I+1|I)=\frac {\overline {\beta }(N-I)I}{N}+\eta (N-I)$\end{document}$Removal  Into $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha $\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$I+1\rightarrow I$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tilde {T_{2}}(I|I+1)= \gamma (I+1)$\end{document}$  Out of $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha $\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$I\rightarrow I-1$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$T_{2}(I-1|I)= \gamma I$\end{document}$Note that $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\overline {\beta }$\end{document}$ is treated as constant in a small time increment *dt*, but the transmission depends on a slowly changing linear function of time, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\beta (t) = \beta (1-p(t))= \beta (1-(p_{s}+p_{0} t))$\end{document}$. Table [1](#Tab1){ref-type="table"} summarizes the parameters in the rates

Since the transitions in Table [2](#Tab2){ref-type="table"} describe a Markov process, we can write down a master equation describing how the probability of there being *I* individuals at time *t* evolves with time. The master equation represents the continuous time version of the dynamics of the Markov process. Derivations of master equations can be found in Van Kampen ([@CR52]) and Renshaw ([@CR40]). Letting $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$P(I,t)=\text {Prob}$\end{document}$ $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$(I(t)=I)$\end{document}$ be the probability that the infectious state variable $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$I(t)$\end{document}$ is equal to some nonnegative integer *I*, the master equation for the evolution of the probability of the infectious population being in state $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha = I$\end{document}$ at time *t* is $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$ \frac{dP(\alpha,t)}{dt} = \sum\limits_{\alpha \neq \tilde{\alpha}} \tilde{T_{i}}(\alpha|\tilde{\alpha})P(\tilde{\alpha},t)- \sum\limits_{\alpha \neq \tilde{\alpha}} T_{i}(\tilde{\alpha}|\alpha)P(\alpha,t), $$ \end{document}$$where $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tilde {\alpha }$\end{document}$ describes all other states (Table [3](#Tab3){ref-type="table"}), and the probability fluxes into and out of state *I* are as described in Table [2](#Tab2){ref-type="table"}. This is a system of $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$N+1$\end{document}$ ordinary differential equations, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha =0, 1, \dots N$\end{document}$, which can be solved with an initial condition of $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$I_{0}$\end{document}$ individuals at time $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$t=0$\end{document}$, i.e., $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$P(\alpha , 0) = 1$\end{document}$ for $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha = I_{0}$\end{document}$ and $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$P(\alpha , 0) = 0$\end{document}$ for all $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha \neq I_{0}$\end{document}$. Thus, the probability distribution at time $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$t=0$\end{document}$ is a delta function. Table [3](#Tab3){ref-type="table"} summarizes the quantities in Eq. ([4](#Equ4){ref-type=""}). Table 3Master equation terms. The transition probability of infection per unit time is given as an example of a transition into and out of state $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha $\end{document}$ for the SIS and SIR stochastic processes. The other transition probability fluxes can be found in Tables [2](#Tab2){ref-type="table"} and [6](#Tab6){ref-type="table"}SystemState *α*Alternative states $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$ \tilde{alpha} $\end{document}$SIS*I*$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$I+1, I-1$\end{document}$SIR$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$(S, I)$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$(S+1, I-1), (S-1, I), (S+1, I), (S, I-1), (S, I+1)$\end{document}$SystemProbability flux into $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha $\end{document}$Probability flux out of $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha $\end{document}$SIS$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tilde {T_{1}}(\alpha |\tilde {\alpha })=\tilde {T_{1}}(I|I-1)$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$T_{1}(\tilde {\alpha }|\alpha ) = T_{1}(I+1|I)$\end{document}$SIR$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tilde {T_{1}}(\alpha |\tilde {\alpha })= \tilde {T_{1}}((S,I)|(S+1, I-1))$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$T_{1}(\tilde {\alpha }|\alpha ) = T_{1}((S-1, I+1)|(S,I))$\end{document}$

We will apply the van Kampen system size expansion to the master equation. The system size expansion takes advantage of the fact that, for large population size *N*, the demographic fluctuations in the population are small, and so *N* is the expansion parameter. Thus, the key assumption for the expansion to be valid is that the system size *N* is sufficiently large (see Appendix [A](#App1){ref-type="app"} for details). Here, we pause to note that that the SIS model is equivalent to a simple logistic process, and hence, there are analytical expressions for the mean and variance (Allen [@CR1]). The $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$I=0$\end{document}$ state is absorbing, and the expected time to extinction is finite (Allen [@CR1]). Nevertheless, if the population size is large, the probability distribution is approximately stationary for a very long time. It is the statistics of this quasi-stationary distribution that we are interested in.

Following expansion of the master equation, the leading order and next-to-leading order terms are collected, giving rise to a deterministic system that describes the evolution of the trend and its stochastic correction, respectively, see Appendix [A](#App1){ref-type="app"} for details. The deterministic system turns out to be the fast--slow system ([3](#Equ3){ref-type=""}). The distribution of the fluctuations about the solution of Eq. ([3](#Equ3){ref-type=""}) is given by a linear Fokker--Planck equation. Thus the fluctuations are Gaussian distributed about the mean, and thus, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$I(t) \sim \text{Normal}(N \varphi(t), N \sigma^2)$\end{document}$, see Appendix [A](#App1){ref-type="app"} for details and definitions. The Fokker--Planck equation is equivalent to a stochastic differential equation (Gardiner [@CR22]). This is the key advantage of applying the system size expansion. Using the stochastic differential equation, we can obtain analytical expressions for statistical signatures of leading indicators and early warning signals, including the power spectrum and autocorrelation function (see Appendix [A](#App1){ref-type="app"} for details). Table [4](#Tab4){ref-type="table"} summarizes the indicator statistics calculated using the methods described in Appendix [A](#App1){ref-type="app"} for the stable limiting case $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ for the SIS model, in terms of the eigenvalue $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\lambda $\end{document}$. We will examine how the statistics change over a range of vaccination uptake values in section "[Results](#Sec12){ref-type="sec"}". Table 4Analytical expressions for quasi-stationary statistics about the endemic infectious quasi-steady state expressed in terms of the eigenvaluesModelPower spectrum $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$S_{I}(\omega )$\end{document}$AutocorrelationSIS$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\frac {2 Q}{\omega ^{2}+\lambda ^{2}}$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\exp (-|\lambda | \tau )$\end{document}$SIR (spiral)$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\frac {2(\alpha _{I}+D_{22} \omega ^{2})}{(\omega ^{2}-((\mathrm {Re} \lambda )^{2}-(\mathrm {Im} \lambda )^{2}))^{2}+ 4(\mathrm {Re} \lambda )^{2} \omega ^{2}}$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\displaystyle \frac {1}{\pi }\int _{0}^{\infty } S_{I}(\omega ) \cos (\omega \tau ) d\omega $\end{document}$SIR (node)$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\frac {2(\alpha _{I}+D_{22} \omega ^{2})}{(\omega ^{2}-\lambda _{1}\lambda _{2})^{2}+(\lambda _{1}+ \lambda _{2})^{2} \omega ^{2}}$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\displaystyle \frac {1}{\pi }\int _{0}^{\infty } S_{I}(\omega ) \cos (\omega \tau ) d\omega $\end{document}$Variance $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\sigma ^{2}$\end{document}$Coefficient of variationSIS$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\frac {Q}{2 |\lambda |}$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$ \frac { Q^{\frac {1}{2}}}{\sqrt {2|\lambda |N} \varphi ^{\ast }}$\end{document}$SIR (spiral)$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\frac {\alpha _{I} +((\mathrm {Re} \lambda )^{2}-(\mathrm {Im} \lambda )^{2}) D_{22}}{4 ((\mathrm {Re} \lambda )^{2}-(\mathrm {Im} \lambda )^{2}) (\mathrm {Re} \lambda )}$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\frac {(\alpha _{I} +((\mathrm {Re} \lambda )^{2}-(\mathrm {Im} \lambda )^{2})D_{22}) ^{\frac {1}{2}}} {\sqrt {4((\mathrm {Re} \lambda )^{2}-(\mathrm {Im} \lambda )^{2}) (\mathrm {Re} \lambda ) N} \varphi ^{\ast }}$\end{document}$SIR (node)$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\frac {\alpha _{I} +\lambda _{1}\lambda _{2} D_{22}}{2 \lambda _{1}\lambda _{2} (\lambda _{1}+ \lambda _{2})}$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\frac {(\alpha _{I} +\lambda _{1}\lambda _{2} D_{22})^{\frac {1}{2}}}{\sqrt {2 \lambda _{1}\lambda _{2} (\lambda _{1}+ \lambda _{2}) N}\varphi ^{\ast }}$\end{document}$The eigenvalues of the Jacobian of the SIR model evaluated about $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\varphi ^{\ast }$\end{document}$ are complex conjugates when the equilibrium is a stable spiral, i.e., $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\mathrm {Re} \lambda _{1} = \mathrm {Re} \lambda _{2} = \mathrm {Re} \lambda $\end{document}$ and $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$|\mathrm {Im} \lambda _{1}|= |\mathrm {Im} \lambda _{2}|=|\mathrm {Im} \lambda |$\end{document}$. When $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\varphi ^{\ast }$\end{document}$ is a stable node, the Jacobian matrix has two real negative eigenvalues, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\lambda _{1}$\end{document}$ and $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\lambda _{2}$\end{document}$. When there is no immigration, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta =0$\end{document}$ and the power spectrum collapses to zero. Variables for each model are described in Tables [8](#Tab8){ref-type="table"} and [9](#Tab9){ref-type="table"}. The expressions for the power spectrum are multiplied by 2 because they are evaluated over the frequency domain $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$[0, \infty )$\end{document}$. No closed-form expression for the lag-$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tau $\end{document}$ autocorrelation is known, and so it must be evaluated numerically

### Robustness of the van Kampen approximation {#Sec6}

Since the system size expansion involves approximating the discrete random variable *I* with a normal random variable, its assumptions may break down when *I* is small. For small numbers of infectious individuals, e.g., if the system is subcritical and, thus, incidence of a disease is low, the assumption that the fluctuations are normally distributed about the mean is likely to be inappropriate. The van Kampen expansion is valid when the system is far from the absorbing boundary at $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$I=0$\end{document}$. However, the approximation upon which the approach is built (Eq. [10](#Equ10){ref-type=""} in Appendix [A](#App1){ref-type="app"}) cannot describe chance extinctions, which can occur if *I* is small. If $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta = 0$\end{document}$ and $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\overline {p} > 1- 1/R_{0}$\end{document}$, the disease-free equilibrium is stable, and so the approximation given by Eq. ([10](#Equ10){ref-type=""}) is not valid. Due to the absorbing boundary, the probability distribution about the disease-free state for a given time *t* will be one-sided. On the the other hand, if $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta >0$\end{document}$, then, close to the system boundary, the normal distribution approximation about the deterministic mean may be poor because the distribution is bimodal due to extinction events. However, the models with immigration do not have a disease-free state; just a small infectious population when $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\overline {p}$\end{document}$ is approximately greater than $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$1/R_{0}$\end{document}$. Therefore, predictions for the quasi-stationary statistics about this state can be obtained.

SIR model {#Sec7}
---------

### Mean field theory of SIR model {#Sec8}

Denoting the proportions of susceptible, infectious, and recovered populations by $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$x(t)$\end{document}$, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$y(t)$\end{document}$, and $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$z(t)$\end{document}$ respectively, the SIR model with immigration in a closed population of size *N* is $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$\begin{array}{rll}\label{eqn:SIRmodelimmigration}\dot{x} &=& \mu(1-p) -\beta x y - \eta x -\mu x \\\dot{y} &= &\beta x y + \eta x -(\gamma+\mu) y, \\\dot{z} &=& \mu p+ \gamma y - \mu z,\end{array}$$ \end{document}$$where $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\beta $\end{document}$ is the transmission rate, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\gamma $\end{document}$ is the recovery rate, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta $\end{document}$ is the immigration rate, and $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\mu $\end{document}$ is the per capita birth rate. To maintain a constant population size, the per capita death rate is set equal to the birth rate. A proportion *p* of the population are chosen at random for vaccination at birth and are recruited into the recovered class. The remaining unvaccinated proportion of the population enter the susceptible class at birth. Since the population size *N* is constant, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$x+y+z=1$\end{document}$, system ([5](#Equ5){ref-type=""}) is equivalent to the following system of ordinary differential equations $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$\begin{array}{rll}\label{eqn:SIRmodel}\dot{x} &=& \mu(1-p) -\beta x y - \eta x -\mu x \\\dot{y} &=& \beta x y + \eta x -(\gamma+\mu) y.\end{array} $$ \end{document}$$The SIR model is particularly appropriate for acute immunizing infections such as measles and pertussis.

In the absence of vaccination and immigration, the basic reproduction number is given by $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$R_{0} =\beta /(\gamma +\mu )$\end{document}$. If $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta = 0$\end{document}$, the SIR model ([6](#Equ6){ref-type=""}) has two equilibria: the disease free state $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$(x_{0}, y_{0})=(1-p, 0)$\end{document}$ and the endemic equilibrium $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$(x^{\ast }, y^{\ast })=(1/R_{0}, \mu (1-p-1/R_0) /(\gamma+\mu)$\end{document}$, respectively. The SIR model undergoes a transcritical bifurcation at $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$R_{0} =1$\end{document}$. The endemic equilibrium is locally stable if $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$R_{0}>1$\end{document}$ and is not biologically feasible if $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$R_{0}<1$\end{document}$, when the disease-free equilibrium is locally stable. As the vaccination uptake *p* increases, the basic reproduction number reduces by a factor $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$(1-p)$\end{document}$, i.e., the effective reproduction number is $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$R_{0}(1-p)$\end{document}$. The vaccination uptake *p* for the effective reproduction number is 1 at the critical vaccination threshold, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p^{\ast } = 1 - 1/R_{0}$\end{document}$ (Anderson and May [@CR4]), and it is at this critical threshold that the transcritical bifurcation occurs. Again, the SIR model with no immigration is the relevant limiting case.

Temporary importation of pathogen often occurs in infectious disease systems (Keeling and Rohani [@CR31]). Assuming that a low level of immigration occurs, i.e., $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta >0$\end{document}$, only a single positive equilibrium is biologically feasible. This equilibrium is a stable spiral when the square of the trace of the Jacobian matrix evaluated about the equilibrium is less than four times its determinant and is a stable node if it is greater than or equal to this quantity. Complex eigenvalues of the Jacobian matrix of Eq. ([6](#Equ6){ref-type=""}) characterize a stable spiral, and the eigenvalues are real and negative if the equilibrium is a stable node. The stable node equilibrium can be thought of as a "disease-free" equilibrium if $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta $\end{document}$ is small, in the sense that the infectious population is sustained at a low level due to importation of the disease from external sources. Therefore, while the transcritical bifurcation occurs in a suitably constructed limiting case ($\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta =0$\end{document}$), the limit case may give an indication for the behavior of the fluctuations for the stochastic version of the model with immigration, provided that $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta $\end{document}$ is small.

Gradual changes in the vaccination uptake rate *p* may induce a transition from endemicity or to extinction. Recruitment of susceptibles may slowly vary over long time scales as a result of demographic or evolutionary changes. Vaccination uptake rates are often not constant over time and may exhibit trends, e.g., percentage uptake of pertussis vaccine in the USA (Rohani and Drake [@CR41]). Mathematically, we may express the SIR model approaching a transcritical bifurcation as a fast--slow system: $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$\begin{array}{rll}\label{eqn:fastslowSIRmodel}\dot{x} &=& \mu(1-p) -\beta x y - \eta x -\mu x \\\dot{y} &= &\beta x y + \eta x -(\gamma+\mu) y, \\\dot{p} &= &\epsilon f(x, y, p), \end{array}$$ \end{document}$$where $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$0<\epsilon \ll 1$\end{document}$ and the function *f* describes the change in vaccination uptake *p*. Again, we model vaccination uptake as a linear function of time $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p(t)=p_{s}+p_{0} t$\end{document}$, with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0}$\end{document}$ an incremental change in *p*. Consequently, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\dot {p} = p_{0}$\end{document}$. If $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0} >0$\end{document}$, recruitment into the susceptible class is slowly declining over time and if $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0}<0$\end{document}$, then recruitment is slowly increasing over time. In the limit $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$, the vaccination uptake is fixed at a constant rate $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{s}$\end{document}$, and the system is stable. Figure [2](#Fig2){ref-type="fig"} shows the transcritical bifurcation diagram for the SIR model. The infectious equilibrium $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$y^{\ast }$\end{document}$ is plotted as a function of vaccination uptake *p*. The bifurcation diagram indicates that the endemic infectious equilibrium declines linearly with *p* in the models with and without immigration. However, the inset plot indicates that in the vicinity of the $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta = 0$\end{document}$ critical point, the infectious equilibrium of the immigration model is elevated relative to the disease-free equilibrium, since the infectious population is sustained at a low level due to immigration. Fig. 2Bifurcation diagram of SIR model ($\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ mean field theory). The *red dashed line* indicates the stable endemic equilibria of the SIR model without immigration as a function of vaccination uptake *p*. The *inset* plot shows a close-up of the diagram near the critical point. The *dashed line* indicates the location of the critical point, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p^{\ast }=1-1/R_{0}=0.94$\end{document}$

### Stochastic description of SIR model {#Sec9}

Model ([7](#Equ7){ref-type=""}) is the deterministic description of the SIR system approaching a transition, but there will be stochastic fluctuations in the state of the system as the transition is approached. As before, we assume that these fluctuations result from demographic stochasticity. To quantify these fluctuations, we assume individuals are identical. Individuals may be recruited into the susceptible state and can transition out of this state through infection or death. Infectious individuals may recover or die. Assuming that the population size $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$S(t) + I(t) +R(t) = N$\end{document}$ is constant, we need only consider the transitions into and out of the susceptible and infectious states. Furthermore, since the SIR system moving towards a bifurcation is a fast--slow system, the vaccination uptake *p* is not constant in time but is a slowly changing function of time. Therefore, the recruitment rate into the susceptible class is slowly changing, but, for each small time increment *dt*, we can treat the vaccination uptake as constant $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\overline {p}$\end{document}$. Table [5](#Tab5){ref-type="table"} presents the variables and parameters of the SIR model. Table 5Variables and parameters of the SIR modelVariableExpressionProportion of susceptible individuals*x*Proportion of infectious individuals*y*Proportion of recovered individuals*z*Recovery rate$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\gamma $\end{document}$Per capita birth rate$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\mu $\end{document}$Immigration rate$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta $\end{document}$Population size*N*Transmission rate prior to changes$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\beta $\end{document}$Basic reproduction number$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$R_{0} = \beta /(\gamma +\mu )$\end{document}$Vaccination uptake*p*Rate of change in vaccination uptake$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0}$\end{document}$Start value of vaccination uptake$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{s}$\end{document}$Vaccination uptake ($\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$)Vaccination uptake at time *t*$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\overline {p} =p(t) = p_{s}+p_{0} t$\end{document}$Critical point$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p^{\ast } = 1 - 1/R_{0}$\end{document}$

Events that occur in an SIR process in a small time increment *dt* moving slowly towards a transition include infection, recovery, recruitment to the susceptible class, and death due to natural causes. Table [6](#Tab6){ref-type="table"} outlines the events, changes in state, and the transition probabilities per unit time for each change in state. We can construct a master equation in the same manner as for the SIS model. Letting $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$P(S, I,t)=\text {Prob}((S(t),I(t)) = (S, I))$\end{document}$ be the probability that the state vector $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$(S(t),I(t))$\end{document}$ is equal to some nonnegative integer $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$(S,I)$\end{document}$, the master equation for the evolution of the probability of the population being in state $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha = (S,I)$\end{document}$ at time *t* is $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$ \frac{dP(\alpha,t)}{dt} = \sum\limits_{\alpha \neq \tilde{\alpha}} \tilde{T_{i}}(\alpha|\tilde{\alpha})P(\tilde{\alpha},t)- \sum\limits_{\alpha \neq \tilde{\alpha}} T_{i}(\tilde{\alpha}|\alpha)P(\alpha,t), $$ \end{document}$$where $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tilde {\alpha }$\end{document}$ describes all other states (Table [3](#Tab3){ref-type="table"}). Table 6Transition probability fluxes for SIR model. Transitions can occur into and out of state $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha = (S,I)$\end{document}$EventChange in stateTransition probability per unit time *dt*InfectionInto $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha $\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$(S+1,I-1) \rightarrow (S,I)$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tilde {T_{1}}((S,I)|(S+1,I-1))=\frac {\beta (S+1)(I-1)}{N}+\eta (S+1)$\end{document}$Out of $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha $\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$(S,I) \rightarrow (S-1, I+1)$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$T_{1}((S-1, I+1)|(S,I))=\frac {\beta SI}{N}+\eta S$\end{document}$Death of susceptible individualInto $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha $\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$(S+1, I) \rightarrow (S,I)$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tilde {T_{2}}((S,I)|(S+1, I))= \mu (S+1)$\end{document}$Out of $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha $\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$(S,I) \rightarrow (S-1, I)$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$T_{2}((S-1, I)|(S,I))= \mu S$\end{document}$Death of infectious individualInto $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha $\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$(S, I+1) \rightarrow (S,I) $\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tilde {T_{3}}((S,I)|(S, I+1))= \mu (I+1)$\end{document}$Out of $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha $\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$(S,I) \rightarrow (S, I-1)$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$T_{3}((S, I-1)|(S, I))= \mu I$\end{document}$Recovery of infectious individualInto $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha $\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$(S, I+1) \rightarrow (S,I) $\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tilde {T_{4}}((S,I)|(S, I+1))= \gamma (I+1)$\end{document}$Out of $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha $\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$(S,I) \rightarrow (S, I-1)$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$T_{4}((S, I-1)|(S, I))= \gamma I$\end{document}$Recruitment of susceptible individualInto $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha $\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$(S-1, I) \rightarrow (S,I) $\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tilde {T_{5}}((S,I)|(S-1, I))= \mu N (1-\overline {p})$\end{document}$Out of $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha $\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$(S,I) \rightarrow (S+1, I)$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$T_{5}((S+1, I)|(S,I))= \mu N (1-\overline {p})$\end{document}$Note that $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\overline {p}$\end{document}$ is treated as constant in a small time increment *dt*, but the vaccination uptake is a slowly changing linear function of time, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\overline {p} = p(t) = p_{s}+p_{0} t$\end{document}$ at time *t*. Table [5](#Tab5){ref-type="table"} outlines the parameters used in each transition rate

The master Eq. ([8](#Equ8){ref-type=""}) is nonlinear and, therefore, cannot be solved analytically. To make analytical progress with Eq. ([8](#Equ8){ref-type=""}), again, we can use the van Kampen system size expansion (see Appendix [B](#App2){ref-type="app"} for details). The approach gives rise to the deterministic SIR fast--slow system ([7](#Equ7){ref-type=""}) and a linear Fokker--Planck equation that describes the evolution of the fluctuations, which may be written as a system of stochastic differential equations. These equations can be analyzed using Fourier transformation. The solution of the Fokker--Planck equation is a bivariate normal distribution. Table [4](#Tab4){ref-type="table"} summarizes the indicator statistics in the stable system limiting case $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ for the SIR model, in terms of its eigenvalues.

Simulations {#Sec10}
-----------

The preceding sections present an analytical theory of early warning signals for emergence and leading indicators of elimination. To investigate the results of this theory for a particular parameter set (Table [7](#Tab7){ref-type="table"}), we calculated leading indicators of elimination and emergence, assuming alternatively that (a) the mean proportion of infectious individuals is given by the deterministic endemic equilibrium ($\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ theory) or (b) assuming it is given by the current state of the fast--slow system approaching a transition. We selected parameters consistent with sexually transmitted SIS diseases with long infectious period and large $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$R_{0}$\end{document}$ and parameters typical for childhood infectious diseases with SIR dynamics. To examine how different changes in vaccination uptake $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0}$\end{document}$ affect the statistics, we varied $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0}$\end{document}$ by 1/500 and $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$1/30~\text {year}^{-1}$\end{document}$ in the model with immigration. We also compared the elimination indicators with those calculated assuming that the mean proportion of infectious individuals was given by the deterministic endemic equilibrium from the limiting case models with no immigration. The early warning signals of emergence were not calculated for the limiting case because the disease-free equilibrium is stable. Table 7Parameter values for the simulationsParameterSIS modelSIR modelBasic reproduction number $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$R_{0}$\end{document}$1017Recovery rate $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\gamma $\end{document}$1/10 year^−1^365/22 year^−1^Per capita birth rate $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\mu $\end{document}$-$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$1/50~\text {year}^{-1}$\end{document}$Imports per year $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\delta $\end{document}$ (elimination)1100Imports per year $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\delta $\end{document}$ (emergence)114Immigration rate $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta $\end{document}$ (elimination)0.00020.00034Immigration rate $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta $\end{document}$ (emergence)0.000020.0035Population size *N* (elimination)50,0005,000,000Population size *N* (emergence)50,000100,000Change in transmission/recruitment $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0}$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$1/500~\text {year}^{-1}$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$1/500~\text {year}^{-1}$\end{document}$Starting value (elimination) $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{s}$\end{document}$00Starting value (emergence) $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{s}$\end{document}$0.960.96Sufficiently large population sizes *N* were chosen to ensure validity of the van Kampen system size expansion. The per capita immigration rate $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta $\end{document}$ on the approach to elimination was calculated assuming $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta = \delta R_{0}/ N$\end{document}$, where $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\delta $\end{document}$ is the number of imports per year (Keeling and Rohani [@CR31]). On the approach to emergence, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$R_{0}$\end{document}$ is approximately one, and the number of infectious individuals is near zero. Therefore, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta = \delta / N$\end{document}$ (SIS model) and $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta =\delta / N (1-p_{s})$\end{document}$ (SIR model). All emergence simulations begin with the forcing variable $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{s}=0.96$\end{document}$, beyond the threshold $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p^{\ast }$\end{document}$ for emergence, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p^{\ast }=1-1/R_{0}$\end{document}$. The immigration rate remains fixed during simulations. The initial rate of transmission is calculated from $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$R_{0}$\end{document}$

To test the robustness of this theory to the range of approximations that were introduced (fast--slow approximation, continuum description, van Kampen expansion), we simulated the approach to elimination and emergence in a variety of cases. To simulate the approach to elimination, we followed the "bottom-up" approach of Allen ([@CR1]) to derive stochastic differential equations that incorporated demographic stochasticity. This approach uses the rates in Tables [2](#Tab2){ref-type="table"} and [6](#Tab6){ref-type="table"} to build a system of stochastic differential equations. Stochastic differential equations formulated in this way are appropriate, provided that the population size is sufficiently large, because then changes in the state variables are assumed to be normally distributed. Simulations were compared with output from Gillespie's direct method (Gillespie [@CR24]). The simulations were qualitatively similar for population sizes greater than 50,000. To simulate the approach to emergence, we used Gillespie's direct method as this is most appropriate for small population sizes.

We simulated the SIS and SIR stochastic models with immigration approaching elimination and emergence 500 times. To compare the statistics to the theoretical predictions in Table [4](#Tab4){ref-type="table"}, the infectious time series approaching elimination were sampled at yearly intervals. The transcritical bifurcation in these scenarios was approached over a long time frame (e.g., 470 years when $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0} = 1/500$\end{document}$ in the SIR model). However, the transcritical bifurcation to emergence was approached over a relatively short time frame for the SIR model (10 years). To obtain a better sampled time series, the data from the Gillespie simulations were aggregated over monthly intervals for the SIR model. The infectious time series were aggregated over yearly intervals for the SIS model approaching emergence because events did not always occur at a monthly frequency. Thus, time series obtained from the SIS system approaching emergence allowed us to examine the issues that arise from poorly sampled time series.

Analysis over a moving window {#Sec11}
-----------------------------

To investigate the robustness of the early warning predictions over a moving window, i.e., as they would be used in online analysis of surveillance data, the influence of the slowly varying trend must be removed. The van Kampen approach (Appendices [A](#App1){ref-type="app"} and [B](#App2){ref-type="app"}) leads to a natural expression for the fluctuations from the quasi-stationary state $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$N \varphi (t)$\end{document}$, $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ \zeta(t) = N^{-1/2}(I -N \varphi(t) ), $$\end{document}$$where ϕ(t) is determined by the mean field equations (11)(SIS) and (22) (SIR) in Appendices [A](#App1){ref-type="app"} and [B](#App2){ref-type="app"} respectively. To obtain the fluctuations, we subtracted the current mean, which we assumed to be determined by the current state of the fast--slow system $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$N \varphi (t)$\end{document}$ , from the state of the system at the start of each year and divided this quantity by the square root of the population size. We refer to this as *Van Kampen detrending*.

Gaussian filtering is another, more common, method used to remove the influence of a slowly varying mean of a data series. To compare the performance of Gaussian smoothing to van Kampen detrending, for each time series, we fit a Gaussian kernel smoothing function across the entire infectious case record up to the time that the transcritical bifurcation was predicted using a fixed bandwidth. Lenton et al. ([@CR34]) have shown that the results obtained from applying the Gaussian filter across the entire time series do not differ significantly from detrending within windows. To obtain the residuals, we subtracted the fit from each time series and divided by the square root of the population size to be consistent with van Kampen detrending. The choice of bandwidth was informed by the resemblance of the Gaussian residuals to the fluctuations obtained from the van Kampen approach. To study the changes in the statistics up to the critical transition, we calculated the lag-1 autocorrelation and the variance of the fluctuations obtained using the two detrending methods over a moving window half the length of the time series. We calculated the lag-1 autocorrelation coefficient of each replicate using the acf function in R. The coefficient of variation (CV) was calculated by calculating, over a moving window, the mean and standard deviation of each infectious replicate. The median and 95 % prediction intervals for each of the statistics were calculated over the 500 replicates of each model. The prediction intervals were calculated using the quantile function in R. To quantify trends in each statistic for each replicate, we used Kendall's correlation coefficient $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tau $\end{document}$. To determine the distribution of Kendall's $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tau $\end{document}$, we calculated the coefficient for the trend in the test statistic for each realization.

To assess the performance of the leading indicators, we followed the approach of Boettiger and Hastings ([@CR7]) and calculated receiver operating characteristic (ROC) curves from the distribution of Kendall's $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tau $\end{document}$ calculated from realizations of the models with and without transitions. The model without a transition is quasi-stationary, and we refer to it as the baseline or null model. The null models for elimination assume vaccination uptake $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p=0$\end{document}$ and are simulated beginning from the deterministic equilibrium at $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p=0$\end{document}$. The null models for emergence assume vaccination uptake $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p=0.96$\end{document}$ and are simulated beginning from the deterministic equilibrium at $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p=0.96$\end{document}$. The baseline models were simulated for the same length of time as it takes for the transition to be approached in the test models. The model with a transition is the test model. An ROC curve enables investigation of the sensitivity of leading indicators to detect differences between quasi-stationary systems and those approaching a critical transition. We simulated the baseline models 500 times and obtained fluctuations using the van Kampen approach and from Gaussian filtering. We then quantified the trend in each indicator using Kendall's $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tau $\end{document}$ for each baseline simulation. In our results, indicator statistics typically exhibited increasing trends or no trend, but for those that decreased, we multiplied Kendall's $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tau $\end{document}$ for each realization by -1 to calculate the ROC curve. The area under the ROC curve (AUC) was also calculated. An AUC close to one indicates near-perfect detection.

Results {#Sec12}
=======

Transitions to elimination and emergence in SIS systems {#Sec13}
-------------------------------------------------------

The mean field fast--slow dynamics drive the transitions to elimination and emergence in stochastic SIS models with gradual changes in transmission. Figure [3](#Fig3){ref-type="fig"}a shows a solution $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$y(t)$\end{document}$ of the fast--slow system ([3](#Equ3){ref-type=""}) with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta \neq 0$\end{document}$. The solution is the current "pool" of infectious individuals (the proportion infectious $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$y(t)$\end{document}$), not the number of new cases per time interval that comprise the traditional epidemic curve or recorded case reports of infectious individuals. At time $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$t=450$\end{document}$, the limiting case model predicts elimination of the pathogen. The limit case plotted in the figure is that arising from the $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ mean field theory, not the $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta =0$\end{document}$ critical case. Here, we note that the limit case $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ and the solution of the fast--slow system diverge from one another close to the proximity of the transcritical bifurcation of the $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta = 0$\end{document}$ limit case. Figure [3](#Fig3){ref-type="fig"}b shows a typical realization of the stochastic counterpart of the fast--slow SIS system with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta \neq 0$\end{document}$, assuming a change in vaccination uptake of $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0} =1/500$\end{document}$ per year. The description of the stochastic process is outlined in Table [2](#Tab2){ref-type="table"}. The infectious population slowly declines and closely follows the limiting case $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ up until time $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$t=400$\end{document}$ before eventually diverging. The inset figure indicates that the infectious population remains elevated 50 years after the transcritical bifurcation has occurred in the model with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta = 0$\end{document}$. Therefore, the transition to elimination in this system is characterized by a slow change in the mean, followed by rapid fall off in incidence that precedes a very slow fadeout to extinction. Fig. 3**a** SIS mean field predictions, assuming that immigration is nonzero. The *black line* indicates a solution of the fast--slow system ([3](#Equ3){ref-type=""}) with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta > 0$\end{document}$, and the *blue dashed line* indicates the stable equilibrium for the vaccination uptake at time *t* indicated on the top axis (limit case $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$). The *gray dashed line* indicates the location of the critical point when $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta =0$\end{document}$. **b** Realization of the stochastic fast--slow SIS model with immigration. The *dashed line* marks the time of the transcritical bifurcation. The proportion of the population vaccinated at time *t* is indicated by the top axis in all figures. Parameter values for the figures are given in Table [7](#Tab7){ref-type="table"}

On the other hand, if a disease is emerging due to small increases in transmission, or the level of vaccination uptake in the population is declining, solutions of the fast--slow system may exhibit a "delay" in emergence relative to the occurrence of the transcritical bifurcation. Figure [4](#Fig4){ref-type="fig"}a shows the delay in emergence in a solution of Eq. ([3](#Equ3){ref-type=""}) with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0}=1/500$\end{document}$. At time $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$t=30$\end{document}$, the limiting case model predicts emergence. Again, the limit case indicated in the figure is the limit $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ of Eq. ([3](#Equ3){ref-type=""}), not the $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta =0$\end{document}$ critical case. Figure [4](#Fig4){ref-type="fig"}b shows a typical realization of the stochastic counterpart of the solution shown in Fig. [4](#Fig4){ref-type="fig"}a. The delay in the take-off of the epidemic is apparent. The rapid increase in the number of cases, is preceded by a low level of incidence long after the transition to endemicity has occurred. Of course, the question is, does the low level of infection in the time series give any clue, through early warning signals, of the eventual rapid increase of infectious cohorts? Fig. 4**a** SIS mean field predictions, assuming that immigration is nonzero. The *black line* indicates a solution of the fast--slow system ([3](#Equ3){ref-type=""}) with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta > 0$\end{document}$, and the *blue dashed line* indicates the limiting case $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ of the fast--slow system. The limit case here refers to the endemic equilibrium of Eq. ([2](#Equ2){ref-type=""}) corresponding to the transmission rate at time *t* $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\beta (1-p(t))$\end{document}$ indicated on the top axis ($\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\beta =1$\end{document}$). The *gray dashed line* indicates the location of the critical point when $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta =0$\end{document}$. **b** Realization of the stochastic fast--slow SIS model with immigration. The *black dashed line* indicates the timing of the transcritical bifurcation when $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta =0$\end{document}$. The unvaccinated proportion of the population at time *t* is indicated by the top axis in all figures. Parameter values for the figures are given in Table [7](#Tab7){ref-type="table"}

Transitions to elimination and emergence in SIR systems {#Sec14}
-------------------------------------------------------

The transitions to disease elimination and endemicity in the stochastic SIR models with gradually changing vaccination uptake are also driven by the mean field fast--slow dynamics. To eradicate a disease, the effective reproduction number must be reduced by increasing the vaccination uptake *p*. Figure [5](#Fig5){ref-type="fig"}a shows a solution of the fast--slow system ([7](#Equ7){ref-type=""}) with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta \neq 0$\end{document}$. The mean field $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ theory and the solution of Eq. ([7](#Equ7){ref-type=""}) agree closely. The timing of the transcritical bifurcation in the $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta =0$\end{document}$ model occurs at $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$t=470$\end{document}$, and the number of infectious individuals has reached a low level by this time. Figure [5](#Fig5){ref-type="fig"}b shows a stochastic realization of the SIR model with immigration approaching elimination (the details of the stochastic process are described in Table [6](#Tab6){ref-type="table"}). The infectious population exhibits amplified oscillations, unlike the deterministic trajectory in Fig. [5](#Fig5){ref-type="fig"}a. Demographic stochasticity is expected to excite the transient oscillations of the SIR model (Bauch and Earn [@CR6]), and we will see this in detail later when we examine the power spectrum of the fluctuations. Fig. 5**a** SIR mean field predictions, assuming that immigration is nonzero. The *black line* indicates a solution of the fast--slow system ([7](#Equ7){ref-type=""}) with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta > 0$\end{document}$, and the *blue dashed line* indicates the equilibrium arising from the limiting case $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ of the fast--slow system, corresponding to the level of vaccination uptake indicated on the top axis. The *gray dashed line* indicates the location of the critical point when $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta =0$\end{document}$. **b** Realization of the stochastic fast--slow SIR model with immigration. The *dashed line* marks the time of the transcritical bifurcation. The proportion of the population vaccinated at time *t* is indicated by the top axis in all figures. Parameter values for the figures are given in Table [7](#Tab7){ref-type="table"} (elimination parameters)

On the other hand, if a disease is emerging through an increase in recruitment into the susceptible class, the effective reproduction number is increasing. Figure [6](#Fig6){ref-type="fig"}a shows a solution of the fast--slow system ([7](#Equ7){ref-type=""}) with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta > 0$\end{document}$ on the verge of emergence. After the transcritical bifurcation, the solution of the system does not agree with the stable endemic equilibrium at time *t* until approximately $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$t=55$\end{document}$ years. The solution grows more slowly than the stable equilibrium. The delay in the dynamics is also exhibited by stochastic realizations, e.g., Fig. [6](#Fig6){ref-type="fig"}b. Outbreaks remain small and sporadic for at least 10 years after the bifurcation has occurred. The delay before emergence arises because the mean predicted by system ([7](#Equ7){ref-type=""}) remains small following the bifurcation. However, the bifurcation delay is not as marked as that in the SIS model (compare Fig. [4](#Fig4){ref-type="fig"} with Fig. [6](#Fig6){ref-type="fig"}). Fig. 6**a** SIR mean field predictions, assuming that immigration is nonzero. The *black line* indicates a solution of the fast--slow system ([7](#Equ7){ref-type=""}) with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta > 0$\end{document}$, and the *blue dashed line* indicates the equilibrium arising from the limiting case $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ of the fast--slow system, corresponding to the recruitment rate at time *t* $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\mu (1-p(t))$\end{document}$ indicated on the top axis ($\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\mu =1/50~\text {year}^{-1}$\end{document}$). The *gray dashed line* indicates the location of the critical point when $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta =0$\end{document}$. **b** Realization of the stochastic fast--slow SIR model with immigration. The *black dashed line* indicates the timing of the transcritical bifurcation. The per capita recruitment rate of the population at time *t* is indicated by the top axis in all figures. Parameter values for the figures are given in Table [7](#Tab7){ref-type="table"} (emergence parameters)

Leading indicators of elimination {#Sec15}
---------------------------------

### Power spectrum predictions {#Sec16}

Figure [7](#Fig7){ref-type="fig"} compares the power spectra of the fluctuations in the stable models with and without immigration. The patterns in the power spectra with immigration (Fig. [7](#Fig7){ref-type="fig"}c, d) and without (Fig. [7](#Fig7){ref-type="fig"}a, b) are similar. For SIS systems with low transmission rates, and SIR models with low recruitment rate into the susceptible class, the power in the peak of the spectrum is low. The power spectrum for SIS and SIR systems is expected to shift to lower frequencies as the pathogen approaches extinction. In the SIS systems, the power at smallest frequencies increases as the critical point is approached, but this effect is subtle. In contrast, in the SIR case, there is a dramatic reduction in the frequency at which the highest power is observed. The approach to endemicity is expected to be indicated by a shift to higher frequencies in the power spectrum. In the SIS model, the spectrum encompasses a broader range of frequencies as emergence is approached. On the other hand, in subcritical SIR systems approaching endemicity, fluctuations should become less noisy as the threshold is approached. The power spectrum transforms from a flat "white-noise" spectrum in the subcritical scenario to a spectrum exhibiting resonant peaks for sufficiently decreased vaccination uptake. Oscillations are expected to be amplified at these resonant frequencies. It has been shown that complex eigenvalues of the Jacobian matrix of system ([6](#Equ6){ref-type=""}) guarantee the existence of the power spectrum peak (Alonso et al. [@CR2]). Fig. 7Limiting case $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ prediction for the power spectrum for the models with and without immigration. The predictions for $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta >0$\end{document}$ agree closely with those generated from the $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta = 0$\end{document}$ models. In the SIS case, the power at smallest frequencies increases as the critical point is approached, but this effect is subtle, whereas in the SIR case, there is a dramatic reduction in the frequency at which the highest power is observed . Each power spectrum is evaluated about the mean field infectious equilibrium $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\varphi ^{\ast }$\end{document}$, given in Tables [8](#Tab8){ref-type="table"} and [9](#Tab9){ref-type="table"}. The parameters used to calculate the power spectrum are given in Table [7](#Tab7){ref-type="table"}. Importation, vaccination uptake, and population sizes were chosen according to the elimination scenario. The power spectrum has been log-transformed for clarity

### SIS leading indicator predictions {#Sec17}

Systems approaching a critical transition are expected to exhibit rising variance and rising autocorrelation (Scheffer [@CR44]). In general, the predictions for the leading indicators of SIS disease elimination follow these expectations for one-dimensional stochastic systems. Figure [8](#Fig8){ref-type="fig"}a--c shows the leading indicators of elimination for the SIS model. As the threshold to pathogen extinction is approached by gradually increasing the vaccination uptake, all of the statistics evaluated about the endemic equilibrium of the stable system increase as the bifurcation parameter is increased, as expected from the analytical formulas for the limiting case (Table [4](#Tab4){ref-type="table"}). The lag-1 autocorrelation rises, indicating an increase in system memory, and the fluctuation variance increases, as suggested by the plot of the power spectrum for increasing vaccination uptake values. The coefficient of variation also increases, indicating that infectious time series should become noisier as the transition is approached. The signal predictions for the SIS systems with and without immigration in the limit case $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ (in green) are in close agreement, which makes sense from the analytical formulae, provided $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta $\end{document}$ is small. To examine how different changes in vaccination uptake $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0}$\end{document}$ in the fast--slow model with immigration affect the statistics, we varied $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0}$\end{document}$ by $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$1/500$\end{document}$ and $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$1/30~\text {year}^{-1}$\end{document}$. Predictions are in close agreement far from the $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta =0$\end{document}$ critical point but they differ close to it. Fig. 8Leading indicators of elimination. The statistics evaluated about the endemic equilibrium for the limiting case $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta = 0$\end{document}$ are shown in *dashed green line*. The indicators evaluated about the endemic equilibrium assuming $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta >0$\end{document}$ are indicated in *red line*. The statistics evaluated about the current state of the mean field fast--slow system are shown in *blue* (*dotted*) and *black lines*. The *gray dashed line* indicates the location of the critical point when $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta =0$\end{document}$. The theoretical predictions in the $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta > 0$\end{document}$ SIS case are not as dramatic as one expects from the limit case but are qualitatively consistent with standard expectations, unlike the SIR limit case predictions, which do not conform with standard expectations. The variance in the SIR case is predicted to decline, which is not unexpected here, but does not conform to standard expectations. The coefficient of variation increases as the critical point is approached, but the increase is not as dramatic as one may expect from the limiting case. In contrast to expectations, the lag-1 autocorrelation is predicted to decline close to the critical point if $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta >0$\end{document}$. The predictions for the statistics evaluated about the current state of the fast--slow system differ from those evaluated about the endemic equilibrium. Even if $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0} = 1/500~\text {year}^{-1}$\end{document}$, there are discrepancies in the predictions near the transcritical bifurcation point. The autocorrelation of the fluctuations with a lag of 1 year is shown, and the variance shown is the fluctuation variance. All calculations used the parameter values in Table [7](#Tab7){ref-type="table"}

### SIR leading indicator predictions {#Sec18}

Leading indicators for SIR systems approaching elimination (Fig. [8](#Fig8){ref-type="fig"}d--f) are not always consistent with the standard expectations of increasing variance, increasing autocorrelation, and increasing coefficient of variation. In addition, the predictions for the leading indicators of SIR disease elimination evaluated about the endemic equilibrium of the stable system behave differently to SIS leading indicators, due to the presence of resonant frequencies. As the threshold to elimination is approached, the lag-1 autocorrelation increases with vaccination uptake, indicating an increase in system memory, but in contrast to the SIS model, the fluctuation variance declines. We observe in Fig. [7](#Fig7){ref-type="fig"}b, d that the area under the power spectrum declines as vaccination uptake increases, particularly in the model with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta > 0$\end{document}$, where the height of the peak of the power spectrum, which reflects amplification of fluctuations, declines close to the transition. The coefficient of variation also increases, indicating that infectious time series should become noisier as the transition is approached but does so more dramatically in the model without immigration, because the power spectrum peak height increases as the transcritical bifurcation is approached. To examine how different changes in vaccination uptake $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0}$\end{document}$ affect the statistics, we varied $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0}$\end{document}$ by $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$1/500$\end{document}$ and $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$1/30~\text {year}^{-1}$\end{document}$ in the fast--slow model with immigration. Predictions generated from the $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0}=1/500$\end{document}$ model are in close agreement with predictions arising from the $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta > 0$\end{document}$ stable model. However, when vaccination uptake is increasing an order of magnitude faster (i.e., $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0}=1/30$\end{document}$), there can be temporary fluctuations, including increases, in the variance (Fig. [8](#Fig8){ref-type="fig"}e). Such a pattern is not predicted when we evaluate the statistics about the endemic equilibrium.

### SIS predictions over a moving window {#Sec19}

Generally, the analytical predictions for leading indicators for SIS disease systems approaching elimination are robust over a moving window, and they perform well in comparison to statistics generated from the null stable models, as indicated by the ROC curves in Fig. [10](#Fig10){ref-type="fig"}. The ROC curves lie above the black line, showing that the indicators behave better than chance in distinguishing between realizations that have been generated by the null and test models and the reported AUC values are close to 1. Furthermore, the trends in the statistics agree with the theoretically predicted trends (compare Fig. [10](#Fig10){ref-type="fig"}a, c, e with Fig. [8](#Fig8){ref-type="fig"}a--c). However, the Gaussian smoother may not be appropriate when the trend declines rapidly, as occurs for the SIS system approaching elimination. Various bandwidths were used, but while smaller bandwidths removed the slowly varying trend successfully, they did not capture the fluctuations relevant for critical slowing down. Larger bandwidths captured these fluctuations but did not successfully remove the slowly varying trend from the last 10 years of the time series, as can be seen in the plots. This problem with Gaussian filtering has been noted before by Dakos et al. ([@CR13]).

### SIR predictions over a moving window {#Sec20}

The theoretical predictions for leading indicators for SIR disease systems approaching elimination are robust over a moving window. The trends in the statistics shown in Figs. [11](#Fig11){ref-type="fig"}a, c, e, and [12](#Fig12){ref-type="fig"}a, c, e agree with the theoretical predictions (Fig. [8](#Fig8){ref-type="fig"}d--f). Notably, the median fluctuation variance for the system with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0} = 1/30$\end{document}$ also exhibits more variability, as predicted theoretically. The ROC analysis for the SIR models indicates that the statistics from the test models perform well in comparison to statistics generated from the null stable models, but the fluctuation variance for the system with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0} = 1/30$\end{document}$ is an exception. The performance is poor because the trend in the variance exhibits wider variation (Fig. [12](#Fig12){ref-type="fig"}c). Finally, the Gaussian filtering performs well in comparison to the van Kampen detrending, because the mean of the SIR model declines linearly and does not exhibit any rapid changes.

Early warning signals for emergence {#Sec21}
-----------------------------------

### SIS early warning signal predictions {#Sec22}

As noted, the standard expectations for early warning signals of systems approaching a critical transition include increasing autocorrelation, increasing variance, and increasing coefficient of variation. Prior to emergence, the theoretical predictions for the SIS model generally agree with these standard expectations (Figs. [9](#Fig9){ref-type="fig"}a--c). For emerging SIS diseases with immigration, the lag-1 autocorrelation is predicted to increase, indicating an increase in memory in the system. The variance is also predicted to increase, as suggested by the increasing area under the power spectrum in Fig. [7](#Fig7){ref-type="fig"}c. However, the coefficient of variation is predicted to decline as $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p(t)$\end{document}$ decreases, indicating that the mean of the stable SIS system rises more rapidly than the variance. The rapid rise in the mean can be seen in Fig. [4](#Fig4){ref-type="fig"}a. However, the coefficient of variation is predicted to increase as the transition is approached if the statistic is evaluated about the solution of the fast--slow system. This is because the mean remains small long after the predicted critical transition (Fig. [4](#Fig4){ref-type="fig"}a). However, the limiting case theoretical predictions for the trends in the statistics for systems on the threshold of emergence do not always agree with the predictions for the corresponding fast--slow systems beyond the critical threshold for emergence. This finding results from the predicted mean given by fast--slow system being lower than that of the stable system in the $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ theory (c.f., Fig. [4](#Fig4){ref-type="fig"}a). Due to the rapid rise in the mean following the bifurcation delay, each statistic exhibits another increase following the transcritical bifurcation. Fig. 9Early warning signals of emergence. Increasing transmission in the SIS model and increasing recruitment in the SIR model result from decreasing vaccination uptake $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p(t)$\end{document}$. Here, the limit in the legend refers to the $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ limit, and only predictions for the models with immigration ($\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta >0$\end{document}$) are shown. The statistics evaluated about $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\varphi ^{\ast }$\end{document}$ (limiting case $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$) are shown in *red line* ($\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta > 0$\end{document}$). The statistics evaluated about the current state of the mean field fast--slow system are shown in *blue* (*dashed*) and *black lines*. The *gray dashed line* indicates the location of the critical point when $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta =0$\end{document}$. In agreement with standard theory, the variance and autocorrelation increase in the SIR and SIS systems as the bifurcation is approached (the peaks in the variance and CV predictions have been cut off for clarity). To aid comparison with Fig. [14](#Fig14){ref-type="fig"}c, the *inset* plot of (**e**) shows a close-up of increasing variance prior to the transition in the SIR case. However, the $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ theory predicts the CV declines on the approach to emergence. The effect of the bifurcation delay is also seen in the statistics predicted by the fast--slow theory. An order of magnitude difference in the change in vaccination uptake $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0}$\end{document}$ affects the predictions; e.g., the CV in the SIS model is predicted to rise before the transcritical bifurcation by the fast--slow theory. Increases in autocorrelation (**a**) and in variance (**b**) can occur in this model after the transcritical bifurcation. The autocorrelation of the fluctuations with a lag of 1 year (SIS) and 1 month (SIR) is shown, and the variance shown is the fluctuation variance. All calculations used the parameter values in Table [7](#Tab7){ref-type="table"}; the SIR model calculations used the parameters in Table [7](#Tab7){ref-type="table"} scaled to rates per month

### SIR early warning signal predictions {#Sec23}

In subcritical SIR systems approaching endemicity, the theoretical predictions for the SIR model agree with standard expectations, except for the coefficient of variation, which is predicted to decline (Figs. [9](#Fig9){ref-type="fig"}d--f). The limiting case theoretical predictions for the trends in the statistics for SIR systems on the threshold of emergence agree more closely with the predictions for the fluctuations about the solution of the corresponding SIR fast--slow system, in contrast to the SIS model, because the bifurcation delay, although present, is not as marked as that in the SIS model. Figure [9](#Fig9){ref-type="fig"}d, e shows that the monthly lag-1 autocorrelation and the variance increase as the bifurcation is approached. It is not surprising that the variance increases because the power spectrum increases in power as the critical threshold for emergence is approached (Fig. [7](#Fig7){ref-type="fig"}d). However, the coefficient of variation is predicted to decline, i.e., the signal should become less noisy with decreasing vaccination uptake. In the context of the power spectrum result, this again makes sense because when the system transitions from subcritical to endemic, the power spectrum changes from a relatively flat shape to one with a peak about a resonant frequency. To examine how differences in vaccination uptake $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0}$\end{document}$ affect the statistics, we varied $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0}$\end{document}$ by $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$1/500$\end{document}$ and $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$1/30~\text {year}^{-1}$\end{document}$ in the fast--slow model. The statistics predicted by the fast--slow theory do not change as rapidly as predicted in the $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ theory. Finally, we did not calculate the early warning signals for the disease systems without immigration because the disease-free state is stable.

### Predictions over a moving window {#Sec24}

In contrast to disease systems approaching elimination, the early warning signals for diseases on the verge of emergence do not perform well. No marked trends are present in the median statistics calculated from either of the van Kampen or Gaussian detrending approaches, with the exception that the variance of the SIS and SIR systems approaching emergence (Figs. [13](#Fig13){ref-type="fig"}c, d and [14](#Fig14){ref-type="fig"}c, d) increases slightly. The 95 % prediction intervals for each statistic further show that all the statistics are highly variable. Moreover, the ROC curves indicate that it may, in general, be difficult to distinguish between subcritical systems with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$R_{0}<1$\end{document}$ and endemic disease systems with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$R_{0}>1$\end{document}$ (Figs. [13](#Fig13){ref-type="fig"}b, d, f and [14](#Fig14){ref-type="fig"}b, d, f). The ROC curves show that the distributions of Kendall's correlation coefficient generated from stable systems and systems approaching a critical transition overlap significantly. However, we are conservative in our approach because we take only the years up to the critical transition in the absence of immigration, and not the years after, when a bifurcation delay may occur, during which time prevalence remains low and so the mean prevalence may not increase for a long time after the transition. Therefore, it is not surprising that it is difficult to distinguish between the subcritical and supercritical systems.

Discussion {#Sec25}
==========

Summary {#Sec26}
-------

The transmission of infectious diseases is a paradigm example of a low-dimensional, noisy, nonlinear dynamical process. Critical transitions in infectious disease systems, which correspond to such socially important events as the emergence of novel pathogens and the elimination of disease, are of special interest. The development of early warning signals of emerging infectious diseases and leading indicators for disease elimination, particularly, would be of tremendous value to the advance of public health. The goal of our study was to develop the theory of such early warning signals and leading indicators for infectious disease transmission systems that meet the assumptions of the familiar SIS and SIR models and which are forced through a critical transition by changes in transmission. Our main result---analytical expressions for the change in observable statistics as the transmission system approaches the critical transition---are reported in Table [4](#Tab4){ref-type="table"}.

Because this theory depends on a sequence of approximations, we investigated the robustness of our results in a sequence of simulations. For the SIS model, we found that the approach to elimination (Fig. [10](#Fig10){ref-type="fig"}) was indicated by an increase in the autocorrelation, variance, and the coefficient of variation, as predicted by the theory. For the SIR model, the approach to elimination (Figs. [11](#Fig11){ref-type="fig"} and [12](#Fig12){ref-type="fig"}) was indicated by an increase in the autocorrelation, a decrease in the variance, and an increase in the coefficient of variation, as predicted by the theory. For the SIS and SIR models, the approach to emergence was indicated by an increase in variance, but the effects on the autocorrelation and the coefficient of variation were imperceptible (Figs. [13](#Fig13){ref-type="fig"} and [14](#Fig14){ref-type="fig"}). Further, since the theoretical patterns may be difficult to distinguish from random noise or fail to provide a sufficiently reliable signal under realistic conditions for data collection, we also examined the suitability of these statistics as an online algorithm for early warning. Following Boettiger and Hastings ([@CR7]), we summarized the results of online analysis using the receiver operator characteristic. These results showed that the approach to elimination in both the SIS model (Fig. [10](#Fig10){ref-type="fig"}) and the SIR model (Figs. [11](#Fig11){ref-type="fig"} and [12](#Fig12){ref-type="fig"}) could be detected with a high level of reliability (large AUC), although variance was a much poorer indicator in the SIR model than autocorrelation and the coefficient of variation. However, the approach to emergence was very difficult to detect in both the SIS model and the SIR model, with estimated AUC values hovering just above the null value of 0.5 (Figs. [13](#Fig13){ref-type="fig"} and [14](#Fig14){ref-type="fig"}). In summary, our simulation studies show the approximations required to obtain the theoretical predictions to be acceptable but indicate that reliable prediction is likely only in the case of leading indicators for elimination, not early warning signals of emergence. Fig. 10Performance of the statistics over a moving window for the SIS system approaching elimination, assuming that immigration occurs ($\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta >0$\end{document}$). Panels **a**, **c**, and **e** show the median statistics (*thick lines*) and 95 % prediction intervals (*shaded regions*). The lag-1 autocorrelation and variance have been calculated from the fluctuations obtained from van Kampen and Gaussian detrending. The coefficient of variation (CV) is marked in *dashed green line* to indicate that it was calculated from the raw time series, not the deviations from the mean. The *dashed vertical line* marks the time of the transcritical bifurcation in the $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ limiting case with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta =0$\end{document}$. Panels **b**, **d**, and **f** show the corresponding ROC curves. The AUC value indicates the area under the corresponding ROC curve. All curves are above the *black line*, showing that the indicators behave better than chance in distinguishing between realizations that have been generated by the null and test models. However, the Gaussian filtering may not be an appropriate method to obtain the fluctuations, because it does not remove the slowly varying trend close to the transition, as exhibited by the rapid rise in the indicators. All calculations used the parameter values in Table [7](#Tab7){ref-type="table"}. A bandwidth of 20 years was chosen for the Gaussian filtering Fig. 11Performance of the statistics over a moving window for the SIR system approaching elimination, assuming that immigration occurs ($\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta >0$\end{document}$). Panels **a**, **c**, and **e** show the median statistics (*thick lines*) and 95 % prediction intervals (*shaded regions*). The lag-1 autocorrelation and variance have been calculated from the fluctuations obtained from van Kampen and Gaussian detrending. The coefficient of variation is marked in *green line* to indicate that it was calculated from the raw time series, not deviations from the mean. The *dashed vertical line* marks the time of the transcritical bifurcation in the $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ limiting case with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta =0$\end{document}$. Panels **b**, **d**, and **f** show the ROC curves. The AUC value indicates the area under the corresponding ROC curve. All curves are above the *black line*, showing that the indicators behave better than chance in distinguishing between realizations that have been generated by the null and test models. A bandwidth of 5 years was chosen for the Gaussian filtering. All calculations used the parameter values in Table [7](#Tab7){ref-type="table"} Fig. 12Performance of the statistics over a moving window for the SIR system rapidly approaching elimination, assuming that immigration occurs ($\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta >0$\end{document}$). Panels **a**, **c**, and **e** show the median statistics (*thick lines*) and 95 % prediction intervals (*shaded regions*). The lag-1 autocorrelation and variance have been calculated from the fluctuations obtained from the van Kampen and Gaussian detrending. The coefficient of variation (CV) is marked in *dashed green line* to indicate that it was calculated from the raw time series, not deviations from the mean. The *dashed vertical line* marks the time of the transcritical bifurcation in the $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ limiting case with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta =0$\end{document}$. Panels **b**, **d**, and **f** show the ROC curves. The AUC value indicates the area under the corresponding ROC curve. All curves are above the *black line*, showing that the indicators behave better than chance in distinguishing between realizations that have been generated by the null and test models. However, the variance performs poorly compared with the lag-1 autocorrelation and CV. A bandwidth of 5 years was chosen for the Gaussian filtering. All calculations used the parameter values in Table [7](#Tab7){ref-type="table"} except for $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{0} = 1/30~\text {year}^{-1}$\end{document}$ Fig. 13Performance of the statistics over a moving window for the SIS system approaching endemicity, assuming that immigration occurs ($\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta >0$\end{document}$). Panels **a**, **c**, and **e** show the median statistics (*thick lines*) and 95 % prediction intervals (*shaded regions*). The lag-1 autocorrelation and variance have been calculated from the fluctuations obtained from the van Kampen detrending and Gaussian filtering. The coefficient of variation is marked in *green* (*dashed*) *line* to indicate that it was calculated from the raw time series, not deviations from the mean. The *dashed vertical line* marks the time of the transcritical bifurcation. Panels **b**, **d**, and **f** shows the ROC curves. The AUC value indicates the area under the corresponding ROC curve. There are no marked trends in the median statistics, although the variance exhibits a slight increasing trend. The ROC curves show that the distributions of Kendall's $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tau $\end{document}$ overlap greatly, suggesting that it is difficult to distinguish between a quasi-stationary system and one approaching an emergence threshold. Due to the bifurcation delay, it is not surprising that it is difficult to distinguish between null and test replicates. A bandwidth of 10 years was selected for the Gaussian filtering. All calculations used the parameter values in Table [7](#Tab7){ref-type="table"} Fig. 14Performance of the statistics over a moving window for the SIR system approaching emergence, assuming that immigration occurs ($\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta >0$\end{document}$). Panels **a**, **c**, and **e** show the median statistics (*thick lines*) and 95 % prediction intervals (shaded regions). The lag-1 autocorrelation and variance have been calculated from the fluctuations obtained from van Kampen and Gaussian detrending. The coefficient of variation is marked in *green* (*dashed*) *line* to indicate that it was calculated from the raw time series, not deviations from the mean. The *dashed vertical line* marks the time of the transcritical bifurcation. Panels **b**, **d**, and **f** shows the ROC curves. The AUC value indicates the area under the corresponding ROC curve. None of median statistics exhibit a marked trend. In addition, the ROC curves indicate that the distributions of Kendall's $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tau $\end{document}$ overlap greatly, suggesting that it is difficult to reliably distinguish between a stable system and one undergoing a critical transition using the lag-1 autocorrelation coefficient. The coefficient of variation also performs poorly, as predicted theoretically. Due to the bifurcation delay, it is not surprising that it is difficult to distinguish between null and test replicates. A bandwidth of 20 months was selected for the Gaussian filtering. All calculations used the parameter values in Table [7](#Tab7){ref-type="table"}

Bifurcation delays {#Sec27}
------------------

Besides the practical goal of indicating patterns that function as early warning signals and leading indicators, our study also provides some basic insights into the dynamics of infectious diseases. Particularly, our simulations illustrated the ubiquity of *bifurcation delays*---changes in system state that lag behind the bifurcation of the limiting case---during disease emergence and elimination. Delays are of fundamental interest because they provide a mechanism for the frequent realization of far-from-equilibrium situations and because they are a dramatic example of tipping point phenomena in infectious diseases. Indeed, delays can cause a system to appear to undergo a catastrophic shift (e.g., the dramatic upturn of infectious cases associated with emergence) when, in fact, only a noncatastrophic transcritical bifurcation has occurred. Our results show that two kinds of delays occur in disease emergence and elimination. The first delay is a deterministic phenomenon referred to as a *canard* (Diener [@CR18]). Canards occur in fast--slow systems where the solution follows an attracting slow manifold of the fast--slow system, passing close to a bifurcation point, and then follows a repelling slow manifold for a considerable period of time. Thus, for instance, in Fig. [3](#Fig3){ref-type="fig"}a, which depicts the emergence of an SIS infection, the $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ limit case branch rapidly increases close to the $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta = 0$\end{document}$ critical point, but the solution of the fast--slow system ($\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon >0$\end{document}$) tracks the disease-free equilibrium for a noticeable amount of time even after it has become unstable. The influence that the canard has on the stochastic dynamics can be observed in Fig. [3](#Fig3){ref-type="fig"}b, where the number of infectious individuals remains in the vicinity of the precritical level for a noticeable period of time. A related phenomenon, but not so dramatic, is observed in the elimination case (Fig. [2](#Fig2){ref-type="fig"}a). Following the bifurcation, the infectious population remains elevated, but unlike the emergence case, no dramatic shift to extinction occurs. Analogous phenomena are observed in the SIR model (Figs. [5](#Fig5){ref-type="fig"} and [6](#Fig6){ref-type="fig"}).

The second class of delays is a stochastic phenomenon, caused by the nonzero time interval that occurs between the time at which the critical point is reached and the time of the event that initiates the transition (i.e., the index case of a major outbreak). This phenomenon is most obvious in the emergence of an immunizing pathogen (the emergence scenario for the SIR model). In this case, the number of infectious individuals in the population prior to the critical transition is most commonly zero. Assuming that there are no infectious individuals in the population at the time of the bifurcation event, then the number of infections in the population will remain zero until the time that an imported case arises. In view of the assumption of demographic stochasticity, importation is a Poisson process with nonzero rate parameter, which similarly ensures that a nonzero period of time must elapse before the first case appears. Indeed, even after the first case appears, there is no guarantee that the system will undergo transition, since even in a supercritical population, there is some chance of rapid extinction (Allen [@CR1]). When the system is only slightly supercritical, this chance may not be small. For measurement purposes, we might define this stochastic bifurcation delay as the time elapsed between the occurrence of the bifurcation and the final occurrence of zero infectious individuals in the population. Clearly, this quantity is a random variable. The distributional properties of this stochastic bifurcation delay are an important problem for further research.

Delays are also important for the immediate practical reason that their existence implies that the state of the system, i.e., the presence or absence of disease, cannot be taken as reliable evidence concerning whether the system is subcritical or supercritical. In the case of disease emergence, a system may have developed to the supercritical state---a significant concern for public health---although no cases have occurred. In such a scenario, any introduction of infectious individuals may spark a major outbreak. In the case of disease elimination, a system may already exist in the subcritical state, with only lingering infections and short transmission chains enabling the pathogen to transiently persist. In such cases, the battle has already been won, but it is crucial that vaccination campaigns and other elimination activities be continued until the remaining lines of transmission are snuffed out. Otherwise, gains that may have come at great cost will fail to be maintained, and the pathogen may resurge in the population, sparked by its own embers still smoldering in the face of relaxed intervention. The development of statistical methods to identify such situations is an urgent problem for further research.

Limiting case predictions can sometimes be misleading {#Sec28}
-----------------------------------------------------

Predictions for the statistics derived from the limiting case ($\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta = 0$\end{document}$) version of the SIR model can sometimes be misleading. As the extinction threshold is approached, the predicted SIR ($\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta >0$\end{document}$) lag-1 autocorrelation increases as expected, but this phenomenon gives way to a decrease close to the $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta = 0$\end{document}$ critical point (Fig. [8](#Fig8){ref-type="fig"}d). This finding is not so surprising when one recalls that the single biologically feasible equilibrium in the $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\eta >0$\end{document}$ model changes from a stable spiral to a stable node near the critical point as vaccination is increased. The magnitude of the real part of the eigenvalue, which approximates the rate of decay of the amplitude of the oscillations to the equilibrium, decreases as elimination is approached, but, near the threshold, the magnitude of the real part begins to increase once more, indicating a shorter return time to equilibrium and increased resistance of the system to perturbations, as the spiral begins to resemble a node. This subsequent decline in system memory is reflected in the decrease in the autocorrelation function near the critical point. The more rapid decay of the oscillations is also reflected in the power spectrum, in that the the spectrum peak declines as vaccination uptake increases, meaning that the resonant frequencies become less amplified. On the other hand, the recovery rate of the stable spiral in the limiting case decreases much more dramatically on the transition to elimination, and oscillations at the resonant frequencies become more amplified. Thus, while the limiting case is an important guide in understanding more general disease models, it is also necessary to thoroughly investigate these models to understand the behavior of systems approaching a critical transition.

Limitations {#Sec29}
-----------

This study has followed Kuehn ([@CR32]) and Boettiger and Hastings ([@CR7]) in the use of stochastic differential equations to understand noise-induced phenomena that occur during a critical transition. It is understood, of course, that for discrete systems (such as infectious disease transmission), this continuum representation is only an approximation, and, moreover, that the approximation breaks down as the system size---or even if the size of just one important compartment---becomes small. The case of disease emergence, where the number of infectious individuals in a population prior to the critical transition is typically zero and only occasionally one or more, is precisely this situation. It would not be surprising, therefore, to discover the approach taken in this paper to perform poorly in this situation. But, this is not the case. As Figs. [13](#Fig13){ref-type="fig"} and [14](#Fig14){ref-type="fig"} show, in both the SIS and SIR systems, the "measured" statistics obtained in simulation are qualitatively similar to the analytic expressions reported in Table [4](#Tab4){ref-type="table"}, with the exception of the coefficient of variation in the SIR model. We note, further, that although emergence was difficult to predict (AUC values were not much greater than 0.5), the van Kampen detrending, which we think of as the theory-dependent approach, typically performed better than generic Gaussian detrending, which may be computed without any theoretical assumptions. It is, nevertheless, a concern that the approach taken here will be misleading under some scenarios: for instance, a very slow approach to the critical transition, when the time between immigration events may be large and the van Kampen approximation is likely to break down. Moreover, the stochastic features of bifurcation delay, particularly important in the emergence scenarios, depend heavily on (a) the sequence of immigration events by infectious individuals, and (b) the probability of nonextinction for a transmission chain initiated by an infectious individual after the critical point has been passed. These are both intrinsically discrete aspects of the emergence process. For this reason, we suggest that the study of (nonstationary) discrete transmission models may be a fruitful direction for further study. There is, of course, a large body of work on (stationary) discrete contagion models on which such a theory could build (Bailey [@CR5]; Renshaw [@CR40]; Daley and Gani [@CR17]; Allen [@CR1]).

Conclusion {#Sec30}
==========

In conclusion, early warning systems for emerging infectious diseases and leading indicators of elimination, which would be of tremendous benefit to society, now appear to be potentially achievable. Their realization depends on two key developments: (1) better understanding of noise-induced phenomena exhibited by nonlinear contagion processes in the vicinity of their critical points, and (2) surveillance methods that acquire data of sufficiently high accuracy, resolution, and timeliness. Toward the first of these goals, our studies have indicated that anticipation of critical transitions is theoretically possible. It is hoped that these results, which include expressions for the key observable phenomena (Table [4](#Tab4){ref-type="table"}), may help to guide achievement of the second, which is now the most important outstanding problem, i.e., empirical demonstration in experimental or surveillance data.

Appendix A {#Sec31}
==========

To make the description of the probability distribution given by Eq. ([4](#Equ4){ref-type=""}) in the main text more amenable to analytical analysis, we approximate the discrete infectious state random variable by a continuous random variable $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\zeta $\end{document}$, $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$ I = N \varphi(t) + N^{1/2} \zeta. $$ \end{document}$$We are anticipating that the probability distribution will depend on the population size *N*. We do not assume what equation $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\varphi (t)$\end{document}$ satisfies, but we will see later that it is equal to the proportion of infectious individuals at time *t*, in the limit of infinitely large population size *N*; the system size expansion will give rise to the mean field theory discussed in the "[Mean field theory of SIR model](#Sec8){ref-type="sec"}" section. Equation ([10](#Equ10){ref-type=""}) says that fluctuations (denoted by $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\zeta $\end{document}$) about the deterministic state $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$I/N$\end{document}$ are expected to be of the order of $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$N^{-1/2}$\end{document}$, which is expected from the central limit theorem, and so the fluctuations in *I* are of the order $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$N^{1/2}$\end{document}$ (Van Kampen [@CR52]). If the population size *N* is large, we intuitively expect fluctuations to be small. Consequently, the probability distribution for the system being in a certain state at time *t* is expected to have a peak located at the deterministic value $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$N \varphi (t)$\end{document}$ and a standard deviation of the order $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$N^{1/2}$\end{document}$. The approximation ([10](#Equ10){ref-type=""}) turns out to be a normal random variable.

The system size expansion is described in detail by the van Kampen (Van Kampen [@CR52]) and has been applied to one-dimensional population biology models (McKane and Newman [@CR36]). Therefore, we do not include the full details of the expansion of Eq. ([4](#Equ4){ref-type=""}) in this paper. In summary, there are five essential steps: (1) write down transition rates (e.g., Table [2](#Tab2){ref-type="table"}); (2) derive the master equation for the Markov process; (3) rewrite the master equation in terms of jump functions; (4) substitute the ansatz ([10](#Equ10){ref-type=""}) into the master equation and perform the expansion; and (5) collect deterministic (leading order) and stochastic (next-to-leading order) terms to obtain the deterministic system and its stochastic correction.

Rewriting the master equation as described in detail in (Van Kampen [@CR52]) and performing the system size expansion using Eq. ([10](#Equ10){ref-type=""}), at leading order, give rise to the differential equation that $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\varphi (t)$\end{document}$ satisfies $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$ \frac{d\varphi}{dt} =\overline{\beta} \varphi (1-\varphi) + \eta (1-\varphi) - \gamma \varphi. $$ \end{document}$$This is simply the fast--slow system ([3](#Equ3){ref-type=""}). At the next-to-leading order, the method leads to a linear Fokker--Planck equation for the distribution of the fluctuations about the solution $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\varphi (t)$\end{document}$, $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$ \begin{array}{rll}\label{eqn:FPESIS}\frac{\partial \Pi}{\partial t} &=& -\frac{\partial (\Pi \zeta)}{\partial \zeta}(\overline{\beta}-2 \overline{\beta} \varphi(t)-\eta-\gamma) \\&&+{\kern-2pt}\frac{1}{2} \frac{\partial^{2} \Pi}{\partial t^{2}}{\kern-.5pt}(\overline{\beta} \varphi(t)(1{\kern-2pt}-{\kern-2pt}\varphi(t)){\kern-2pt}+{\kern-2pt}\eta (1{\kern-2pt}-{\kern-2pt}\varphi(t)){\kern-2pt}+{\kern-2pt}\gamma \varphi(t)).\end{array} $$ \end{document}$$

The deterministic system describes the evolution of the *trend* or the location of the peak of the probability distribution of the infectious state $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$I $\end{document}$ at a given time *t*. The variable $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\varphi (t)$\end{document}$ is defined as the proportion $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$I(t)/N$\end{document}$ in the limit $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$N \rightarrow \infty $\end{document}$. The Fokker--Planck equation describes the evolution of the fluctuations, i.e., the standard deviation of the probability distribution about $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$N \varphi (t) $\end{document}$. Since the Fokker--Planck equation is linear, the solution for the probability distribution of the fluctuations $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\Pi (\zeta , t)$\end{document}$ in the deterministic state is a normal distribution. We note that this is a result of our second-order truncation, not a derivative property of the original model, per se.

Our aim is to quantify the fluctuations in the quasi-stationary state given by the solution of the SIS fast--slow system at time *t*. We can do this by using the fact that Eq. ([12](#Equ12){ref-type=""}) is equivalent to the following stochastic differential equation: $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$\begin{array}{rll}\label{eqn:SISsde}d\zeta &=& \zeta(\overline{\beta}-2 \overline{\beta} \varphi(t)-\eta-\gamma)dt \\&& + \sqrt{\overline{\beta} \varphi(t)(1-\varphi(t))+ \eta (1 - \varphi(t))+\gamma \varphi(t)}d{\mathrm{W}},\end{array}$$ \end{document}$$where *d*W is a Wiener process with mean zero and variance dt (Gardiner [@CR22]). Analytical analysis of Eq. ([13](#Equ13){ref-type=""}) enables us to establish the quasi-stationary statistics that potentially could be used as leading indicators of a critical transition in SIS infectious disease systems.

As a special case, we consider the limit $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$, whereby the quasi-stationary state is given by the deterministic endemic equilibrium of Eq. ([11](#Equ11){ref-type=""}), $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\varphi ^{\ast }$\end{document}$ (defined in Table [8](#Tab8){ref-type="table"}). Since Eq. ([11](#Equ11){ref-type=""}) dictates the evolution of the deterministic state and Eq. ([12](#Equ12){ref-type=""}) determines fluctuations in it, we may let $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\varphi (t) = \varphi ^{\ast }$\end{document}$ in Eq. ([12](#Equ12){ref-type=""}), and therefore, Eq. ([13](#Equ13){ref-type=""}) becomes $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$\begin{array}{rll}\label{eqn:SISsdeeq}d\zeta &=& \zeta(\overline{\beta}-2 \overline{\beta}\varphi^{\ast}-\eta-\gamma)dt \\&&+ \sqrt{\overline{\beta} \varphi^{\ast}(1-\varphi^{\ast})+ \eta (1 - \varphi^{\ast})+\gamma \varphi^{\ast}}d{\mathrm{W}}.\end{array}$$\end{document}$$

Analysis of Eq. ([13](#Equ13){ref-type=""}) leads to expressions for the fluctuation statistics, whereby the influence of the mean has already been removed. To analyze Eq. ([13](#Equ13){ref-type=""}), it is easier to rewrite it as follows: $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$ \frac{d \zeta}{dt} = \lambda \zeta + Q \Gamma(t), $$ \end{document}$$where $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\lambda $\end{document}$ and $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$ Q$\end{document}$ are defined in Table [8](#Tab8){ref-type="table"} in the main text and $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\Gamma (t)$\end{document}$ denotes Gaussian white noise. Fourier transformation of Eq. ([15](#Equ15){ref-type=""}) yields $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$ i \tilde{\zeta}(\omega) = \lambda \tilde{\zeta}(\omega) + Q \tilde{\gamma}(\omega), $$ \end{document}$$where $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tilde {\zeta }(\omega )$\end{document}$ is the Fourier transform of $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\zeta $\end{document}$. The definition of the Fourier transform of a continuous function is provided in Nisbet and Gurney ([@CR37]), and those authors extensively discuss the meaning of the Fourier transform of white noise. Rearranging Eq. ([15](#Equ15){ref-type=""}), we obtain $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$ \tilde{\zeta}(\omega) = \frac{Q}{i \omega - \lambda}. $$ \end{document}$$The quasi-stationary power spectrum of the fluctuations is given by the long-term average of the square of the magnitude of $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tilde {\zeta }(\omega )$\end{document}$. The power spectrum is (Nisbet and Gurney [@CR37]) $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$ S_{I}(\omega) = \langle |\tilde{\zeta}(\omega)^{2} |\rangle= \frac{Q}{\omega^{2} + \lambda^{2}}, $$ \end{document}$$where $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\langle .\rangle $\end{document}$ is the expectation. We can integrate this expression over the frequency domain to obtain the quasi-stationary variance, $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$ \sigma^{2} = \frac{1}{\pi} \int_{0}^{\infty} S_{I}(\omega)d\omega = \frac{Q}{2 |\lambda|}. $$ \end{document}$$The quasi-stationary autocorrelation is given by the integral $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$ \frac{1}{\pi} \int_{0}^{\infty} S_{I}(\omega) \cos (\omega \tau) d\omega = \exp(\lambda \tau). $$ \end{document}$$Finally, we can use Eq. ([10](#Equ10){ref-type=""}) to obtain an expression for the coefficient of variation of $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$I(t)$\end{document}$. Since $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\zeta \sim \text {Normal}(0, \sigma ^{2})$\end{document}$, where the variance $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\sigma ^{2}$\end{document}$ is given by Eq. ([19](#Equ19){ref-type=""}), then $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$I(t) = N \varphi (t) + \zeta N^{\frac {1}{2}} \sim \text {Normal}(N \varphi (t), N \sigma ^{2})$\end{document}$. Therefore, the theoretical coefficient of variation is $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$(N^{-\frac {1}{2}} \sigma )/\varphi (t)$\end{document}$. Table 8Variable substitutions for the SIS model. To calculate the fluctuations about the deterministic endemic equilibrium $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\varphi ^{\ast }$\end{document}$, replace $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\varphi (t)$\end{document}$ with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\varphi ^{\ast }$\end{document}$ in each variableVariableExpression$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\overline {\beta }$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\beta (1-(p_{s}+p_{0} t))$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\varphi ^{\ast }$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$(\overline {\beta }-\gamma -\eta +\sqrt {(\overline {\beta }-(\gamma +\eta )^{2}+4 \overline {\beta } \eta )})/2 \overline {\beta }$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\lambda $\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\overline {\beta }-2 \overline {\beta } \varphi (t) - \gamma -\eta $\end{document}$*Q*$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\overline {\beta }\varphi (t)(1-\varphi (t))+\eta (1-\varphi (t))+\gamma \varphi (t)$\end{document}$Note that $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\overline {\beta }$\end{document}$ is constant in a small time increment and is evaluated at the current time *t*

Appendix B {#Sec32}
==========

To make analytical progress with Eq. ([8](#Equ8){ref-type=""}) in the main text, we use the van Kampen system size expansion. We approximate the number of susceptibles and the number of infectives by $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$ \begin{array}{rll}\label{eqn:SIRansatz}S &=&N \psi(t)+ N^{\frac{1}{2}} \sigma \\ I&=&N \varphi(t)+ N^{\frac{1}{2}} \zeta,\end{array} $$ \end{document}$$respectively. Thus, we have transformed the discrete variables in terms of continuous stochastic variables $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\sigma $\end{document}$ and $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\zeta $\end{document}$, and, as in Appendix [A](#App1){ref-type="app"}, we anticipate that the probability distribution will depend on the system size *N*.

The van Kampen system size expansion has been applied to SIR models previously (Alonso et al. [@CR2]), and so, we do not include the full details of the expansion here. Using the approximations ([21](#Equ21){ref-type=""}) to leading order, the system size expansion gives rise to the system $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$\begin{array}{rll}\label{eqn:SIRmacro}\dot{\psi} &=& \mu(1-\overline{p}) -\beta \psi \varphi - \eta \psi -\mu \psi \\\dot{\varphi} &=& \beta \psi\varphi + \eta \psi -(\gamma+\mu) \varphi.\end{array}$$ \end{document}$$which is simply the SIR system approaching a transition ([7](#Equ7){ref-type=""}). At next-to-leading order, the Fokker--Planck equation for the fluctuations in the solution of the system ([22](#Equ22){ref-type=""}) at time *t* is $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$\begin{array}{rll}\label{eqn:FPESIR}\frac{\partial \Pi}{\partial t} &=& - \sum\limits_{i=1}^{2}\frac{ \partial} {\partial x_{i}}(\mu_{i}(x) \Pi(x, t)) \\&&+\sum\limits_{i=1}^{2}\sum\limits_{j=1}^{2}\frac{ \partial} {\partial x_{i} x_{j}}(D_{ij}(x) \Pi (x, t)),\end{array} $$ \end{document}$$where $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$x=(\sigma (t), \zeta (t))$\end{document}$ denotes the vector of fluctuations from the susceptible and infectious states, respectively. The mean vector is given by $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\mu _{i}(x) = a_{i1} \sigma (t) + a_{i2} \zeta (t) $\end{document}$, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$i =1,2$\end{document}$. The matrices *A* and *D* are obtained from the system size expansion. The coefficients $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$a_{ij}$\end{document}$ of the mean vector are the entries of the Jacobian matrix obtained from linear stability analysis. The $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$D_{ij}$\end{document}$ coefficients are the entries of the noise-covariance matrix and can only be obtained from the system size expansion (Van Kampen [@CR52]). Equation ([22](#Equ22){ref-type=""}) describes the evolution of the trend, and the Fokker--Planck equation models the evolution of the fluctuations. The solution of Eq. ([23](#Equ23){ref-type=""}) is a bivariate normal distribution since the Fokker--Planck equation is linear (Van Kampen [@CR52]). We note that when incidence of a disease is low, as occurs when the system is subcritical, the assumption that the fluctuations are normally distributed about the mean is likely to not be appropriate because the approximation ([21](#Equ21){ref-type=""}) cannot describe chance extinctions, which can occur if *I* is small. Finally, it is possible to numerically obtain the variance--covariance matrix for the fluctuations in *S* and *I* around the values of the solution of Eq. ([22](#Equ22){ref-type=""}), but, in this paper, we are interested only in fluctuations in *I* since *S* is unobservable.

To quantify the fluctuations, we use the fact that the following system of stochastic differential equations is equivalent to Eq. ([23](#Equ23){ref-type=""}): $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$ \begin{array}{rll}\label{eqn:SIRsdes}\frac{d\sigma}{dt} &=&a_{11} \sigma(t) + a_{12} \zeta(t) + \Gamma_{1}(t) \\\frac{d\zeta}{dt}&=& a_{21} \sigma(t) + a_{22} \zeta(t) + \Gamma_{2}(t),\end{array} $$ \end{document}$$where $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\Gamma _{1}(t),\Gamma _{2}(t)$\end{document}$ are white-noise processes with covariance matrix *D*. The entries of the matrices *A* and *D* are included in Table [9](#Tab9){ref-type="table"} in the main text. If the mean field $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\epsilon \rightarrow 0$\end{document}$ theory applies, the coefficients $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$a_{ij}$\end{document}$ are approximately the entries in the Jacobian matrix of Eq. ([6](#Equ6){ref-type=""}) evaluated at the endemic equilibrium. To analyze the system ([24](#Equ24){ref-type=""}), we take its Fourier transform, leading to $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$ \begin{array}{rll}\label{eqn:FTSIRsdes}i \tilde{\sigma}(\omega) &=&a_{11} \tilde{\sigma}(\omega) + a_{12} \tilde{\zeta}(\omega) + \tilde{\Gamma_{1}}(\omega)  \\ i \tilde{\zeta}(\omega)&=& a_{21}\tilde{\sigma}(\omega) + a_{22} \tilde{\zeta}(\omega) +\tilde{\Gamma_{2}}(\omega),\end{array}$$ \end{document}$$where $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tilde {\sigma }(\omega )$\end{document}$, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tilde {\zeta }(\omega )$\end{document}$, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tilde {\Gamma _{1}}(\omega )$\end{document}$ and $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tilde {\Gamma _{2}}(\omega )$\end{document}$ are the Fourier transforms of $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\sigma $\end{document}$, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\zeta $\end{document}$, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\Gamma _{1}$\end{document}$, and $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\Gamma _{2}$\end{document}$, respectively. Since we are interested in the fluctuations about the infectious state, we solve Eq. ([25](#Equ25){ref-type=""}) for the Fourier transform $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tilde {\zeta }(\omega )$\end{document}$, obtaining $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$ \tilde{\zeta}(\omega) = \frac{a_{11}-i \omega \Gamma_{2}(\omega)}{d-\omega^{2}+i T \omega}-\frac{a_{21}\Gamma_{1}(\omega)}{d-\omega^{2}+i T \omega}, $$ \end{document}$$where *T* and *d* are the trace and determinant of the Jacobian matrix, respectively, given in Tables [9](#Tab9){ref-type="table"}. Using Eq. ([26](#Equ26){ref-type=""}), we can establish the power spectrum of the fluctuations $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\langle |\tilde {\zeta }(\omega )^{2}|\rangle $\end{document}$, $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$ S_{I}(\omega)=\frac{(\alpha_{I}+D_{22} \omega^{2})}{(\omega^{2}-d)^{2}+T^{2} \omega^{2}}, $$ \end{document}$$where $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha _{I} $\end{document}$ is given in Table [9](#Tab9){ref-type="table"}. The variance and autocorrelation of the fluctuations in $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$I(t)$\end{document}$ around the solution of system ([22](#Equ22){ref-type=""}) may be obtained using Eq. ([27](#Equ27){ref-type=""}) through integration. The variance of the fluctuations is $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$ \sigma^{2}=\displaystyle \frac{1}{\pi}\int_{0}^{\infty} S_{I}(\omega) d\omega =\frac{\alpha_{I} +d D_{22}}{2 d T}. $$ \end{document}$$The lag-$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tau $\end{document}$ autocorrelation is given by the integral $$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document} $$ \displaystyle \frac{1}{\pi}\int_{0}^{\infty} S_{I}(\omega) \cos (\omega \tau) d\omega. $$ \end{document}$$Since we could not obtain an analytical expression for the solution of Eq. ([29](#Equ29){ref-type=""}), we had to obtain this integral numerically. Finally, an expression for the coefficient of variation of *I* may also be obtained, using Eq. ([21](#Equ21){ref-type=""}). Since $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\zeta \sim \text {Normal}(0, \sigma ^{2})$\end{document}$, where the variance $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\sigma ^{2}$\end{document}$ is given by Eq. ([28](#Equ28){ref-type=""}), then $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$I(t) \sim \text {Normal}(N \varphi (t), N \sigma ^{2})$\end{document}$. Therefore, the theoretical coefficient of variation is $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$(N^{-\frac {1}{2}} \sigma )/\varphi (t)$\end{document}$. Table 9Variable substitutions for the SIR model. To calculate the fluctuations about the infectious endemic equilibrium $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\varphi ^{\ast }$\end{document}$, replace $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\varphi (t)$\end{document}$ with $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\varphi ^{\ast }$\end{document}$ in each variableVariableExpression$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\overline {p}$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$p_{s}+p_{0} t$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\psi ^{\ast }$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$( \mu (\beta (1-\overline {p})+\tilde {\gamma })+\eta \tilde {\gamma }-\sqrt {b})/2 \beta \mu $\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\varphi ^{\ast }$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$(\beta (1-\overline {p}) \mu -\tilde {\gamma } (\mu +\eta )+\sqrt {b})/2 \beta \tilde {\gamma }$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$a_{11}$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$- \beta \varphi (t) -\eta -\mu $\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$a_{12}$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$- \beta \psi (t)$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$a_{21}$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\beta \varphi (t) + \eta $\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$a_{22}$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$ \beta \psi (t)-(\gamma +\mu )$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$D_{11}$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\beta \psi (t) \varphi (t) +\eta \psi (t)+\mu \psi (t)+\mu (1-\overline {p})$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$D_{12}$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$-\beta \psi (t)\varphi (t) -\eta \psi (t)$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$D_{21}$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$-\beta \psi (t)\varphi (t) -\eta \psi (t)$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$D_{22}$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\beta \psi (t) \varphi (t) + \eta \psi (t)+\tilde {\gamma } \varphi (t)$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$d $\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$a_{11}a_{22}-a_{12}a_{21}$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$T $\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$-a_{11}-a_{22}$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\alpha _{I}$\end{document}$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$a_{21}^{2} D_{11}+a_{11}^{2} D_{22}-2 a_{12}a_{11}D_{12}$\end{document}$Note that $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\overline {p}$\end{document}$ is assumed to be constant in a small time increment and is evaluated at the current time *t*. Other symbols in the table: $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$b = - 4\beta (1-p) \mu ^{2} \tilde {\gamma }+(-\mu (\beta (1-\overline {p})+\tilde {\gamma })-\eta \tilde {\gamma })^{2}$\end{document}$, $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$\tilde {\gamma }=\gamma + \mu $\end{document}$

This research was funded by a grant from the James S. McDonnell Foundation.