Infection dynamics in ecosystems: on the interaction between red and grey squirrels, pox virus, pine martens and trees

Ecological and epidemiological processes and interactions influence each other, positively and negatively, directly and indirectly. The invasion potential of pathogens is influenced by the ecosystem context of their host species’ populations. This extends to the capacity of (multiple) host species to maintain their (common) pathogen and the way pathogen dynamics are influenced by changes in ecosystem composition. This paper exemplifies these interactions and consequences in a study of red and grey squirrel dynamics in the UK. Differences and changes in background habitat and trophic levels above and below the squirrel species lead to different dynamic behaviour in many subtle ways. The range of outcomes of the different interactions shows that one has to be careful when drawing conclusions about the mechanisms and processes involved in explaining observed phenomena concerning pathogens in their natural environment. The dynamic behaviour also shows that planning interventions, for example for conservation purposes, benefits from understanding the complexity of interactions beyond the particular pathogen and its threatened host species.


Introduction
The dynamics of pathogens in natural systems are shaped not only by their host species but by the entire ecosystem of which they are part [1][2][3]. The ecosystem can harbour a variety of host species for a given pathogen, even at different trophic levels. The dynamics of these species, and their within-and betweenspecies interactions, provide the environment in which the pathogen survives, reproduces and spreads. There are many more species at all trophic levels that are not susceptible to a particular pathogen, but nevertheless interact with its host species. Although it can be difficult to strictly differentiate between the host and non-host species of a pathogen [4,5], for example because of varying degrees of competence [6], it is clear that a pathogen's survival is determined in an environment containing many more interacting species than just its recognized host species. It is important to study the way ecological and epidemiological processes influence each other in order to understand the observed dynamics of a pathogen and the populations of its host species in their natural setting.
We have previously defined a general and relatively simple model ecoepidemiological system that incorporates competition within and between any number of host and non-host species, including consumer-resource relationships [7][8][9]. Using this system, we have shown that even subtle effects on interaction strengths between ecosystem species influence the pathogen dynamics among its hosts. We have shown that concepts such as dilution/ amplification effects, maintenance species or community, reservoir species or community, that predominantly were thought of (and hence studied) in terms of host species alone, were in fact strongly influenced by interactions with non-host species [8,9]. Indeed, the ecosystem context may result in the same set of host species being a maintenance community or reservoir for a pathogen in one ecosystem, but not in another. Something similar holds for whether there is a dilution or amplification effect for a pathogen. It seems that taking a fuller view of the ecosystem context is needed to be able to understand observed patterns of pathogen dynamics and the roles of host species in those dynamics.
Here, we illustrate this need, and the explanatory power obtained when taking a fuller but still manageable ecosystem view. We study a host-pathogen system that has the minimal requirements for a meaningful analysis: a single pathogen, multiple host species, non-host species, different trophic levels, competition and consumer-resource interaction, and different observed dynamics under different circumstances. We explore the dynamics and interaction of red squirrels (Sciurus vulgaris) and grey squirrels (S. carolinensis) in different regions of the UK, with and without squirrel pox virus (SQPV). It is decidedly not our aim to present a detailed model or analysis of this system; many excellent studies exist that merge SQPV models with data to yield insight into the prospects for the red squirrel and aid conservation efforts [10][11][12][13][14][15][16][17][18][19]. Our aim is to highlight how ecological processes influence the interaction between a pathogen and its host species. We argue that analysis of a relatively well-studied system clarifies the need to take a wider ecosystem view into account when exploring dynamics involving pathogens. Our basic ingredients are a pathogen, SQPV; its host species, red and grey squirrels; their resources; and a predator. The virus is lethal for red squirrels, but grey squirrels are unaffected carriers [20][21][22]. Red and grey squirrels compete for food and partially for the same habitat, causing stress and pressure on red squirrels [23][24][25][26][27], with grey squirrels generally being the superior competitor as they use a broader range of resources. Grey squirrels are predated on by pine martens (Martes martes) in some of the areas where both species occur [28][29][30]. Over a longer period of red and grey squirrel interaction, forest management may have resulted in a gradual change in some areas towards types of trees (resources) that favour grey squirrels over red squirrels and, in turn, forest management is considered as a means to increase the competitive strength of red squirrels [31][32][33][34][35][36]. We use the insights from the cited papers as inspiration and focus on a qualitative analysis of the system dynamics. Depending on the aspects included, we study patterns in the red and grey squirrel interaction in England and Scotland, focussing on steady-state abundance levels, stability and bifurcation structure. The results illustrate the richness of analysis that can be performed and insights that can be gained when combining even rudimentary ecology and epidemiology in a toy ecosystem, and show how essential it is to recognize the indirect roles of non-host species at various trophic levels.

On eco-epidemiological dynamics involving three trophic levels
We describe the dynamics and interactions of red and grey squirrels, a predator (the pine marten), and a pathogen (SQPV) for which both squirrel species are hosts but the predator is a non-host. In addition, we consider the resources for the red and grey squirrels in terms of the habitat/food quality and availability, which may locally differentially favour one squirrel species over the other. We account for the imbalance in an abstract way, as the relative potential carrying capacities of red and grey squirrels in the absence of the alternate species. Local changes in habitat/food quality, for example as a result of forest management, are assumed to occur on a much slower time scale than the other processes and interactions in our system, and hence we do not explicitly model squirrel resource dynamics. Overall, we regard three trophic levels: the basic resources (collectively and for convenience called trees), the herbivore level (squirrels, SQPV) and the carnivore level ( pine marten), as well as their interaction. For the model specification and analysis, we use the approach and notation from [7][8][9]. Let subscripts r and g signify red and grey squirrels respectively, and subscript p signify the predator. The red squirrel dies from SQPV, otherwise we assume no direct effect on population dynamics. The dynamics of the host and predator species are described by where N r , N g and N p are the population densities of red and grey squirrels and the predator, respectively, and I r is the density of infectious red squirrels. All parameters are defined in table 1. recrudescent rate of infected grey squirrels [12] royalsocietypublishing.org/journal/rsif J. R. Soc. Interface 18: 20210551 For simplicity, we have removed repeated subscripts, writing for example ϕ r = ϕ rr . The parameters ϕ denote the withinand between-squirrel species competition for resources, the parameters ψ denote the strength of predation interaction (with e describing the conversion efficiency). The parameters ν and μ denote the birth rate and minimum death rate, respectively. For convenience, all species are assumed to show logistic growth in the absence of the other species. The carrying capacities of red and grey squirrels in the absence of the other squirrel species and the predator are K r = (ν r − μ r )/ϕ r and K g = (ν g − μ g )/ϕ g , respectively.
We focus our analysis involving the predator on the situation in Scotland where the pine marten is present and has been increasing [29,30]. The equation for the predator in system (2.1) is given for completeness only. We assume that the pine marten is not dependent on squirrels for its population growth and that, for the time being, squirrels represent a relatively small novel food source additional to its normal resources. This translates into two assumptions: logistic growth in the absence of squirrels and a potentially much larger effect of the predator on the squirrel populations than vice versa (equation (2.1)). In fact, we assume that ν p ≫ e pr ψ rp N r + e pg ψ gp N g and that the predator population moves rapidly to steady state N Ã p . This assumption seems reasonable in the early phases of red and grey squirrel competition in Scotland. In our analysis, the predator's effects are then experienced as an additional rate of mortality and affect the local carrying capacity that the red and grey squirrels could attain in each other's absence. Increasing the predator steady-state abundance then allows us to traverse the landscape of qualitative dynamic behaviour of the system in terms of the carrying capacities K r and K g , replacing μ r and μ g with m r þ c rp N Ã p and m g þ c gp N Ã p , respectively, in the presence of the predator. In the electronic supplementary material, we present, for completeness, results for the more general case of full predator dynamics and interaction.
The dynamics of infectious red and grey squirrels are modelled by density-dependent within-and between-species transmission where N r = S r + I r , N g = S g + I g + A g , S r and S g represent the population densities of susceptible red and grey squirrels, respectively. Infection with SQPV is assumed to be lifelong in red and grey squirrels, but for grey squirrels it has been shown that there may be intermittent shedding of the virus [12]. We incorporate the latter by a class A g that represents the population density of grey squirrels that have been infected, but are not infectious. We explore the dynamics of the model specified by equations (2.1) and (2.2) as follows. For a number of specific scenarios, we determine how the steady-state (equilibrium) values of the model are determined by the values of the carrying capacities K r and K g . Having determined the possible steady states with one or both species present, without and with SQPV, we determine the stability of each steady state to small disturbances. This is achieved in two ways for infection-free steady states, by computing eigenvalues of the Jacobian matrix or the next generation matrix (NGM), and via the Jacobian matrix for infected steady states [39]. We determine thresholds for transition between stable steady states analytically from the model, and confirm these by our numerical calculations. A model of the interactions between two host species and a pathogen (unspecified) was analysed in [40]. That model had no density-dependent regulation of the infected populations, and the thresholds for transition between infected steady states were presented in terms of the host population densities rather than the reproduction numbers that we employ. The study presented in [17] addressed two squirrel species, SQPV and the pine marten as predator, but did not explicitly model infection dynamics in the grey squirrel. One feature of our model that differs from most previous models is the inclusion of the infected but not infectious state A g . We included this state to increase generality because it is unclear what happens to grey squirrels after recovery from SQPV. Our aim is not to fully explore the squirrel-SQPV system, but rather to more generically use the setting to highlight interactions between ecology and epidemiology. A model without this state can be recovered by setting σ = η = 0. This would not change the expressions for the thresholds presented in table 2, although the numerical values of the steady states would change. The stability results derived in electronic supplementary material would also be unchanged.
The system of equations (2.1) and (2.2) has multiple steady states. The Jacobian matrix is structured The matrices C, D, E and H are specified in electronic supplementary material, §S1.2 and S1.3. In brief, C is the community matrix and contains ecological variables, and H contains epidemiological variables [7]. At an infection-free steady state E = 0. An infection-free steady state is ecologically stable if all eigenvalues of C have negative real part, s(C) < 0, where s(C) is the maximum real part of the eigenvalues of the matrix C. An infection-free steady state is evaluated at infection-free steady-state values of N r and N g , where T r and T g are the expected times that infected red and grey squirrels (respectively) remain infectious. The NGM can be interpreted as follows. An infected red squirrel is infectious for an expected time T r = 1/(ν r + α), during which it infects other red squirrels at the rate β r and grey squirrels at the rate β gr . An infected grey squirrel is initially infectious for an expected time t g = 1/(ν g + σ), during which a proportion σt g enter the non-infectious compartment, A g . A proportion p = η/(ν g + η) of these return to the I g compartment, remain infectious for a further expected time t g , then a proportion σt g of those return to the A g compartment, and so on. Hence the total expected time that an infected grey squirrel is infectious is During this time it infects other grey squirrels at the rate β g and red squirrels at the rate β rg . An infection-free steady state is epidemiologically stable if ρ(K) < 1, where ρ(K) is the maximum eigenvalue of the matrix K(N r , N g ) evaluated at the corresponding infection-free steady state. The matrix H may be decomposed H ¼ T þ S, where T is a transmission matrix and S is a transition matrix [7]. The NGM of large domain K L ¼ ÀT S À1 has the same non-zero eigenvalues as K (see [41]). Hence the condition ρ(K) < 1 is equivalent to the condition s(H) < 0. The analysis below, with details in electronic supplementary material, reveals that the system specified by equations (2.1) and (2.2) (with a fixed constant value of N p ) has three non-trivial infection-free steady states, and three infected steady states. The steady states and the transitions between them are summarized in figure 1. Details of the transition thresholds are in table 2. In particular, we define three reproduction numbers for the onset of SQPV: R r ¼ b r K r T r where red squirrels only are present; R g ¼ b g K g T g where grey squirrels only are present; and where both squirrel species are present.

Infection-free steady states
In the absence of the predator and the pathogen (setting N p = 0 and I r = 0 in equation (2.1)), there are three non-trivial steady states. This could reflect the situation before the introduction of SQPV into the UK, and in areas where SQPV has not yet invaded and intra-and interspecies competition is mediated by the quality and suitability of the habitat. Factors such as the availability of food and nesting opportunities and the presence of enemies are assumed to determine the carrying capacity that each species could achieve in isolation. We explore differences in the outcome of competition in relation to differences in habitat suitability. The steady state with red squirrels only, at carrying capacity (N r , N g ) = (K r , 0), is stable if K g < B r (see table 2 and  figure 1; electronic supplementary material, §S1.2). In other words, an ecosystem with red squirrels but no grey squirrels is unstable to invasion by grey squirrels if their carrying capacity exceeds the threshold K g = B r . Similarly, the grey squirrel-only steady state (0, K g ) is stable if K r < B g . When the two species coexist, their steady-state population densities are The two species can coexist if ϕ r K r > ϕ rg K g and ϕ g K g > ϕ gr K r , which can only be true if ϕ r ϕ g > ϕ rg ϕ gr . In this context, existence means that the equations have a strictly positive solution. The coexistent steady state is stable whenever it exists. Here we are assuming that SQPV is not present in the squirrel populations. If SQPV were introduced, then the virus could invade the red squirrel-only steady state if R r . 1, invade the grey squirrel-only steady state if R g . 1, or invade the coexistent steady state if R 0 . 1. We illustrate the interaction between the two species of squirrel by calculating their steady states for all values of their carrying capacities. For this, and without loss of generality, we chose the values of ϕ r and ϕ g to scale the carrying Table 2. Thresholds for transition between steady states. The states are labelled with the steadystate values of N r and N g only.

state
between-state threshold royalsocietypublishing.org/journal/rsif J. R. Soc. Interface 18: 20210551 capacities of both squirrel species to one. We then simulated the degradation of the habitat suitability for red squirrels by replacing ϕ r with kϕ r , hence k = K g /K r , and where two species are present, replacing ϕ rg with (k − 1)ϕ rg . We require k ≥ 1, the assumption being that the carrying capacity for red squirrels is at best equal to that of grey squirrels. Parameter values are summarized in table 1. The bifurcation diagram (figure 2a) shows the steady states of both squirrel species as functions of the red squirrel carrying capacity. The idea behind the bifurcation diagram is that local differences may have evolved on a slow time scale, negatively affecting the suitability of the habitat for red squirrels compared to grey squirrels. This can occur as a result of 'squirrel-independent' decisions in forest management about tree composition (see [36] and references given there), for example by replanting with tree species that produce seeds that can be consumed less easily by red squirrels. This demonstrates how slow changes in the trophic level below the herbivore level of the squirrels qualitatively affect the herbivore populations. Figure 2a shows that, in the absence of SQPV, in habitats where the suitability for red squirrels is less than approximately 62% of grey squirrel carrying capacity, the grey squirrel replaces the red squirrel as a result of ecological competition only. In this simplified system, even a small decrease in suitability of the habitat for red squirrels leads to a situation where the grey squirrels outcompete the red squirrels and establish at higher population densities.
In figure 2b, we map the (K r , K g ) plane, showing which steady states of the two species are stable as both of their carrying capacities vary. This summarizes the outcome of red and grey squirrel interaction as a result of competition only, for a large range of local habitats defined by their suitability for both species. Such an analysis may help to explain different local outcomes of red and grey squirrel interaction over a long period of cohabitation even before the introduction of SQPV into the ecosystem. Regardless of when or how often the virus was introduced into the UK, it is relevant that the model shows that even without SQPV grey squirrels are likely to outcompete red squirrels in their natural habitat (and that changes in the natural habitat can have strengthened that). The virus will further strengthen that decline, but there are parameter regions (i.e. circumstances) where the virus is not required to explain the decline. To what extent such parameter regions reflect naturally occurring circumstances is not the aim of our exploration. We suggest, however, that the range of dynamic situations and outcomes is more complex when one takes a broader view of relevant interactions, including the interaction with a pathogen.
Another way of looking at figure 2b is to interpret a reduction in K g not as a decrease in habitat suitability but as a result of an increased death rate, μ g , for example because of local culling of grey squirrels. We see already from our simple model that the same system has a range of different outcomes depending on the background habitat suitability against which competition plays out. In recent years, the recognition of the importance of the local resources for red squirrel populations for their chances of survival has led to forest management scenarios aimed at favouring red squirrels, for example in Scotland and Wales [35,36]. In our bifurcation diagram, this would mean moving slowly to the right (higher values of K r ), allowing for a broad range where stable coexistence is possible in the absence of other factors. In the next section, we explore this in greater detail, after we see how the picture changes when some of these other factors are introduced.

Infected steady states
We now examine the situation where SQPV has been introduced into the ecosystem, but maintain the absence of a (differentiating and explicit) predator. As well as the three infection-free non-trivial steady states already discussed, we have three infected steady states. With red squirrels only present, if R r . 1 we have N r ¼ N # r and I r ¼ I # r with N g = I g = A g = 0. The steady state is unstable to invasion by grey squir- The steady state is unstable to invasion by red squirrels if K r . B # g . The threshold B # g . B g ; see table 2. With red and grey squirrels present and SQPV, the steady-state values N r = N r *, I r = I r *, N g = N g *, I g = I g * and A g = A g *, may be found numerically (for further details see electronic supplementary material, §S1.4). The thresholds for transition between steady states are summarized in table 2.
In figure 3, the regions in the (K r , K g ) plane where the different steady states are stable are shown. In figure 4, two It can be seen that in England, in the absence of the predator, it would have taken only a small reduction in the carrying capacity of red squirrels for the introduction of grey squirrels, together with SQPV, to be sufficient to drive the red squirrel population to extinction. For example, with K r = 0.8, K g = 1.0 and in the absence of SQPV, figure 2a shows coexistence of red and grey squirrels with N [ r ¼ 0:541 and N [ g ¼ 0:784. In the presence of SQPV, we have grey squirrels, but the red squirrel population is driven to extinction; see figure 3. Now consider if it would be possible to protect the red squirrel population by increasing the mortality of grey squirrels, perhaps by culling. The bifurcation diagram, figure 4a, shows that the population consists entirely of grey squirrels for the carrying capacity K g above the value where K r ¼ B # g , which is K g = 0.717. There is coexistence of red and grey squirrels below this value, and above K g = B r = 0.320, with SQPV present when R 0 . 1. The basic reproduction number R 0 ¼ 1 when K g = 0.538. Comparing the bifurcation diagram figure 4a with figure 4b, where K r = 0.95, we see that when the carrying capacity of red squirrels is at the higher value SQPV is present at all values of K g in the range. There is coexistence of the species when K g takes values below where K r ¼ B # g , which is at K g = 0.815, and above K g ¼ B # r ¼ 0:360. In Scotland, the squirrel population is mostly dominated by red squirrels, and there have been repeated invasions by SQPV [42]. There is the added factor of the pine marten, which predominantly predates on grey squirrels. We can interpret effects of different levels of additional background mortality due to the predator by looking at figures 3 and 4 and decreasing the value of K g to traverse to regimes with different qualitative dynamics. Alternatively, we can model the ecosystem including full predator dynamics (see electronic supplementary material). The results of a combined lower carrying capacity for grey squirrels because of predation pressure (one trophic level up), with a higher carrying capacity for red squirrels because of forest improvement (one trophic level down), can lead to systems where red and grey squirrels coexist, both in the presence and absence of SQPV. We do not argue that coexistence is necessarily likely as the outcome under naturally occurring conditions. We show that there are circumstances (regions of parameter space) in which coexistence is possible, even with the virus and the predator present. Changing circumstances, for example in habitat suitability on a slower time scale or faster changes in predation pressure, can cause the system to move between steady states or render some potential states unreachable. Figures 3  and 4 show that even small changes can lead to profound qualitative changes in outcome.
It is possible that the predator has effects on grey and red squirrels that add to the direct effect of increased mortality. In the presence of an active predator, the squirrel species may experience stress in a landscape of fear to different degrees that may influence their competitive ability [17,[43][44][45][46].  Figure 3. Competition between red and grey squirrels in the presence of SQPV. The figure shows the regions in the (K r , K g ) plane where each steady state is stable. The colour key is red: red squirrels only; magenta: red squirrels and SQPV; blue: grey squirrels only; cyan: grey squirrels and SQPV; green: red and grey squirrels; yellow: red and grey squirrels and SQPV. The boundaries between the regions shown as black lines were calculated independently from K g = B r ,

On reservoirs and dilution
We now address two further issues with regard to the ecoepidemiology of SQPV: 'Is the grey squirrel a reservoir of infection for SQPV?'; and 'Is there a dilution effect in this system?'

Is the grey squirrel a reservoir of infection for SQPV?
The question should be rephrased: 'Under what circumstances are grey squirrels a reservoir for the infection of red squirrels with SQPV?'. If R 0 . 1 then red and grey squirrels form a maintenance community for SQPV. We have used R 0 to denote the basic reproduction number of SQPV in a community of red and grey squirrels, V ¼ fr, gg, and in the notation of [9] R 0 is the spectral radius of the NGM: Then, from the static viewpoint, red squirrels alone form a minimal maintenance community if R frg ¼ b r N [ r T r . 1, and grey squirrels form a minimal maintenance community if R fgg ¼ b g N [ g T g . 1. If R 0 . 1 and R fgg . 1 but R frg , 1 then grey squirrels are a reservoir of infection for red squirrels in the static sense. What is not taken into account in the analysis from the static viewpoint is that removing a species from the ecosystem changes the population dynamics of the other species. Now consider the dynamic viewpoint. With our simple two-species ecosystem, {r, g}, removing red squirrels would increase the population density of grey squirrels from N [ g to K g , and removing grey squirrels would increase the population density of red squirrels from N [ r to K r . The grey squirrel population can be regarded as a minimal maintenance community for SQPV if R 0 ðfggÞ ¼ R g . 1, and similarly the red squirrel population can be regarded as a minimal maintenance community for SQPV if R 0 ðfrgÞ ¼ R r . 1. If R g . 1 and R 0 . 1 but R r , 1, then the grey squirrel is a reservoir of infection for SQPV in red squirrels in the dynamic sense.
These concepts are illustrated in figure 5, where the reproduction numbers are presented as functions of the carrying capacity of red squirrels, K r , over the same range as that in figure 2a, and with K g = 1. In figure 5a, it can be seen that red and grey squirrels form a maintenance community for SQPV, and grey squirrels form a minimal maintenance community for all values of K r in the range. Red squirrels form a minimal maintenance community only for K r > 0.951 in the static sense, or for K r > 0.900 in the dynamic sense. If K r < 0.900 then the density of the red squirrel population would be insufficient to support transmission of SQPV without the presence of the grey squirrel population. Hence the grey squirrel population is a reservoir of infection for the red squirrel population. If K r > 0.951 then the red squirrel population density would be sufficient to support transmission of SQPV even if the grey squirrels were not present. Hence the grey squirrels should not be regarded as a reservoir of infection for the red squirrels. If 0.099 < K r < 0.951, then the red squirrel population density would be insufficient to support transmission of SQPV if the grey squirrels were not present. However, removing the grey squirrels (somehow) would allow the red squirrel population to increase to a density that would support transmission. Hence in this region, the grey squirrel population is a reservoir of infection for the red squirrels in a static sense, but not in a dynamic sense.
In figure 5b, similar results are presented, but the values of all four infection rates (β values) are half of their values in table 1. The community of red and grey squirrels V ¼ fr, gg is a maintenance community for SQPV when R 0 . 1, which is now where K r < 0.815. The red squirrel population does not form a maintenance community in either sense for any value of K r in the range presented, and the grey squirrel population forms a minimal maintenance community in the static sense for K r < 0.759, and in the dynamic sense throughout the range of K r . Hence the grey squirrel population may be regarded as a reservoir of infection for red squirrels in the static and dynamic sense for K r < 0.815.

Is there a dilution effect in this system?
The results presented in figure 4 and described in the previous sections show that under most circumstances an increase in density of the grey squirrel population would   royalsocietypublishing.org/journal/rsif J. R. Soc. Interface 18: 20210551 lead to increased transmission of SQPV. If this translates as an increase in biodiversity leading to increased transmission we have the opposite of a dilution effect, an amplification effect. To formalize this, we find expressions for the elasticity of the steady-state prevalence of SQPV infection in red squirrels with respect to the population density of grey squirrels, DY Ã r , where Y Ã r ¼ I Ã r =N Ã r ; the elasticity of the abundance of infected red squirrels, DI Ã r ; and the elasticity of the basic reproduction number, DR 0 . Following [8], we calculate The elasticity of the prevalence of infection in red squirrels is defined by its rate of change with respect to the grey squirrel population density, multiplied by N Ã g =Y Ã r to make the quantity dimensionless. The calculation is facilitated by treating the carrying capacity K g as the independent variable. The elasticity of the abundance of infected red squirrels is found by adding the elasticity of the red squirrel population density to the elasticity of the prevalence.
To calculate the elasticity of the basic reproduction number, Hence we need to find the elasticity of R 0 with respect to the infection-free steady-state density of grey squirrels. We define For full details of the calculations see electronic supplementary material, §S2.
In figure 6a, we present the stable steady-state values of N r , N g , I r and I g , for 0.5 ≤ K r ≤ 1.0 and K g = 0.6. The elasticities DY Ã r , DI Ã r and DR 0 are presented for the same values of K r and K g in figure 6b (DY Ã r and DI Ã r where I Ã r . 0). It can be seen that for all values of K r the prevalence of infection in red squirrels increases with the grey squirrel population density, DY Ã r . 0, which represents an amplification effect. As increasing the abundance of grey squirrels decreases the abundance of red squirrels, it is not surprising that at least for some values of K r we have DI Ã r , 0, corresponding to a dilution effect. Figure 6b also shows that for all values of K r in the range, DR 0 . 0, corresponding to an amplification effect. Now consider the role played by the predator. We have assumed that predator population densities are maintained at equilibrium with N p ¼ N Ã p (for a full dynamic analysis see electronic supplementary material), and defined the grey squirrel carrying capacity by K gp ¼ ðn g À m g À c gp N Ã p Þ=f g . To define the elasticities of the prevalence and abundance of SQPV infection in red squirrels and of R 0 with regard to predator population density, we need to multiply the elasticities defined above by and hence reversing the sign of the expression. Hence a positive elasticity with regard to grey squirrel population density (amplification) corresponds to a negative elasticity with regard to predator population density (dilution).

Discussion
We have presented and analysed a model for the interaction of two herbivore species competing for resources, in the presence of a pathogen infecting both of them, and in response to changes in the trophic levels below (resource) and above (predator). We showed, in an example system, that the specifics of the ecological interactions at the trophic level of the host species and between the directly related trophic levels strongly influence the epidemiological dynamics. This influence is most pronounced if there are differential effects in various processes (particularly: competition affecting one species more than the other, differences in utilization of the resources by the two host species, one host species being more affected by the pathogen than the other, differences in the predation pressure experienced by the two host species). Disentangling the concepts of ecological and epidemiological stability of the model system is relevant for insight into ecosystem behaviour, relating to the possibilities of being invaded by another species or a pathogen, respectively. We focussed on royalsocietypublishing.org/journal/rsif J. R. Soc. Interface 18: 20210551 invasion success (R 0 ), on the capacity of a host species to act as a maintenance host or a reservoir of infection towards a target host, and on the question whether or not (and in what sense) a dilution effect may operate in the system. All these aspects depend on the ecological context in which the host species and pathogen occur in their natural setting (see also the perspective by [3]). In earlier work, we have shown this in a non-specific general setting of n interacting species, some of which are hosts to a particular pathogen [7][8][9].
Our analysis implies that when studying the infection dynamics of a given pathogen in a natural system, it is necessary to include ecological interactions between a range of species that is broader than the community of host species of that pathogen, and to take an ecosystem view including other species with which the host species interact on different trophic levels. Natural events, changing environmental processes, human influence through conservation and nature management decisions, harvesting, and destruction or changes to habitat can affect different (groups of) species in an ecosystem in different ways. Ecological and epidemiological interactions between species can have an indirect, unintended and even counter-productive impact on host species.
We explored these interactions in a specific natural system that has received substantial attention in the literature because of the important conservation-related issues involved. It was not our intention to improve on existing modelling work for this system, or to provide quantitative analyses or predictions to help conservation efforts and decisions in this complex area. We focused primarily on steady states of the dynamical system. Our aim was to show in a real-life system how ecological and epidemiological processes and mechanisms influence each other, and how they collectively determine which of the many steady states can be attained and under which conditions. We also showed how changes in the underlying processes and the strengths of various interactions determine changes in the steady state in which the system can be expected to settle. Other factors that were not considered but may impact on the ecological and epidemiological processes of our system are, for example, the so-called landscape of fear [43,44] (the observation of newly emerging predation pressure-induced stress in prey species leading to changing behaviour) and sub-clinical effects on host species that may influence their ecological interactions (for example through subtle changes in consumer-resource interaction, both as consumer and as resource). These factors could be regarded as implicitly present in the model, through changes in the squirrel carrying capacity.
Despite the fact that we in no way aimed to present a detailed model of the squirrel system, there are a number of potentially relevant observations to be made from our qualitative analysis. If grey squirrels are the superior species in competition with red squirrels, then in the absence of a differentiating predator that favours grey squirrels and in the absence of SQPV, grey squirrels are likely to eventually outcompete red squirrels for a large range of parameter values describing their interaction. A gradual change of resource quality (tree type dictating the type of seeds and nuts available) favouring grey squirrels over red squirrels will allow them to exploit this range. We chose not to model the dynamics of the food quality explicitly. For our analysis that seems a reasonable choice because the time scale for forest change (structure, yield and composition) is slow compared to the squirrel life span. Hence we assumed there to be no substantial or essential feedback from squirrels to forest composition. Grey squirrels have been observed to damage a variety of tree species including oak through 'bark stripping' [31], and this could be included as a feedback mechanism in future studies. The introduction into this system of a differentiating virus that kills red squirrels but does not negatively affect grey squirrels, decreases the possibility for coexistence even further and makes the outcome of a grey squirrel-only steady state virtually inevitable.
One way to prevent the outcome of a stable grey squirrelonly steady state is to maintain an additional pressure on grey squirrels, for example, in the form of an increased death rate. This can be achieved by culling, or by introducing a predator that favours grey squirrels over red squirrels. The pine marten may play this latter role in Scotland and its influence on the grey squirrels increases the region of parameter space where grey and red squirrels can coexist, and can even lead to a red squirrel-only steady state when predation pressure is sufficiently high. A change in habitat and food quality specifically aimed at favouring red squirrels (in contrast to what we discussed above where these changes were made independent of squirrel-related considerations) may further increase the region where the red squirrel population can be maintained in a stable way.
It is important to determine how a shift in forest structure and composition can be used to strengthen the competitive ability of red squirrels in areas where the species is still abundant, where grey squirrels are just being introduced, the virus has not yet successfully invaded and pine martens as predators are on the rise. Forest management may be able to push the system to a region where red squirrels can survive in this broader eco-epidemiological context [10,32,36]. To assess such scenarios in a qualitative analysis, we can no longer assume that food quality is constant on the squirrel time scale or that squirrels have no influence on it. For forest improvement favouring red squirrels, there is direct feedback from squirrel abundance to human-induced habitat change. What should be clear from our analysis is that one should not neglect the other aspects of the system (i.e. differentiating predation from the carnivore trophic level, incursions of SQPV and uneven competition between the squirrel species) as the outlook for red squirrel-induced forest improvement may differ depending on these aspects.
We have also shown that in general, the ecosystem context determines whether a (group of ) host species can be considered a reservoir of infection for a given pathogen towards a specific target host species [9]. The same (group of ) host species may be a reservoir in one ecosystem context but not in another. We illustrated this issue in the case of grey squirrels using our simple model. It depends on the circumstances whether the grey squirrel can act as a reservoir of infection with SQPV for the red squirrel, whether the red squirrel could maintain the pathogen in isolation, or whether both species are needed as a maintenance community.
In earlier work [8], we showed that it matters how we quantify dilution/amplification to investigate whether or not a system shows a dilution/amplification effect with respect to a given pathogen and changes in system biodiversity. Our analysis of the squirrel system highlights an additional issue, i.e. it matters how we measure biodiversity. There is a rich literature on quantifying biodiversity, detailing what to measure and how to translate this information into meaningful indices [47,48]. Concepts such as species richness, species density/ royalsocietypublishing.org/journal/rsif J. R. Soc. Interface 18: 20210551 abundance and evenness are relevant. Our toy example, with a limited view of a real system, shows that the choice of abundance or richness influences the conclusions. This suggests a need to study the interaction between pathogens and biodiversity using a variety of measures for biodiversity and in larger food web/ecosystem-contexts.
In conclusion, we have used a qualitative mathematical model to demonstrate how ecology and epidemiology interact in determining the dynamics of infectious diseases. Although we have presented our arguments in terms of the population dynamics of red and grey squirrels, infection with SQPV and the influence of a predator, our results are not specific to this system. Our aim has always been to derive criteria that can be applied to eco-epidemiological dynamics in a wide variety of situations. Understanding the epidemiology of infections of wild animals is of increased importance, especially where the pathogen has zoonotic potential.
Data accessibility. This article has no additional data.