## Abstract

The evolution of multidrug resistance (MDR) is a pressing public health concern. Yet many aspects, such as the role played by population structure, remain poorly understood. Here we argue that studying MDR evolution by focusing upon the dynamical equations for linkage disequilibrium (LD) can greatly simplify the calculations, generate more insight, and provide a unified framework for understanding the role of population structure. We demonstrate how a general epidemiological model of MDR evolution can be recast in terms of the LD equations. These equations reveal how the different forces generating and propagating LD operate in a dynamical setting at both the metapopulation and population level. We then apply these insights to show how the LD perspective: (i) provides a simple interpretative framework for transient evolutionary dynamics, (ii) explains equilibrium patterns of MDR, and (iii) can be used to assess the MDR consequences of different drug prescription strategies.

## Introduction

Antibiotic resistance is one of the biggest current public health problems, with antibiotic resistant infections responsible for tens of thousands of deaths annually [1]. Of particular concern is the evolution of *multidrug resistant* (MDR) pathogens, that is, pathogens resistant to multiple classes of antibiotics. Despite its importance, understanding the evolution of MDR remains an ongoing challenge, as it is typically not captured by our understanding of the evolution of single drug resistance [for which there is a large body of theory; e.g., 2–6]. For instance, suppose we have two drugs, *A* and *B*, and that a fraction *p*_{AB} of infections caused by the pathogen of interest are resistant to both drugs. To understand MDR evolution, we need to understand what determines the frequency *p*_{AB}. If *p*_{A} and *p*_{B} are the frequency of infections resistant to drug *A* and *B*, and *D* denotes any non-random association between resistance to drugs *A* and *B*, then
If *D =* 0, then the evolution of resistance to each drug is independent, and so multiple drugs will not qualitatively alter the evolutionary dynamics of single drug resistance. However, whenever *D* ≠ 0, understanding the fitness costs and benefits of resistance to each drug in isolation is insufficient to understand the evolution of MDR, because doing so will not tell us what factors govern the propagation of *D*. Thus the challenge of understanding MDR evolution can be recast as understanding the dynamics of *D*. As it turns out, the quantity *D* is referred to as *linkage disequilibrium* (LD), and it has been extensively studied in population genetics [e.g., 7–12], particularly as it relates to population structure [13–16]. However, there has been little attempt to apply these insights to MDR evolution; often the dynamics of doubly-resistant infections are neglected to simplify the analysis of the dynamics of single drug resistance [e.g., 3, 5, 17].

Here we consider a simple epidemiological model of a primarily asymptomatically carried pathogen (e.g., *Staphylococcus* spp. or *Enterococcus* spp.) in a structured host population. We show how this model relates to general dynamical equations for LD [18], in turn revealing the role of population structure in MDR evolution. We then use these equations to show how analyzing problems from the LD perspective: (i) provides a straightforward framework for understanding transient evolutionary dynamics, which we use to explain patterns of MDR in *Streptococcus pneumoniae*; (ii) reveals the evolutionary logic underlying patterns of MDR at equilibrium, which we use to reexamine a recent paper on MDR evolution [19]; and (iii) provides insight on the consequences different drug prescription strategies have on MDR, which we apply to a hospital-community setting.

## Model

In what follows we will introduce and analyze a model of MDR evolution. We will highlight the most important aspects here while providing more extensive details in the Supplementary Material.

Consider an asymptomatically carried pathogen in a metapopulation consisting of *N* host populations. Focus upon population *X*. Let *S*^{X} and the density of susceptible hosts and *i j* -infections, respectively, at time *t*, where *i* indicates if the infection is resistant (*i = A*) or not (*i = a*) to drug *A* and *j* indicates if the infection is resistant (*j = B*) or not (*j = b*) to drug *B*. Susceptible hosts contract *i j* -infections at a per-capita rate , where is a rate constant, while *i j* -infections are naturally cleared at a per-capita rate . Hosts are treated with drugs *A, B*, or both in combination, at per-capita rates , and , respectively. Hosts move from population *X* to *X*^{′}at a per-capita rate *m*^{X →X}*′*. Transmission between infected hosts leads to superinfection with probability *σ*, in which either strain is equally likely to be the victor. Finally, individual infections acquire allele *f* through either mutation or recombination (during super-infection) at per-capita rates and , respectively (note that depends upon infection densities).

From these epidemiological assumptions the change in *i j* -infections in population *X* can be written as the sum of four processes
where **1**_{𝓁} is equal to 1 if the *i j* -infection has allele(s) *f* and 0 otherwise and and denote the net change in *i j* -infections due to mutation and recombination (Fig. 1). To faciliate comparison with previous results, we have broken the per-capita growth term into four components: the ‘baseline’ per-capita growth rate, *r* ^{X}, the (additive) selection coefficients for resistance to drugs *A* and *B*, and , and any epistatic interactions, . These latter terms have the standard interpretation. If (resp. ), then resistance to drug *A* (resp. *B*) is selected for. If , there is positive epistasis, and the per-capita growth rate of doubly-resistant infections is greater than would be expected by consideration of the per-capita growth rate of singly-resistant infections. Thus although equation (2) is derived from a specific model, the partitioning is very general and applies to many epidemiological scenarios.

While system (2) contains all of the information necessary to analyze MDR evolution, as currently written it is particularly opaque for providing insight. Therefore we would like to transform it to a form which brings to the forefront the different factors that promote or impede MDR evolution; the way to do this is by focusing upon the dynamical equations for linkage disequilibrium (LD). However, the inclusion of multiple populations means that doing so is not as simple as equation (1) would suggest since there are different scales at which LD and MDR can be measured. As the scale which is of most interest will depend upon the specifics of the problem, in what follows we will consider MDR evolution at both the population- and metapopulation-level.

## Population-level multidrug resistance

To understand MDR evolution in a given population, say *X*, we need to understand the dynamics of the frequency of infections resistant to drug *A* and *B*, and , and the dynamics of population LD, *D*^{X}. First, consider the dynamics of (mutatis mutandis ). Using equation 2, it is straightforward to compute
where *I* ^{X} is the total density of infections in population *X*. A related formulation to equation can be found in [18] [see also 11].

Equation (3) is partitioned into recognizable quantities. First, if resistance to drug *A* is selectively advantageous, , then drug *A* resistance will increase due to direct selection whose strength is dictated by the genetic variance at the locus, [18]. Second, if doubly-resistant infections are overrepresented in the population, *D*^{X} > 0, and resistance to drug *B* is selected for, , then drug *A* resistance will increase due to indirect selection upon resistance to drug *B*. Third, if epistasis is positive, , and there is genetic variance at the locus, drug *A* resistance will increase due to the disproportionate growth of doubly-resistant infections. Fourth, mutation and recombination will increase drug *A* resistance when there is a mutation or recombination bias towards gain of drug *A* resistance, or , and the frequency of infections sensitive to drug *A* exceeds the frequency of infections resistant to drug *A*, 1 − . Finally, migration acts to reduce differences between populations.

It follows that drug *B* treatment alters the predicted dynamics of resistance to drug *A* via two main effects: (i) the influence of epistasis and (ii) indirect selection on resistance to drug *B* mediated through the presence of LD (*D*^{X} ≠ 0). Thus consider the dynamics of *D*^{X},
where is the average selection for resistance, and *µ*^{X} and *ρ*^{X} are the total per-capita rates of mutation and recombination, respectively (e.g., ).

Equation (4) is partitioned into four key processes. First, excess selection for resistance to drug *A* (resp. *B*), , can cause pre-existing LD (*D*^{X} ≠ 0) to increase or decrease. For example, if and *D*^{X} > 0 then LD will increase. This is because drug *A* resistant infections are fitter than the average resistant infection and so will increase in frequency. Since *D*^{X}> 0, it is more likely this increase will occur in doubly-resistant infections, thereby increasing *D*^{X}. Second, mutation and recombination removes any LD present at a rate proportional to the LD [11, 12]. Third, epistasis generates same-sign LD, that is, positive epistasis, ,leads to MDR overrepresentation, *D*^{X} > 0 [7, 8, 20, 21]. Positive epistasis could occur if double-resistance costs are less than expected [–24] or drugs are prescribed in combination [18, 25].

Migration is the final term of equation (4) and reveals how the metapopulation structure affects population LD. Like epistasis, migration does not require pre-existing LD to operate on LD [9, 13–15, 26]. In particular, LD in population *X* will be generated whenever the frequencies of resistance to drugs *A* and *B* differ between population *X* and any other connected population, say *X*^{′}. If both types of resistance are more common in one population than the other, , then migration will generate positive LD in both populations, *D*^{X} > 0 and *D*^{X}*′*> 0. If instead drug *A* resistance is more prevalent in one population, while drug *B* resistance is more prevalent in the other, migration will generate negative LD in both populations.

Notice the presence of the multiplier *I* ^{k} /*I* ^{X} in the final term of equation (4). If the populations have roughly the same density of infections, then this term is unimportant. However, when one population, say *X*^{′}, has much fewer total infections than population *X, I* ^{X}*′« I* ^{X}, the term *I* ^{X} /*I* ^{X}*′*will be very large whereas *I* ^{X}*′*/*I* ^{X} will be very small. Consequently, the ability of migration to propagate LD will be greater in population *X* than *X*, and so all else being equal we would predict the population with a lower density of infections will have a greater magnitude of LD than the population with a higher density of infections.

The next insight shows the importance of also taking into account equation (3). In particular, if we only inspected the migration term of equation (4) we might conclude that as the per-capita migration rate, *m*^{k→X}, increases, so too will the ability of migration to propagate LD. However, the magnitude of population LD is actually maximized at intermediate migration rates (Fig. 2). The reason is because the quantity *m*^{k→X} has two effects. On the one hand, it directly multiplies the migration term in equation (4) thereby magnifying migration’s potential role in LD build-up, while on the other hand, it also balances infection frequencies between populations (equation (3)), which in turn will reduce the magnitude of in equation (4). These conflicting forces mean the magnitude of population LD tends to be maximized when migration is neither too infrequent nor too frequent (Fig. 2).

## Metapopulation-level multidrug resistance

Now what happens to LD and MDR evolution at the metapopulation-level? Metapopulation LD, or total LD, can be defined in terms of the population variables as
that is, *D*_{tot} is the sum of the average population LD, *D*, and the spatial covariance between resistance to drugs *A* and *B*. As our goal is to understand how population structure shapes the dynamics of *p*_{A}, *p*_{B}, and *D*_{tot}, for clarity we will split the terms in the dynamical equations into two groups. In the first group are those terms (or processes) which are always operating, irrespective of population structure, and so can be expressed in terms of the metapopulation-level variables *p*_{𝓁} and *D*_{tot}. The second group consists of those processes which only operate if the populations differ (i.e., there is spatial heterogeneity). It is the latter group which is crucial to understanding how population structure shapes population MDR, and so will be our focus here.

With this in mind, the change in frequency of infections resistant to drug *A* (mutatis mutan-dis drug *B*) can be written
where *s*_{𝓁}, *r, µ*_{𝓁}, *ρ*_{𝓁} are the average of their respective population quantities. The first four terms in equation (6) are the metapopulation-level analogues of the first four terms in equation (3); since they share the same interpretation, we do not discuss them further here. The last two terms, however, arise due to spatial heterogeneity in ‘baseline’ growth and selection and so are the consequence of population structure.

First, spatial heterogeneity arises through differences in the ‘baseline’ per-capita growth (i.e., *r* ^{X} ≠ *r* ^{X}*′*) coupled with differences in the frequencies of drug *A* resistant infections (e.g., ). In particular, more productive (larger *r* ^{X}) populations will have a disproportionate effect on the change in drug *A* resistance. For example, if more productive populations also have a greater frequency of drug *A* resistance, then heterogeneity increases the population frequency of drug *A* resistance. Heterogeneity in baseline growth could arise through a variety of mechanisms, such as availability of susceptible hosts, treatment rates differences, or pathogen traits (e.g., transmissibility and duration of carriage).

Second, spatial heterogeneity arises through differences in indirect selection for resistance to drug *B* (i.e., ) coupled with differences in the probability that drug *B* resistant infections are also doubly-resistant (i.e., ). In particular, populations experiencing greater selection for resistance to one drug will have a disproportionate effect on the change in frequency of infections resistant to the other drug, whenever populations differ in frequency of doubly-resistant infections. As an example, if populations experiencing stronger selection for drug *B* resistance also have a greater probability of drug *B*-resistant infections being doubly-resistant, heterogeneity in indirect selection increases the frequency of drug *A* resistance in the metapopulation.

Next, the dynamics of metapopulation, or total, LD can be written as
where coskew(*r, p*_{A}, *p*_{B}) is the coskewness between *r, p*_{A}, and *p*_{B} and we have assumed population differences in mutation and recombination are negligible (see Sup. Mat. 1.2). The first three terms in equation (7) are the metapopulation level analogues of the first three terms of equation (4) and so share the same interpretation. The last two terms, however, arise due to spatial heterogeneity in ‘baseline’ growth and selection.

First, spatial heterogeneity arises through differences in the ‘baseline’ per-capita growth in doubly-resistant infections (*r* ^{X} ≠ *r* ^{X}*′*) coupled with heterogeneities in LD (*D*^{X} ≠ *D*^{X}*′*) or resistance frequencies (the coskewness term). The logic of the first term is clear: when population LD differs, more productive populations will disproprotionately contribute to total LD. For the second term, more productive populations with higher frequencies of resistance will tend to produce more doubly-resistant infections; although this need not directly effect population LD, it will disproportionately contribute to total LD.

Second, spatial heterogeneity arises through differences in selection for resistance coupled with differences in the proportion of drug 𝓁 resistant infections that are doubly-resistant . The logic here is that populations experiencing stronger selection for resistance are more likely to see an increase in resistant infections. If this increase occurs disproportionately in doubly-resistant infections, then from equation (1) total LD will increase, whereas if this increase occurs disproportionately in singly-resistant infections, total LD will decrease. The magnitude of this effect is scaled by *p*_{𝓁}(1*−p*_{𝓁}) since selection cannot operate without genetic variation. As before, in the absence of population LD, then provided populations experiencing stronger selection for resistance to one drug also have a greater frequency of infections resistant to the other drug, total LD will increase. This could occur if, for example, some populations experience greater treatment rates.

As a final note, observe that in constrast to equation (4), in equation (7) the per-capita migration rates *m*^{k→X} are nowhere to be found. The reason for this is intuitive: as migration does not affect the total density of infecteds, nor the resistance status of an infection, it will not change the quantities *p*_{AB}, *p*_{A}, or *p*_{B}, and so cannot change total LD. As a consequence, migration only affects total LD indirectly by reducing differences in infection frequency between populations, thereby dampening the magnitude (and hence effect) of cov(*r, p*_{𝓁}), coskew(*r, p*_{A}, *p*_{B}), and cov(*s*_{𝓁}, *p*_{AB} /*p*_{𝓁}) in equation (7). It follows that, all else being equal, *D*_{tot} is a decreasing function of the per-capita migration rate, and so is maximized when migration is infrequent (Fig. 2).

## Modeling the dynamics of LD: why bother?

To this point we have focused upon developing the LD perspective to provide a conceptual understanding of MDR evolution in structured populations. However, framing the LD perspective in terms of general quantities has meant this conceptual understanding is somewhat abstract. What we now wish to demonstrate, through the consideration of three scenarios, is how the LD perspective can be used to tackle practical problems. In the first scenario, we show how the LD perspective allows for a straightforward understanding of transient dynamics, and apply this insight to explain patterns of MDR observed in *Streptococcus pneumoniae*. In the second scenario, we show how the LD perspective helps us generalize a recent paper on equilibrium patterns of MDR. In the third scenario we show how the LD perspective generates practical insight into designing drug prescription strategies across populations, with a focus upon a hospital-community setting.

### LD perspective explains transient patterns of MDR

In many circumstances we are interested in the transient dynamics of MDR, whether it be to either understand selective sweeps [27, 28], or processes which unfold over sufficiently long time so as to appear in equilibrium [29], or anything in between. However, transient dynamics are more complex than equilibrium processes, and so pose a challenge. In certain circumstances, approximations can simplify the analysis. For example, if selection is sufficiently weak and recombination frequent, then the LD dynamics occur rapidly relative to changes in allele frequencies, and so a quasi-linkage equilibrium approximation can be used [27, 30, 31]. Yet what about situations in which there are no readily available approximations? In these cases, to understand what is (transiently) occurring requires consideration of the dynamical equations (4) and (7). Here we show how transient dynamics coupled with epistasis can explain the patterns of MDR observed in *Streptococcus pneumoniae* [32].

Understanding the patterns of MDR observed in *S. pneumoniae* was first tackled in an important recent paper by [19], using a metapopulation model in which each population represents a different serotype maintained by serotype-specific host immunity [19, –35]. In the analysis of [19], they focused upon a metapopulation at equilibrium, and compared their predictions for total (metapopulation) LD and MDR to that of the Maela data set of [32]. However, at equilibrium, the model of [19] predicts each serotype will be in linkage equilibrium, *D*^{X} *=* 0, whereas examination of the Maela data reveals that although variation between serotypes accounts for some of the total LD, there also exists significant, unexplained serotype LD (Fig. 3). Can transient dynamics explain this presence of serotype LD?

To explore this possibility, we first need to establish a scenario in which the transient dynamics unfold. In particular, consider a metapopulation initially treated with drug *A* at sufficiently high rates such that resistance is selected for. At some point (*t =* 500 in Fig. 4), drug *B* is ‘discovered’ and is prescribed to patients, while owing to its reduced efficacy, prescription of drug *A* declines. The increase in drug *B* prescription means that for many serotypes, resistance to drug *B* is now favoured, , and so we should expect drug *B* resistance to rise in frequency in the metapopulation. However, the reduction in drug *A* prescription means that for some serotypes, drug *A* resistance will no longer be favoured, . Because drug *A* resistance has reached fixation for many serotypes, drug *B* resistance is often more likely to occur in an infection with a genetic background resistant to drug *A*. This will cause both doubly-resistant infections (which benefit from resistance to drug *B*) and sensitive infections (which have lost resistance to drug *A* but have yet to gain resistance to drug *B*) to rise to high frequencies. As more time elapses, in the serotypes for which drug *A* sensitivity and drug *B* resistance is favoured, doubly-resistant and sensitive infections will be replaced by infections singly-resistant to drug *B*. Depending upon the mutation/recombination rates, this process can take enormous amounts of time, generating long periods of apparent stasis in which the population appears to be in equilibrium (see the first row of Fig. 4).

Although this process will generate significant transient total LD due to the covariance in resistance frequency across serotypes, in equation (4) there is nothing generating serotype LD since migration (i.e., antigenic recombination) is infrequent. This leaves epistasis as the remaining (deterministic) force capable of generating serotype LD. Indeed, the addition of epistasis can generate significant, transient LD within serotypes as the transient selective sweeps are ongoing (Fig. 4). Thus transient dynamics coupled with epistasis can explain the significant within-serotype LD observed in *Streptococcus pneumoniae*. Critically, in all cases in Figure 4, the LD at both the metapopulation and serotype level is transient, and the final state is linkage equilibrium. How population structure maintains LD at equilibrium is the focus of the next example.

### LD perspective explains equilibrium patterns of MDR

The paper by [19] focused upon MDR evolution in a metapopulation consisting of independent host populations (so migration is restricted, *m*^{X →X}*′≈* 0). They found that at equilibrium, population differences could lead to MDR overrepresentation (*D*_{tot} > 0), and that populations with a longer duration of pathogen carriage were more likely to exhibit MDR, a result they attributed to an increased likelihood of antibiotic exposure. Here we show how employing the LD perspective: (i) reveals the evolutionary logic behind what populations differences maintain LD at equilibrium, and (ii) using these insights allows us to generalize the results to a broader range of scenarios, beyond variation in duration of carriage. For simplicity, we will assume there is no epistasis.

There are two required conditions to maintain total LD at equilibrium. First, some mechanism needs to maintain resistance diversity (variation in and ) in the metapopulation. There are variety of ways in which this could occur [19, 35–38], but [19, 35] assume it is due to population differences in the conditions favouring resistance evolution. Since there is no mechanism maintaining within-population diversity, this implies that at equilibrium *D*^{X} *=* 0, and so from equation (5) it follows that *D*_{tot} = cov(*p*_{A}, *p*_{B}). Thus the second condition required for total LD is that *p*_{A} and *p*_{B} covary. Specifically, whenever and (or their dynamical equations, (3)), are uncorrelated, the metapopulation will be in linkage equilibrium. From equation (3) we see that if the additive selection coefficients, and , are uncorrelated, then so too are the dynamics of and , and so cov(*p*_{A}, *p*_{B})= 0. Hence only when population differences generate correlations between the selection coefficients will they generate LD.

Using this insight, why are populations with a longer duration of carriage associated with MDR? And should we expect associations between MDR and any other population attributes? Our primary focus is whether (and how) the selection coefficients are correlated. It is straight-forward to compute (see Sup. Mat. 1.4.2),
where we have used slightly different notation from [19]. Now, consider a scenario in which both the treatment rates and the parameters controlling the (additive) costs of resistance (e.g., and ) are uncorrelated (this is one of the scenarios presented in Figure 4 of [19]). From equation (8), the only remaining source of correlation is susceptible density, *S*^{X}, which plays a role whenever there are explicit transmission costs, . At equilibrium, *S*^{X} is determined by pathogen traits such as transmission and duration of carriage, such that ‘fitter’ populations (i.e., those in which pathogens are more transmissible or have longer duration of carriage) will more substantially deplete susceptibles. By reducing *S*^{X}, ‘fitter’ populations lower the transmission costs for resistance to either drug, and so double-resistance is more likely to be selectively advantageous, even when treatment rates are uncorrelated. In turn, this over-representation of doubly-resistant infections will generate total LD.

Thus although variation in duration of carriage can lead to MDR evolution and LD through its effect upon susceptible density (Fig. 5a), it is neither necessary (the same pattern can be produced by variation in transmissibility; Fig. 5b) nor sufficient (variation in duration of carriage has no effect without explicit transmission costs, Fig. 5c). More broadly, if there are more than two drugs, then provided that there are explicit transmission costs for resistance to each drug, susceptible density will generate a correlation between all the selection coefficients, which in turn will yield the pattern of ‘nestedness’ observed by [19]. What is critical for this effect to be prominent, however, is that there is clear differentiation in population susceptible density, and that the parameters controlling cost of resistance (i.e., ), are large enough so as to ensure a strong correlation amongst selection coefficients.

### LD perspective helps identify drug prescription strategies limiting the evolution of MDR

Owing to its practical relevance for public health, often we are interested in the consequences different antibiotic deployment strategies across/between populations can have. The populations of interest could correspond to physically distinct groups such as a hospital and its broader community, or different geographical regions (e.g., countries). From a public health perspective, when considering different antibiotic deployment strategies, a variety of factors must be considered, but in general the goal is to successfully treat as many people as possible, thereby reducing the total burden [3, 39]. In this circumstance, the LD in the meta-population and/or populations can provide important information about the likelihood of treatment success. In particular, for a given population frequency of drug *A* and drug *B* resistance, negative LD (MDR underrepresentation) increases the likelihood that if treatment with one drug fails (due to resistance), treatment with the other drug will succeed. On the other hand, positive LD (MDR overrepresentation) increases the likelihood of treatment failure, since a greater proportion of resistant infections are doubly-resistant and so cannot be successfully treated with either drug.

Equations (4) and (7) show that to generate negative LD, drugs should be deployed in a population specific fashion, that is, drug *A* should be restricted to some populations and drug *B* restricted to the remaining populations [see also 18, 19]. Doing so will create a negative covariance in selection, such that resistance to drug *A* (resp. drug *B*) will be favoured in some populations and disfavoured in the others. This negative covariance in selection will give rise to negative LD and MDR underrepresentation. This outcome can occur even when drugs have to be prescribed at a higher rate in some populations (e.g., some populations are higher risk groups). If instead drugs are deployed indiscriminately across populations, and in addition, some populations require more frequent antibiotic prescription, this will yield a positive covariance of selection and so generate positive LD and MDR (Fig. 2).

As an application of this principle, suppose there are two populations corresponding to a ‘hospital’ and a ‘community’. In this scenario, the three most commonly debated antibiotic deployment strategies are: cycling, in which drugs are temporally rotated in the hospital; mixing, in which hospital patients are randomly assigned different antibiotics; and combination therapy in which drugs are prescribed to patients in combination [e.g., 3–5, 17, 39–41]. There are two relevant points that hold irrespective of which antibiotic deployment strategy is used. First, antibiotics are prescribed at significantly higher rates in hospitals than in the community. Second, because the focal bacteria are commensal all that differs between strategies is what drug(s) people are prescribed and not the treatment rate. In this scenario, we immediately see the problems that can arise (Fig. 6). Because the treatment rate is higher in the hospital than in the community, both mixing and combination therapy will generate a greater relative selective advantage for both types of resistance in the hospital. In turn, this will generate a positive covariance of selection, leading to positive LD and MDR overrepresentation. On the other hand, if we cycle the drugs between the hospital and the community, such that if drug *A* is deployed in the hospital, drug *B* is deployed in the community, this will generate a negative covariance in selection, leading to MDR underrepresentation. Note that this logic could equally be applied if we were considering a network of hospitals; since in that case if we have (say) *N* hospitals, the LD of the metapopulation is still the average population LD plus the covariance [26]. Thus although cycling can be either the best or worst option for single drug resistance [17] (see also Fig. 6), by generating negative LD it can lead to MDR underrepresentation and improved clinical outcomes.

## Conclusions

The evolution of multidrug resistant pathogens is a pressing health concern, and is a topic which is increasingly gaining attention from evolutionary biologists and mathematical modellers alike. However, the typical process in studying the problem of MDR is to introduce a model of the form of (2), and then either proceed to a numerical analysis of these equations or simplify the model further by neglecting the dynamics of double resistant infections [3, 5, 17]. This is because models of MDR evolution rapidly become intractable, a problem which is particularly acute when incorporating aspects of population structure. Here we have argued that a more insightful and simplifying approach is the ‘linkage disequilibrium perspective’: after specifying the model of interest, as in (2), it is desirable to transform the model into the form of equations (3), (4), (6), and (7), which brings to the forefront the role played by linkage disequilibrium for MDR evolution in structured populations. Using the linkage disequilibrium perspective leaves us better equipped to determine what factors are responsible for generating MDR, and their generality. Moreover, taking such an approach leads to a more straightforward comparison with existing models and results.

## 1 Supplementary Material

Here we provide more comprehensive details on the different equations, variables, and definitions used in the main text.

Our focus is on an asymptomatically carried bacteria species in a metapopulation consisting of *N* populations. Focus upon an arbitrarily chosen population *X*. Let *S*^{X} and denote the density of susceptible hosts and *i j* -infections, respectively, at time *t*, where *i* indicates if the infection is resistant (*i = A*) or not (*i = a*) to drug *A* and *j* indicates if the infection is resistant (*j = B*) or not (*j = b*) to drug *B*. Susceptible hosts contract *i j* infections at a per-capita rate , where is a rate constant, while *i j* -infections are naturally cleared at a per-capita rate . Hosts in population *X* are treated with antibiotics *A, B*, or both in combination, at per-capita rates , and , respectively. Hosts move from population *X* to population *X′* at a per-capita rate *m*^{X →X}*′*.

The resistance profile of an infection changes through two processes. First, there may be de novo mutation, and so let be the per-capita rate at which an infection in population *X* acquires allele 𝓁 through mutation. Second, a *i j* -infection may be superinfected by a *k*𝓁-strain [42, 43]; in this circumstance recombination may occur. Specifically, *k*𝓁-strains are transmitted to *i j* -infections at rate , whereupon with probability *σ* superinfection occurs. In the event of superinfection, with probability 1*−ρ*, recombination does not occur, in which case with equal probability the *i j* -infection either remains unchanged or becomes a *k*𝓁-infection. With probability *ρ*, recombination does occur, in which case with equal probability the *i j* -infection becomes either an *i*𝓁- or *k j* -infection. Because our focus is upon the role of population structure, we do not allow for coinfection or within-host competitive differences based upon resistance profiles [e.g., 38] but these are straightforward extensions. Moreover, at this stage we do not make any further specification of the dynamics of uninfected hosts, be they susceptible or recovered, as doing so is not essential for a qualitative understanding of MDR evolution.

Rather than immediately writing down the set of differential equations corresponding to these epidemiological assumptions, we instead group the terms based upon the four biological processes that are occurring. In particular, the change in can be written as the sum of:

The net change due to

*mutation*, denoted . As an example, focus upon the change in*Ab*-infections in population*X*due to mutation, . These infections can increase through mutation in one of two ways: (i)*ab*-infections acquiring allele*A*at rate or (ii)*AB*-infections acquiring allele*b*at rate . On the other hand, infections are lost due to mutation whenever they (i) acquire allele*a*at a per-capita rate , or (ii) acquire allele*B*at a per-capita rate . Combining this information gives the change in*Ab*-infections in population*X*as which is mathematically equivalent to where is the per-capita mutation rate in population*X*. The only difference between the two formulations is interpretation: equation (9) shows only mutations which lead to a change in state, whereas equation (10) shows all possible mutations, even those which do not. This is why the per-capita loss term,*µ*^{X}, in (10) can be considered the total per-capita mutation rate in population*X*. More generally, we can write asThe net change due to

*recombination*, denoted . Let be the per-capita rate at which infections gain allele 𝓁 through recombination. For example, consider . In particular,*i j*-infections are challenged by strains carrying allele*A*at rate . With probability*σ*, a superinfection event occurs. Given an superinfection event, with probability*ρ*recombination happens, in which case with probability 1/2 the recombinant strain*A j*will replace the*i j*infection. Thus and*i j*-infections acquire allele*A*in population*X*at rate . Therefore the change in*i j*-infections in population*X*due to recombination is where*ρ*^{X}is the per-capita rate of recombination in population*X*, that is,The net change due to host

*migration*between populations,The net change due to

*per-capita growth*, where**1**_{𝓁}(*k*) is an indicator variable and is equal to 1 if 𝓁*= k*and 0 otherwise.

With these four processes in hand, the dynamics of infection densities are given by the system of 4*N* differential equations

### 1.1 Population LD and MDR

In what follows, we provide more details for the calculations of population LD and MDR. First, the frequency of infections with allele(s) 𝓁 or *k*𝓁 in population *X* are
where is the total density of infections in population *X*. Using these definitions, the standard measure of linkage equilibrium in population *X* is
which is mathematically equivalent to
The three dynamical equations of interest for studying MDR in population *X* are
System (19) contains a number of quantities that we now define in more detail. First, the (additive) selection coefficient for resistance to drugs *A* and *B* in population *X* are defined as
respectively, while epistasis in population *X* is . It follows that we can write each of the per-capita growth rates, , as
This is why can be thought of as ‘baseline’ per-capita growth. We define the average selection for resistance in population *X* as
Note that the average per-capita growth rate in population *X* is therefore *r* ^{X} + *s* ^{X}, that is, average per-capita growth rate is the sum of the ‘baseline’ per-capita growth rate and the average selection for resistance.

### 1.2 Metapopulation LD and MDR

Next, consider metapopulation (or total) LD and MDR. First, the metapopulation level equivalents of equations (16) are
The standard measure of linkage disequilibrium at the level of the total population is
which in terms of the population level variables is
where *D* is the average population LD and cov(*p*_{A}, *p*_{B}) is the covariance between resistance to drug *A* and resistance to drug *B*.

Using these variables, the three dynamical equations for studying metapopulation MDR are
Note that in the equation d*D*_{tot}/d*t*, there are terms involving Λ_{i j} which do not appear in the main text. These terms are
while
Thus the expression
in the equation d*D*_{tot}/d*t* is the effect upon *D*_{tot} of spatial heterogeneity in mutation and recombination rates ( and/or ) coupled with differences in the proportion of infections with allele *i* (e.g., *i = A* or *i = a*) that are resistant to the other drug (*j = B*). In particular, populations in which infections are more likely to acquire resistance through mutation/recombination disproportionately effect total LD through an increase in doubly-resistant infections. However, these terms are likely to be quite small because they require that substantial differences in mutation/recombination rates exist between populations. Since these terms are unlikely to be a significant contributor to the dynamics of *D*_{tot}, we ignore them in the main text.

There remains a number of other quantities in system (26) that we now define in more detail. First, the probability that an infection resistant to drug *f* is found in population *X* is
For example, if we apply our variable definitions, it is straightforward to show that
Next, to compute the metapopulation-level selection coefficients, and mutation/recombination rates, we need to compute the weighted average of the population quantities, where the weights are the probability that an infection of a particular type is in population *X* (calculated above). Applying this logic, the metapopulation-level selection coefficients and epistasis are
The average selection for resistance in the metapopulation is
The per-capita mutation and recombination rates follow similarly. Recall that *µ*_{𝓁} and *ρ*_{𝓁} are the per-capita rates at which infections gain allele 𝓁. Thus, for example,
Similar calculations can be made to arrive at *µ*_{B}, *µ*_{b}, and the various *ρ*_{𝓁}. The total per-capita mutation and recombination rates are

### 1.3 Covariance and coskewness

Finally, we also use a number of covariance terms and a coskewness terms. Let **𝔼**[*c*] denote the expectation of the quantity *c*. Then applying the definition of covariance, we have
Following the same procedure, we can calculate cov(*r, p*_{A}) and cov(*r, D*_{tot}). When the covariance involves quantities that also specifically depend upon particular allele(s), the only difference is that when computing the expectation the probability used is the probability that an allele 𝓁 is in population *X*. For example,
The covariance terms involving the recombination and mutation rates follow similarly, with the appropriate exchanges of variables. Finally, we have the coskewness term, which can be calculated as

### 1.4 Specific examples

#### 1.4.1 Transient dynamics and MDR in *Streptococcus pneumoniae*

Here we use a variant of the model originally proposed by [19, 35] in which the populations represent different serotypes. ‘Migration’ between serotypes occurs via antigenic recombination with probability *m*, given transmission between hosts infected with different serotypes has occurred. Resistance is gained and lost through unbiased mutation at a per-capita rate *µ* and there is no recombination of resistance loci.

Applying these assumptions and using the notation presented with our model from the main text, this yields
where
is a balancing function intended to mimic the stabilizing effect adaptive host immunity has upon serotype diversity (*ω* controls the strength of this effect; see [35]). Note that the treatment rates are assumed to be independent of serotype.

If we let denote the per-capita growth term of an *i j* -infection belonging to serotype *X* (the first term in brackets in equation (36)), we can partition this as
where
For simplicity we keep total population size constant, and so set .

The simulations in Figure 4 assume the metapopulation is initially treated at per-capita rates (*τ*_{A}, *τ*_{B}, *τ*_{AB}) *=* (0.12, 0, 0), until *t =* 500 when these rates switch to (*τ*_{A}, *τ*_{B}, *τ*_{AB}) *=* (0.07, 0.1, 0). Other parameters values used are *n* = 15,, and *m =* 10^{−8}. Finally, because *Streptococcus* serotypes differ based upon duration of carriage and transmissibility, and there is evidence of a positive correlation between the two [44, 45], was chosen to assume evenly spaced parameter values from to , while was chosen to assume evenly spaced parameter values from to . Cost epistasis is assumed to solely effect transmissibility. When there is positive epistasis, , whereas for negative epistasis, .

#### 1.4.2 Equilibrium analysis of metapopulation consisting of independent populations

This is a version of one of the models presented in [19]. The metapopulation consists of *N* populations. The populations are independent (i.e, there is no migration between populations), and each population is assumed to be of fixed size 1 so . Resistance is gained and lost through unbiased mutation occurring at rate *µ* and there is no recombination. Therefore
If we let denote the per-capita growth term of an *i j* -infection in subpopulation *X* (the first term in brackets in equation (40)), we can partition this as
where
This notation and formulation differs from that of [19, 35] in that they assumed costs were multiplicative, that is,
and
where and . The problem with multiplicative costs is apparent when we compute epistasis,
Here we can see that for the model of [19], only when there are no costs of resistance and no combination treatment will there be no epistasis. Thus transmission costs will produce positive epistasis and duration of carriage costs will produce negative epistasis in the model of [19].

In Figure 5 we consider three scenarios; whenever possible we choose parameter values to agree with those of Figure 4 in [19]. In each scenario we assume there are 20 independent populations, that the per-capita mutation rate is *µ =* 10^{−10}, and there is no epistasis . In subplot 5**a**, we set , while duration of carriage varies by population from to . In subplot 5**b** we set , while transmission varies by population from to . In both subplots 5**a** and 5**b**, , while . Finally in subplot 5**c**, , while duration of carriage varies by population from to , with .

#### 1.4.3 Constrasting drug prescription strategies in a hospital-community setting

When we model the hospital and community, we use equation (2) and assume the susceptible host density is controlled by
where *θ*^{X} is the influx of new hosts and *d* is the background mortality rate.

In the hospital/community model, we assume population *C* is the ‘community’ and population *H* is the ‘hospital’. Therefore we let *θ*^{H} *=* 0, and be the rate at which individuals are admitted to the hospital, which is independent of population size. Individuals exit the hospital at a constant rate *m*^{H→C}, so they spend on average 1/*m*^{H→C} time units in hospital (assuming background mortality is low). The specification of the migration rates in this way allows us to ensure the ‘community’ is always much larger than the ‘hospital’.

Parameters used in Figure 6 are .