Coexistence in spatiotemporally fluctuating environments

Ecologists have put forward many explanations for coexistence, but these are only partial explanations; nature is complex, so it is reasonable to assume that in any given ecological community, multiple mechanisms of coexistence are operating at the same time. Here, we present a methodology for quantifying the relative importance of different explanations for coexistence, based on an extension of the Modern Coexistence Theory. Current versions of Modern Coexistence Theory only allow for the analysis of communities that are affected by spatial or temporal environmental variation, but not both. We show how to analyze communities with spatiotemporal fluctuations, how to parse the importance of spatial variation and temporal variation, and how to measure everything with either mathematical expressions or simulation experiments. Our extension of Modern Coexistence Theory shows that many more species can coexist than originally thought. More importantly, it allows empiricists to use realistic models and more data to better infer the mechanisms of coexistence in real communities.

Description MCT-specific terminology invader a rare species; for mathematical convenience, the per capita growth rate of this species is approximated by perturbing population density to zero.resident a common species, more precisely understood as a species at its typical abundances invasion growth rate the long-term average of the per capita growth rate of an invader partition a scheme for breaking up an invasion growth rate into a sum of component parts coexistence mechanism a class of explanations for coexistence; corresponds to a component of the invasion growth rate partition of Spatiotemporal MCT space-time decomposition a type of partition which attempts to parse the effects of spatial and temporal variation on the invasion growth rate invader-resident comparison a comparison between an invader and the resident species; measures a rare-species advantage speed conversion factor converts the population-dynamical speed of resident species to that of the invader; corrects for average fitness differences in the invaderresident comparison; replaces the scaling factors, also known as comparison quotients, from previous versions of MCT Variable x a location in space t a point in time j species index (subscript) n j (x, t) the population density of species j at patch x and time t.ν j (x, t) relative density, calculated as local population density divided by the spatial average of population density, i.e., n j (x, t)/E x [n j ] λ j (x,t) the local finite rate of increase.In non-spatial models, λ j is defined as n j (x, t + 1)/n j (x, t).However, in spatial models, λ j is defined as n j (x, t)/n j (x, t), where n j (x, t) is the population size after the local growth phase, but before the dispersal phase.λ j (t) the metapopulation finite rate of increase, defined as a density-weighted average over patches: E t log λ j The long-term average growth rate; for resident species, this is zero by definition; for invader, this is the invasion growth rate E j (x, t) the environmental parameter; more generally understood as the effects of densityindependent factors C j (x, t) the competition parameter; more generally understood as the effects of densitydependent factors g j a function that gives the local finite rate of increase: λ j (x, t) = g j (E j (x, t), C j (x, t)) E * j the equilibrium environmental parameter, defined so that g j (E * j , C * j ) = 1 C * j the equilibrium competition parameter, defined so that g j (E * j , C * j ) = 1 σ the scale of environmental fluctuations: E j (x, t) − E * j = O(σ); it is often the case that σ controls the size of fluctuations in n j , E j , and C j , see Appendix 7.1.3S the total number of species in the community; S − 1 is the number of residents a j the speed of the population dynamics of species j; the intrinsic capacity to grow or decline quickly; often operationalized a j = 1/GT j , where GT j is the generation time of species j ai aj speed conversion factors; a constant that effectively converts the populationdynamical speed of species j to that of species i E j the main effect of density-independent factors on the invasion growth rate, defined as E t log E x g j (E j , C * j ) C j the main effect of density-dependent on the invasion growth rate, defined as E t log E x g j (E * j , C j ) I j the interaction effect density-dependent and density-independent factors on the invasion growth rate, defined as Coexistence mechanisms ∆E i Density-independent effects; the degree to which density-independent factors favor the invader ∆ρ i Linear density-dependent effects; specialization on resources and/or natural enemies ∆N i Relative nonlinearity; specialization on the spatiotemporal variance of resources and/or natural enemies ∆I i The storage effect; specialization on different states of a spatiotemporally varying environment ∆κ i Fitness-density covariance; the differential ability of rare species to end up in locations with high ecological fitness Taylor series coefficients α (1) j the linear effects of fluctuations in E j , defined as the nonlinear effects of of fluctuations in E j , defined as (1) j the linear effects of fluctuations in C j , defined as the nonlinear effects of fluctuations in C j , defined as (1) j the non-additive (i.e., interaction) effects of fluctuations in E j and C j , defined as Superscripts and subscripts Subscripts j index of an arbitrary species i index of the invader r index of a resident x indicates that a summary statistic (e.g., mean, covariance, variance) is calculated by summing across space t indicates that a summary statistic (e.g., mean, covariance, variance) is calculated by summing across time A denotes the effect of average conditions in the space-time decomposition S denotes the main effect of spatial variation in the space-time decomposition T denotes the main effect of temporal variation in the space-time decomposition R denotes the interaction effect of spatial and temporal variation in the space-time decomposition Superscripts

(e)
denotes exact coexistence mechanisms, or intermediate products in the calculation of exact coexistence mechanisms # indicates that the elements of a vector or matrix have been randomized (sampled randomly without replacement) Operators The spatiotemporal sample arithmetic mean; for a variable Z that varies over K patches and T time points, The spatiotemporal sample variance for a variable Z that varies over K patches and T time points,

Introduction
Modern Coexistence Theory (MCT) is a framework for understanding ecological coexistence (Chesson, 1994;Chesson, 2000; see Barabás et al., 2018 for a recent review).MCT has two main strengths.First, MCT gives us the relative importance of different explanations for coexistence, and thus tells us how species are coexisting (not simply whether they are coexisting).Second, MCT is general because it is framework for analyzing arbitrary models of population dynamics (which could represent all kinds of different communities).This feature of MCT stands in contrast to several big theories in community ecology -such as neutral theory, maximum entropy, and metacommunity theory -in which a small number of models are used to make inferences about many communities.MCT has been successfully used to derive theoretical insights (e.g., Chesson and Huntly, 1997;Stump and Chesson, 2015;Li and Chesson, 2016;Snyder and Chesson, 2003;Chesson and Kuang, 2008;Kuang and Chesson, 2010;Schreiber, 2021), and has been used to determined the mechanisms of coexistence in real communities (Caceres, 1997;Adler et al., 2006;Angert et al., 2009;Sears and Chesson, 2007;Usinowicz et al., 2012;Descamps-Julien and Gonzalez, 2005;Chu and Adler, 2015;Usinowicz et al., 2017;Ignace et al., 2018;Towers et al., 2020).Despite MCT's successes, there are a handful of problems that limit its applicability.One such problem is that currently, MCT can be used analyze models where the environment fluctuates over space or time, but not both.Here, we extend Modern Coexistence Theory (MCT) to show how models with spatiotemporal fluctuations can be analyzed.Further, we show how to parse the importance of spatial fluctuations and temporal fluctuations, and how to measure everything with mathematics or simulations.While a couple papers (Chesson, 1985;Snyder et al., 2005;Snyder, 2008) have examined the effects of spatiotemporal fluctuations in particular models, our approach permits the analysis of a broad variety of models and is thus targeted towards empirical applications.
The ability to analyze models with spatiotemporal fluctuations can lead to novel theoretical insights.For instance, we show that 1) temporal variation can promote the storage effect in the lottery model, even in the case of non-overlapping generations (Section 4), 2) that it is (nearly) impossible for the competitive exclusion principle to hold true in the presence of spatiotemporal fluctuations (Section 5), and 3) the inclusion of spatiotemporal fluctuations exactly doubles the maximum number of species that can coexist due to fluctuation-dependent coexistence mechanisms (Section 5).
More importantly, the ability to analyze models with spatiotemporal fluctuations helps us better understand coexistence in real ecological communities: MCT necessarily interfaces with the real world through empirically-calibrated models, and good representations of real communities will undoubtedly involve spatiotemporal variation.But the addition of spatiotemporal fluctuations is not realism for realism's sake: failure to include spatiotemporal fluctuations will typically lead to underestimates of fluctuation-dependent coexistence mechanisms, which could lead to poor downstream inferences about the nature of coexistence, community composition, and species abundance distributions.Our extension of MCT will enable ecologists to use more data and better models to understand coexistence.

Overview
At the coarsest level of description, Modern Coexistence Theory (MCT) has two steps: "decompose and compare" (Ellner et al., 2019).First, decompose the long-term average per capita growth rate of each species into terms that correspond to conceptually distinct processes (e.g., growth that can be attributed to resource consumption).Second, compare the like-terms of rare species (termed invaders) and common species (termed residents) in order to discover which processes tend to help rare species.These invader-resident comparisons, called coexistence mechanisms, correspond to classes of explanations for coexistence.The sum of coexistence mechanisms is the invasion growth rate, the long-term average per capita growth rate of a species that has been perturbed to near-zero density.
How do invasion growth rates and coexistence mechanisms relate to coexistence?The main idea is that invasion growth rates measure the tendency to recover from rarity, so a set of S species can be said to coexist if each species has a positive invasion growth rate in the sub-community of S − 1 resident species.This is known as the mutual invasibility criterion for coexistence (Turelli, 1978;Chesson, 2000;Chesson and Ellner, 1989;Grainger, Levine, et al., 2019).
In truth, the relationship between invasion growth rates and coexistence is not so simple.The mutual invasibility criterion fails when the elimination of one species causes knock-on extinctions, such that the S − 1 residents cannot coexist.For the mutual invasibility criterion to work, we must either assume that all S − 1 residents can coexist (Case, 2000), or limit ourselves to two-species competitive communities (Ellner, 1989).When the mutual invasibility criterion fails, one can still use invasion growth rates as inputs to the Hofbauer criterion for coexistence (Hofbauer, 1981;Benaïm and Schreiber, 2019, Eq.3.4), a sufficient condition for a type of global stability called permanence or uniform persistence (Schreiber, 2000;Garay and Hofbauer, 2003;Schreiber et al., 2011;Roth and Schreiber, 2014).But this criterion potentially combines invasion growth rates in many sub-communities (with S −n residents, n = 1, 2, . . ., S), so it is unclear to how to average over sub-communities to obtain species-level coexistence mechanisms or community-average coexistence mechanisms (as in Chesson et al., 2003, Eq.16).
Invasion growth rates are used in the mutual invasibility criterion and the Hofbauer criterion, both of which test for global stability.However, global stability can sometimes be too strong a notion of coexistence: under a certain set of scenarios (e.g., allee effects, obligate mutualisms, and intransitive competition) negative invasion growth rates can erroneously indicate a failure to coexistence, since all species would be able to coexist if simultaneously introduced at higher densities.We leave all of these issues to future research; thus, we temporarily use these concepts heuristically: larger coexistence mechanisms → larger invasion growth rate → stronger coexistence.
In the MCT literature, there are two types of coexistence mechanisms.The first is small-noise coexistence mechanisms, which closely approximate the invasion growth rate when environmental fluctuations are small.The second type is exact coexistence mechanisms, which always sum exactly to the invasion growth rate.Both types of coexistence mechanisms have been used in previous papers, though they have not yet been explicitly named or differentiated; in fact, most expositions of MCT present partitions of the invasion growth rate that mix-and-match both types of coexistence mechanisms (e.g., Barabás et al., 2018, Eq.19;Chesson, 1994, Eq. 19-22).To be clear, small-noise coexistence mechanisms do no assume that environmental fluctuations are unimportant or that the fluctuation-independent mechanisms drive coexistence.Small-noise refers to a technical assumption that environmental fluctuations are small relative to other parameters in a model of population growth.This assumption, (when paired some additional assumptions; Appendix 7.1.3)allows us to derive analytical expressions for the coexistence mechanisms.
Even though small-noise coexistence mechanisms only approximate the invasion growth rate, there are situations in which small-noise coexistence mechanisms are preferred.For one, the small-noise approximations can be calculated quickly, which is important in empirical applications where coexistence mechanisms are calculated for many draws from a posterior or bootstrap distribution of model parameters.Secondly, small-noise coexistence mechanisms sometimes permit analytical expressions (for a worked example, see Section 4), whereas the exact coexistence mechanisms almost never do.Finally, the small-noise coexistence mechanisms could correspond more closely to our verbal/textual explanations for coexistence, and thus could be more interpretable.On the other hand, the primary boon of the exact coexistence mechanisms is that they sum exactly to the invasion growth rate.We will derive both the small-noise coexistence mechanism (Section 2.2) and the exact coexistence mechanisms (Section 2.3), but we leave it to the reader to determine which is more relevant to their work.
Throughout this paper we will consider population with spatial structure but without age/stage structure, whose dynamics operate in discrete time.In Appendix 7.4, we discuss generalizations of Spatiotemporal MCT to different classes of models, including continuous-time models and age/stagestructured population models.For the time being, community dynamics are governed by a system of difference equations, where n j (x, t) is the local density of species j, λ j is the local finite rate of increase of species j, x is a discrete patch in space, t is a discrete point in time, and S is the number of species in the community.
The local finite rate of increase is a function of the effects of the environment E j and competition C j , which themselves may fluctuate over space and time.The terms m j and e j represent immigration and emmigration respectively, in units of population density.We require that the sum of c j and e j across space (i.e., net dispersal) vanishes (Appendix 7.1.4),which occurs generically when either 1) the system is closed (i.e., no individuals can enter or leave the system of patches), or 2) that the system of patches is representative or a larger metacommunity, such that it receives roughly as many immigrants as it loses emigrants.A few notes on notation are necessary.For convenience, we will often write out random variables without the explicit dependence on space and time; for example, we will write λ j instead of λ j (x, t).We use the operator E[Z] to denote the averaging (i.e., the sample mean) of some random variable Z, with a subscript to denote whether the average is being taken across space, time, or both.For example, in a system with K patches that has been observed for T time-steps, ).This notation is unorthodox for two reasons.First, the spatial dependence of temporal average, (1/T ) T t=1 Z(x, t), is suppressed by the notation E t [Z] (a similar thing can be said of the spatial average).Second, the expectation operator conventionally denotes the average across an infinite number of instantiations of the stochastic population process at one point in time; not the temporal average of one instantiation (though they are asymptotically equivalent if the stochastic process is stationary and ergodic; see Section 3).We define Var(.) and Cov(., .) in a similar fashion, to the denote the sample variance and sample covariance respectively.
The local finite rate of increase, λ j , is the discrete-time analogue of a per capita growth rate.The metapopulation finite rate of increase, λ j = E x [(n j /E x [n j ])λ j ], is the density-weighted average of λ j across space.The average growth rate rate, E t log λ j , is the quantity which is predictive of longterm growth (Lewontin and Cohen, 1969;Dempster, 1955;Stearns, 2000).The average growth rate of the invader species is called the invasion growth rate.The subscript i references an invader species, the subscript r references a resident species, and the subscript j references a generic species whose status as a resident or invader is impertinent.

Small-noise coexistence mechanisms
A full derivation of small-noise spatiotemporal coexistence mechanisms is provided in Appendix 7.1.Here, we summarize the main steps: 1.The local finite rate of increase is expressed as a function of an environmental parameter E j , and a competition parameter C j : λ j (x, t) = g j (E j (x, t), C j (x, t)).
In past literature, the environmental parameter E j is also known as "the environmentallydependent parameter", "the environmental response", or simply, "the environment".It is more generally defined as some parameter that depends on spatiotemporally fluctuating densityindependent factors (e.g., the germination probability of a seed, which depends on precipitation).
Similarly, the competition parameter C j , also known as "competition", is more generally defined as some parameter that depends on density-dependent factors.As such, the competition parameter may resource competition, apparent competition, or even mutualism.The competition parameter can often be expressed as function of multiple regulating factors, such as resources, refugia, competitors' densities (as in the Lotka-Volterra model), and predators (see Appendix 7.4.2).
2. The local finite rate of increase is approximated with a second-order Taylor series expansion of g j about the equilibrium parameters, E * j and C * j , which are specified by the user of MCT but must satisfy the constraint g j (E * j , C * j ) = 1.The resulting second-order polynomial will lead to an accurate approximation of the invasion growth rate, but only if some assumptions about the magnitude of environmental fluctuations are met (see Appendix 7.1.3).To help satisfy these assumptions, it is important to select the equilibrium parameters so that they are close to their spatiotemporal means, E x,t [E j ] and E x,t [C j ] respectively.
3. The appropriate spatial and temporal averaging is applied in order to express average growth rates entirely in terms of moments of local growth, λ j , and relative density, ν j = n j /E x [n j ]: 4. The Taylor series approximation of λ j (see step 1) is substituted into the expression for the average growth rate (Eq.2), resulting in a long expression for species j's average growth rate: j (E j − E * j ) + β (1) (1) where the coefficients of the Taylor series, α (1) ∂C j , α (2) are all evaluated at user-specified equilibrium values E j = E * j and C j = C * j , as implied by the notation.
The additive terms in the above equation (Eq.3), which we may call growth rate components, can be conceptualized as distinct processes.For example, the second term β (1) is the effect of the mean level of competition on the average growth rate.
5. The invader is compared to the residents.Because coexistence is about a rare-species advantage, we do not care so much about the invader's growth rate components, but rather their magnitude relative to the corresponding components of residents.Since every resident species cannot grow or decline on average (i.e., E t log λ r = 0) we may subtract a linear combination of the S − 1 resident species from the invasion growth rate without any distortion of the invasion growth rate.The coefficients a i /a r are called speed conversion factors (Johnson and Hastings, 2022a) and virtually covert the population-dynamical speed of the residents to that of the invader.They will be discussed further in a few paragraphs.The long decomposition of the average growth rate (Eq.3) can be substituted into the above equation, and like-terms can be grouped such that the invasion growth rate is expressed as a sum of invader-resident comparisons.These comparisons are the coexistence mechanisms.

Formulas for small-noise coexistence mechanisms
The invasion growth rate Density independent effects Linear density-dependent effects Relative nonlinearity The storage effect Fitness-density covariance The interpretations of the coexistence mechanisms are as follows.Density independent effects (∆E i ) is the degree to which all density-independent factors favor the invader.The linear densitydependent effects (∆ρ i ) represents a rare-species advantage due to specialization on regulating factors (i.e., resources and/or natural enemies).Relative nonlinearity (∆N i ) is a rare-species advantage due to specialization on variation in regulating factors.The storage effect is the rare-species advantage due to specialization on certain states of a variable environment.Fitness-density covariance (∆κ) is the differential ability of a rare species' individuals to end up in locations where they have high fitness.Note that "coexistence mechanism" is a misnomer when it comes to ∆E i , since ∆E i can only support a single species in the absence of all other mechanisms.See Barabás et al. (2018) for a more thorough discussion of the coexistence mechanisms and their interpretations.
Experts in coexistence theory may notice two differences between spatiotemporal MCT and previous versions of MCT (i.e., Chesson, 1994, Chesson, 2000), aside from the inclusion of spatiotemporal fluctuations.First, we keep the equilibrium competition parameters, C * j , as part of ∆ρ i , whereas previous versions of MCT shunted the C * j to the density-dependent effects, which are then denoted by r i (see Barabás et al., 2018, Eq.19).Second, we scale resident growth rates by speed conversion factors, whereas previous versions of MCT scaled resident growth rates by the so-called scaling factors.Both the shunting of C * j , and the scaling factors have a very specific function: to cancel ∆ρ i .As we have argued elsewhere (Johnson and Hastings, 2022a), cancelling ∆ρ i can be useful in the context of theoretical research (i.e., using simple models to derive insight), but is not recommended for "measuring coexistence" (i.e., using MCT to infer the mechanisms of coexistence in real communities).In fact, scaling factors can dramatically modulate the values of other coexistence mechanisms, potentially leading to misleading inferences about coexistence.
We scale each residents' average growth rate by a i /a r , where a j is a constant which represents the intrinsic "speed" of species j's population dynamics: the capacity to quickly grow or decline.To operationalize speed, we typically select a j = 1/"generation time" j , where generation time may be calculated from model parameters (Caswell, 2001, Section 3.5.3;Bienvenu and Legendre, 2015;Ellner, 2018).When the species in question do not have dramatically different generation times, it is often reasonable (and in some models, considerably simpler) to define a j = 1 such that a i /a r = 1 for all i and r.

Exact coexistence mechanisms
The sum of small-noise coexistence mechanisms merely approximates the invasion growth rate (Eq.6).The approximation will be good if environmental fluctuations are small (see Appendix 7.1.3for all assumptions), but in empirically-calibrated models there is no guarantee that the small-noise assumptions will be met.An alternative approach is to define a set of coexistence mechanisms that sum exactly to the invasion growth rate.We call these exact coexistence mechanisms and demarcate them with the superscript "(e)", e.g., the exact relative nonlinearity is The average growth rate of species j can be broken into two terms: The first term captures the appropriate spatiotemporal average of fitness.The second term captures the effects of variation in relative density, which can be seen either by noting that ] when fitness-density covariance is zero (Eq.2), or that the second term will approximate E t [Cov x (ν j , λ j )] when the small-noise assumptions (Appendix 7.1.3)are met.
The first term can be further decomposed with the following schema: The term E j is the main effect of the environment on the average growth rate, C j is the main effect of competition, and I j is the interaction effect between environment and competition, in analogy with a two-way ANOVA.
The quantities E j and C j can be computed generically using simulation data.To compute E j , one must calculate all λ j while holding competition at C * j .To compute C j , one must calculate all λ j while holding the environment at E * j ; the trick here is to still use the C j that we would have obtained had we not held the environment at E * j .To obtain these unadultered C j , we first run a business-as-normal simulation whilst recording E j and C j .
To calculate the exact coexistence mechanisms, our new quantities (E j , C j , and I j ) are used in the invader-resident comparison (Eq.5) in lieu of the appropriately averaged Taylor series terms (i.e., the additive terms in Eq.3).

Formulas for exact coexistence mechanisms
The invasion growth rate Density-independent effects Linear density-dependent effects Relative nonlinearity The storage effect Fitness-density covariance 2.4 The space-time decomposition of small-noise coexistence mechanisms Ideally, we would like to take any coexistence mechanism that relies on spatiotemporal variation, and perform a space-time decomposition to generate four additive components: the contribution of average E j and C j , the contribution of spatial variation, the contribution of temporal variation to the coexistence mechanism, and the remainder (whatever is left over).For example, we would like to write the density-independent effects as , with the subscripts A, S, T , and R respectively corresponding to the average component, the space component, the time component, and the space-time interaction (R stands for remainder, since the letter I is already used in ∆I i and I i ).
Before decomposing entire coexistence mechanisms, we will decompose Var x,t (E j ), a building block of the ∆E i coexistence mechanism.The space-time decomposition of Var x,t (E j ) is The last two expressions for R j are obtained using the law of total variance.A close examination confirms our space-time decomposition satisfies some minimal requirements: S j = 0 when there is no spatial variation in E j , T j = 0 when there is no temporal variation, and R j = 0 when there is either no spatial or temporal variation.
The components of the space-time decomposition of Var x,t (E j ) can be thought of as differences between hypothetical worlds in which spatial and/or temporal variation has been turned on or off.For example, the space term, S j , is the difference between the variance of E j in a world where temporal variation has been turned off (by setting E j (x, t) to E t [E j ]) leaving only spatial variation, and the variance of E j in a reference world where both spatial and temporal variation have turned off (which is necessarily zero).Adding only spatial variation to the reference state of "no variation" gives the main effect of spatial variation.The interaction effect of spatial and temporal variation is the marginal effect of turning on both spatial and temporal variation; it is the extent to which the combination of spatial and temporal variation exceeds the sum of its parts, which is why the interaction term (Eq.30) involves subtracting both main effects.
Our talk of "hypothetical worlds" and "turning off variation" may give our space-time decomposition a speciously ad hoc aura.In Appendix 7.2, we justify our space-time decomposition by 1) showing that the results it gives in a toy model accords with intuition, and 2) using the philosophical literature to show that our decomposition results in terms that can be interpreted as the causal effects of spatial and temporal variation.
In Eq.27-30, we defined the space-time decomposition of Var x,t (E j ).The other variance/covariance terms featured in the small-noise coexistence mechanisms (i.e., Var x,t (C j ) and Cov x,t (E j , C j )) can be decomposed in analogous fashion, by turning on/off E j and C j in tandem.To obtain the space-time decomposition of the small-noise coexistence mechanisms, we propagate the small-noise decompositions of Var x,t (E j ), Var x,t (C j ), and Cov x,t (E j , C j ) though the expressions for the small-noise coexistence mechanisms.(Eq.7-11).For example, since variance in E j is the purview of the density-independent effects (∆E i ), and because the space-component of Var x,t (E j ) is Var x (E t [E]), it follows that all terms involving Var x (E t [E]) will belong to ∆E i,S , the space-component of the density-independent effects.All averages over space and time are shunted into the "Average" components of the space-time time decomposition, denoted with the subscript A. Note that relative nonlinearity (∆N i ) has no average component because the average effect of C j is captured in the linear density-dependent effects (∆ρ i ).Also note that the average component of the storage effect (∆I i,A ) equals zero, since the covariance between two constants is always zero.Fitness-density covariance could technically be decomposed as ∆κ = ∆κ i,S + ∆κ i,R , but we choose not to decompose ∆κ on the grounds that it is inherently a spatial coexistence mechanism.
Formulas for space-time decomposition of small-noise coexistence mechanisms Density-independent effects Linear density-dependent effects Relative nonlinearity The storage effect

The space-time decomposition of exact coexistence mechanisms
In this section, we will describe how the space-time decomposition of the exact coexistence mechanisms can be computed using data from simulations.Our exposition is focused on the storage effect because it is the most difficult exact coexistence mechanism to quantify, but we will give formulae for the other coexistence mechanisms at the end of this section.Ellner et al. (2016) showed how simulations could be used to calculate the exact temporal storage in a model with only temporal variation.Their procedure can be naturally extended to models with spatiotemporal variation: 1. Simulate the model.For each species, record a matrix of E j (x, t)'s and a matrix of C j (x, t)'s with each row corresponding to a location in space, and each column corresponding to a point in time.Call these matrices E j and C j .
2. For each species, shuffle the elements of E j .That is, fill in a matrix with equivalent dimensions by randomly sampling without replacement from the flattened E j .Call this new matrix E j # .Shuffling (i.e., randomly sampling without replacement) destroys the covariance between environment and competition (as well as any higher order mixed moments) that is integral to the storage effect.
3. For each species, estimate the EC interaction effect as . Note here that we are averaging finite rates of increase across patches instead of individuals.This ensures that our estimate of ∆I i (e) does not include any bit of growth rate that can be contributed to the fitness-density covariance, ∆κ i .

Calculate the exact storage effect as ∆I
Ellner et al.'s (2016) critical idea -shuffling an archive of environmental states -can also be utilized to calculate the space-time decomposition of the exact storage effect.To illustrate, we will discuss how one may calculate the space component of the precursor to the exact storage effect: I j,S .To measure the the causal effect of spatial covariation, we must compare a hypothetical world with only spatial variation to a (reference) hypothetical world with only spatial variation and no EC covariation.We obtain the hypothetical world with only spatial variation by squashing temporal variation, i.e., by setting E j (x, t) to E t [E j (x)] and setting ).We obtain the hypothetical world with no temporal variation and no spatial covariation by squashing temporal variation just as we did before, and then shuffling the vector of E t [E j (x)].This produces the growth rate log E ) .The effects of spatial covariation (and higher order mixed moments) on species j's growth rate is simply the difference between the growth rates corresponding to the two hypothetical worlds.Put into symbols, we say that Instead of writing out steps for quantifying every space-time component of every exact coexistence mechanism, we will provide formulas that indicate how simulated data are to be used.Of notable importance to the storage effect is the previously introduced shuffle operator, denoted by the superscript #, which indicates that the elements of a matrix or vector are to be shuffled, i.e., randomly sampled without replacement.Note that the precursor to the "average" component of the storage effect, ∆I i,A (e) , is not necessarily zero (as it was in the analogous small-noise expression) though it should be small in the limit of small-noise.
Formulas for space-time decomposition of exact coexistence mechanisms Density-independent effects (46) Linear density-dependent effects Relative nonlinearity The storage effect 3 Computational tricks for measuring invasion growth rates in particular classes of models We have given formulas for computing coexistence mechanisms, but the components of the those formulas (e.g., E j and C j ) must be measured in a specific context.Specifically, the invasion growth rate and coexistence mechanisms must be measured in the context where 1) the invader's environment (which includes the resident species) has attained its limiting dynamics, and 2) the invader has attained its quasi-steady spatial distribution.
Here, "the invader's environment" does not refer to the environmental parameter E i , but rather all variables that influence the invader's per capita growth rate (e.g., resident densities, resources, temperature).Previous expositions of MCT required that the invader's environment be an ergodic stationary stochastic process (Chesson, 1994, p. 236).This assumption is convenient because ergodicity implies that initial conditions are irrelevant, and stationarity allows the long-term average (inherent in the invasion growth rate) to be replaced with the expectation over the stationary distribution of the state of the invader's environment; as we will see, there are several well-established tricks for calculating stationary distributions.However, requiring a stationary distribution excludes any models where parameters change over time, including models with seasonality and models that track weather patterns.Instead, we only a require that the invader's environment has a unique, asymptotic, time-average distribution (Glynn and Sigman, 1998), which only excludes models with unidirectional environmental trends.
In many ecological models, the time-average distribution of invader's environment is a stationary distribution (Nisbet and C., 1982).In homogeneous (i.e., time-invariant) Markov chain models with a finite number of states, the stationary distribution can be computed as the dominant eigenvector of the transition probability matrix or the generator matrix (terminology changes depending on whether the model is in discrete time or continuous time; Allen, 2010, p. 67).When the state space is the natural numbers (i.e., there are a countable but infinite number of states), one may approximate the stationary distribution as the dominant eigenvector of a truncated transition probability matrix (or generator matrix) where rows and columns corresponding to states of high abundance have been removed (Allen, 2010, p. 128-129).Alternatively, one may obtain an approximate stationary distribution using the Wentzel-Kramers-Brillouin (WKB) approximation (Assaf and Meerson, 2010;Pande and Shnerb, 2020).For models that take the form of stochastic differential equations, the stationary distribution can be obtained by solving a second order differential equation (Karlin and Taylor, 1981, ch. 15.3).Alternatively, one may obtain an approximate stationary distribution by finding the minimum action of a path integral (Chow and Buice, 2015;Kamenev et al., 2008).However, because the state space of all species' densities/abundances increases exponentially with the number of species, the computation time for all the aforementioned methods scales exponentially with the number of species under consideration.
For models with many species, or models where the notion of stationarity is not appropriate, one may have to take a brute-force approach: simulate a model forward in time, recording the frequency distribution of different states after a sufficiently long burn-in period.To determine the length of the burn-in period, one may simply "eye-ball" a time series plot, perhaps selecting 2× the time it takes for the residents to attain typical densities.When one must obtain the time-average distribution for many different parameter combinations, the "eye-ball" approach becomes impractical.Instead, one can employ heuristic tests for determining the length of the burn-in period (see Caswell and Etter, 1993;Hiebeler and Millett, 2011).
MCT assumes that all populations have infinite population sizes; otherwise, the invader could go extinct before it experiences a representative collection of environmental states, in which case the invasion growth rate would depend on the initial conditions of the invader's environment.Because the resident species can also go extinct in finite-population models, the concept of the stationary distribution can be replaced with the quasi-stationary distribution (QSD): the distribution of resident densities conditioned on non-extinction.In single-resident birth-death models, there is iterative numerical procedure for finding the quasi-stationary distribution (Nisbet and C., 1982, p. 183-184).Unlike the stationary distribution, the QSD cannot be computed with naive simulation.The problem is that a simulation must run for a long time in order for the frequency distribution to converge, but the longer the simulation, the more likely extinction is.One solution is the Fleming-Voit method (Ferrari and Maric, 2007;Blanchet et al., 2016), where a number simulations are run in parallel so that extinct simulations can be restarted with initial conditions equal to the state of one of the other simulations.A similar method restarts extinct simulations by drawing randomly from an archive of past states (Groisman and Jonckheere, 2012).
To avoid simulations, one may approximate the QSD by analyzing an auxiliary model.This auxiliary model is exactly like the original model, except either 1) each transition from a non-zero state to the zero state (i.e., extinction), has probability equal to zero (Pielou, 1969, p. 27;Allen, 2010, p. 127), or 2) one individual is immortal for all time (Weiss and Dishon, 1971;Norden, 1982).The stationary distribution of the auxiliary model (computed using the methods in the previous paragraphs) is an approximation of the quasi-stationary distribution of the original model.The auxiliary model #1 leads to better results for populations with long mean extinction times, whereas the auxiliary model #2 leads to better results for populations with short mean extinction times (Nåsell, 2001;Kryscio and Lefévre, 1989).
A unique challenge in spatiotemporal models (with either infinite or finite populations) is determining the quasi-steady spatial distribution of the invader, not to be confused with the previously discussed quasi-stationary distribution of resident densities.To accurately measure the invasion growth rate, one must inoculate the invader and then wait until it has attained its natural spatial distribution.However, the longer one waits for the the invader to attain this distribution, the larger the invader population becomes (assuming a positive invasion growth rate and barring stochastic extinction), leading to inaccurate measurements of the invasion growth rate.One hopes that the dynamics of spatial correlations operate on a much faster timescale than the dynamics of total density, such that a quasi-steady spatial distribution (i.e., a second-order stationary and isotropic process; Cressie, 2015) is attained long before the total density changes too much.The requisite time-scale separation can be verified by plotting spatial correlations against total density (as in Le Galliard et al., 2003, Fig. 7).Analytical expressions for the quasi-steady distribution are only available in simple spatially implicit models (see Appendix 7.3 for a worked example) or in simple spatially explicit models with the help of pair approximation (Ferrière and Galliard, 2001).
In more complex models, simulation experiments are needed to compute the quasi-steady spatial distribution of the invader.After virtually inoculating the invader species and waiting through a sufficiently long burn-in period, one can begin measuring the invasion growth rate.If the regional invader population density exceeds a user-specified ceiling (i.e., the invader becomes common), then the simulation can be restarted.Indeed, this general strategy can be used to compute other kinds of quasi-steady distributions, such as the invader's stable-age distribution.In finite population models, the invader may go extinct.To circumvent this problem, one may apply the previously discussed Fleming-Voit method (Ferrari and Maric, 2007;Blanchet et al., 2016).

Example: the spatiotemporal lottery model
To give readers a sense of how Spatiotemporal MCT may be used in practice, we analyze the lottery model (Chesson and Warner, 1981;Chesson, 1994) with spatiotemporal fluctuations.The lottery model is one of the simplest models that features fluctuation-dependent coexistence mechanisms, and has thus become a canonical model in theoretical ecology.We derive analytical expressions for the special case of two species with similar demographic parameters (Eq.82-Eq.97).Additionally, we compute exact coexistence mechanisms in a three-species system with dissimilar parameters (Fig. 1).
Imagine several fish species inhabiting territories on a coral reef.During each time-step, an individual of species j produces ξ j (x, t) larvae; per capita larval production fluctuates over space and time.The remaining life history is very simple.Adult fish die with the density-independent probability δ j .Within a single patch, the larvae inherit the empty territories with a per-larva recruitment probability equal to the number of empty sites, divided by the total number of larvae.The remaining larvae perish.Note that "empty territories" and "total larvae" here are patch-specific quantities; so far, we have only described local population dynamics.The uniform per-larva probability of recruitment is the reason that this model is called the lottery model (Sale, 1977).
If there are S species, the local dynamics of the lottery model can be encoded in a S-dimensional difference equation: Selecting E j = log(ξ j ) and C = log , the local finite rate of increase takes the simple form, Both species share the same equilibrium competition parameter, which is the average competition experienced by the invader, averaged over all species acting as the invader.This equilibrium competition parameter fixes the species-specific equilibrium environmental parameter at E * j = log(δ j ) + C * .With the equilibrium parameters in hand, we can now compute the Taylor series coefficients for the small-noise coexistence mechanisms: we find that α (1) In the second segment of each time-step, after local growth occurs, a fraction of individuals, q j , are retained at site x while the p j = 1 − q j fraction of dispersing individuals are distributed evenly across all K patches.This particular form of dispersal dynamics, which we may call local retention with global dispersal, is easy to simulate and is analytically tractable.The full dynamics of species j can now be written as Finally, we must describe the structure of environmental variation.The environmental parameter, E j (x, t), is the sum of a patch effect a(x), a time effect b(t), and their interaction, which is scaled by the interaction coefficient θ j : For simplicity, a j (x) and b j (t) are independently drawn from normal distributions with standard deviations σ (x) j and σ (t) j , respectively.There are no spatial or temporal autocorrelations, but there are cross-species correlations.The correlation between a j (x) and a k (x) is φ jk , and the correlation between b j (t) and b k (t) is φ (t) jk .Under the small-noise assumptions of MCT, the term θ j a j (x)b j (t) will become negligibly small when squared, and thus the remainder component of the space-time decomposition will be zero.For purely illustrative purposes, we will assume that θ j = O(σ −1 ), as this allows us to obtain a non-zero remainder component while still keeping the simple form of Eq.81.
To ensure that species with fast life-cycles do not dominate the invader-resident comparison, we multiply the residents' growth rates by the speed conversion factors (Section 2.2; Johnson and Hastings, 2022a).The standard way to operationalize population-dynamical speed is as the reciprocal of generation time, which is equal to δ j in the lottery model (the waiting time till death follows a geometric distribution with mean 1/δ j ).This makes the speed conversion factors a i /a r = δ i /δ r .
We now analyze a particularly simple case of the spatiotemporal lottery model in which two species are similar in many respects.Each species has equal death probabilities δ, equal spatial variances σ (t) 2 , equal temporal variances σ (t) 2 , and equal space-time interaction coefficients θ.The two species only differ in how they respond to the environment (i.e., φ (x) < 1, φ (t) < 1).
Various tricks can be used to simplify the expressions for the small-noise coexistence mechanisms.In the variance and covariance terms inherent the in small-noise coexistence mechanisms, the competition parameter can be expressed in terms of the environmental parameter, by 1) Taylor-series expanding competition with respect to the E j and n j , 2) substituting into the covariance terms and truncating at first order in accordance with the small-noise assumptions, 3) recognizing that Cov(E j , n j ) = 0 because the environment spatially and temporally uncorrelated, 4) recognizing that Var(n r ) = 0 in the case of two species, since n r is fixed at 1. To compute fitness-density covariance, ∆κ, we must first calculate the quasi-steady spatial distribution of the invader (see Section 3).In Appendix 7.3, we derive an approximation of this distribution using perturbation theory, recursion, and the geometric series.
Small-noise coexistence mechanisms in the spatiotemporal lottery model: two symmetric species with diffuse competition Density-independent effects Linear density-dependent effects Relative nonlinearity The storage effect Fitness-density covariance Figure 1: Exact coexistence mechanisms in the spatiotemporal lottery model with 3 species.Coexistence can be attributed to the storage effect and fitness-density covariance.Parameter values and simulation code can be found in lottery_model_example.R.

Discussion of coexistence in the spatiotemporal lottery model
We first use the small-noise coexistence mechanisms above to look at edge cases where there is no spatial or temporal variation.When there is no spatial variation (i.e., σ (x) = 0, the lottery model analyzed in this section collapses to the temporal lottery model of Chesson (1994).The entire invasion growth rate is δ σ (t) 2 (1 − δ)(1 − φ (t) ), which transparently shows that stable coexistence is not possible if species' responses to the environment are perfectly correlated (φ (t) = 1), or if generations are non-overlapping (δ = 1).This latter result speaks to the storage effect's namesake: coexistence "... relies on such buffering effects of persistent stages..." (Chesson et al., 2003).When there is no temporal variation and we assume no local retention (i.e., σ (t) = 0 and q = 1), our lottery model collapses to the spatial lottery model of Chesson (2000).In this case, the invasion growth rate is δ σ (x) 2 (1 − φ (x) ), which demonstrates that coexistence is possible in the face of nonoverlapping generations (i.e., when δ = 1).Finally, we consider the spatiotemporal lottery model.The invasion growth rate, minus fitnessdensity covariance and any space-time interaction terms (i.e., ∆I i,R ), is δ( )), the sum of invasion growth rates in the purely-temporal-variation case and the onlyspatial-variation case.This quantity shows us that while spatial and temporal variation both tend to promote coexistence, they do not do so symmetrically.Specifically, compared to spatial variation, temporal variation is discounted by a factor of (1 − δ).This discrepancy can be explained by the tendency of temporal variation to decrease the geometric mean of λ j (Lewontin and Cohen, 1969).
Next, consider the sum of all remainder terms from the space-time decomposition, which is equal to δθ 2 (1 − φ (x) φ (t) ) σ (x) σ (t) 2 .Both this quantity and the small-noise fitness density covariance (Eq.97) reveal that even when generations are overlapping and responses to time-effects are perfectly correlated across species (i.e., φ (t) = 1), temporal variation can still promote coexistence by effectively amplifying species-specific responses to spatial variation, with strength according to the interaction coefficient θ.Note, however, that this result is a consequence of the artificial assumption that the interaction between space and time effects, θ, is large.Also note that when both species respond identically to patch effect and time effects, the space-time interaction terms disappear, confirming the perennial fact that niche differences are required for stable coexistence.
Our analysis in the preceding paragraph reveals that sometimes, the components of the space-time decomposition of coexistence mechanisms are not of fundamental interest.One may wish to aggregate terms in various ways, e.g., all space terms, all remainder terms, all terms containing partial derivatives of C (i.e., both ∆ρ i and ∆N i ).Conversely, the invasion growth rate partition can be made even more fine-grained.Ellner et al. (2019) decomposed ∆E i into multiple terms, and partitioned the invasion growth rates with respect to trait values (as opposed to E and C).In many models, the competition parameter C j can be expressed as a function of multiple regulating factors (see Appendix 7.4.2),so naturally, ∆ρ i , ∆N i , and ∆I i can be broken down further into terms which measure the contributions of individual (or subsets of) regulating factors.

Discussion
Table 3: The maximum number of species that can coexist via various coexistence mechanisms, in a system with L discrete resources, M discrete environmental states, and K discrete patches.In the column headings, spatial variation and temporal variation refer to variation in the environment, regulating factors, and relative density.The entries in this table were derived as follows: only one species will have the largest ∆E, and in the absence of other influences on the per capita growth rates, this species' relative frequency will approach 1 over time.The entries for ∆ρ simply express the competitive exclusion principle.The entries for ∆N follow from recognizing that the covariances between regulating factors can be treated as honorary regulating factors, and then by applying the competitive exclusion principle.The entries for ∆I are derived in the same way, and are an obvious extrapolation of the work by Miller and Klausmeier, 2017.The entries for ∆κ come from Appendix 7.5.It is also well known that many species can coexist if patches have different resource supply points (Levins, 1974;Tilman, 1982;Chase and Leibold, 2003); this manifests as the M × L term in the entries for ∆κ, where M is the number of distinct resource supply points.We have formally analyzed the case where fitness-density covariance is caused by aggregating behavior (such as swarming or schooling) or preferential dispersal (Barabás et al., 2018, Appendix S5), but we imagine that behaviors or patch preferences can be treated as density-independent variables, and therefore, that the table entries  In this paper, we have shown how the invasion growth rate can be partitioned so as to isolate the effects of spatial variation and temporal variation.With this new capability, one can determine whether species are coexisting because of spatial heterogeneity, temporally changing environmental conditions, or both.Further, one can break-down individual coexistence mechanisms (such as the storage effect) in to contributions from spatial and temporal variation, e.g., the spatial storage effect and the temporal storage effect can be extracted from a complex model with spatiotemporal variation.
To calculate the invasion growth rate in spatiotemporal models, one must average local growth rates over space and time.However, a simple arithmetic average over space and time is not appropriate, due to a fundamental difference in how populations grow over space and time: with respect to the geometric mean of the finite rate of increase (the quantity predictive of persistence; Metz et al., 1992), contributions from populations across space are additive, but contributions from populations across time are multiplicative.Therefore, the appropriate spatiotemporal averaging (given by Eq.2) involves a density-weighted spatial average, followed by a temporal average on the log-scale.
To isolate the effects of spatial and temporal variation, we first define a reference state where both spatial and temporal variation are turned off; then, we separately turn on spatial (temporal) variation, and identify the difference as the main effect of spatial (temporal) variation.Put in such colloquial terms, this procedure may appear ad hoc at first glance.However, we show that this procedure agrees with intuition in a simple example (Appendix 7.2.1), and is concordant with philosophical accounts of causation (Appendix 7.2.2).In statistics (e.g., multivariate regressions, ANOVA, directed acyclic graphs), the term effect of X is often used to describe the marginal effects of X is relation to some reference state (VanderWeele, 2015).Therefore, our space-time decomposition is a natural extension of ordinary scientific practice.
A few basic insights emerge from Spatiotemporal Modern Coexistence Theory (MCT).The inclusion of spatiotemporal fluctuations (as opposed to only spatial or only temporal fluctuations) exactly doubles the maximum number of species that the fluctuation-dependent coexistence mechanisms can support (Table 3).The reason is laid bare in the space-time decomposition of the small-noise coexistence mechanisms (Eq.32-Eq.45):species may specialize on either spatial variation or temporal variation.It is worth noting that this result depends on the veracity of the small-noise assumptions (Appendix 7.1.3);even more species could potentially coexist by specializing on higher-order moments (Zicarelli, 1975;Levins, 1979), such as the spatial skew of resource concentrations.
Table 3 reveals that with even a modest number of regulating factors and environmental states, there are more than enough ways for species to coexistence.This highlights the importance of actually measuring coexistence mechanisms in real communities.Table 3 also shows the enormous potential of the fluctuation-dependent coexistence mechanisms, relative to classical explanations for coexistence (i.e., ∆ρ i ).While this may be interesting, it is not likely to drive diversity patterns in the real world.For one, it has been argued that regulating factors are plentiful if you look hard enough (Levin, 1970;Haigh and Smith, 1972;Abrams, 1988).Second, biodiversity is affected by many forces, including structural stability (Gyllenberg and Meszéna, 2005), evolutionary / developmental / physiological constraints on extreme forms of specialization, and extinction-speciation balance.
Spatiotemporal MCT also strengthens an a priori refutation of the competitive exclusion principle (the idea that no more than L species can coexist on L regulating factors).The competitive exclusion principle was originally based on equilibrium theory, but the principle still applies in fluctuating environments when there are no fluctuation-dependent coexistence mechanisms (Hening and Nguyen, 2020;Barabás et al., 2018, p.295).Of course, for this to occur, there must be linear responses to regulating factors (this precludes relative nonlinearity) and no interaction effect between environment and competition (this precludes the storage effect).Spatiotemporal MCT shows that species' responses to regulating factors cannot simultaneously be linear with respect to fluctuations on the natural scale (i.e., (2) j = 0), which is necessary for spatial averaging, and linear with respect to fluctuations on the log-scale (i.e., (1) 2 j = 0), which is necessary for temporal averaging.This shows that the competitive exclusion principle is unlikely to be applicable in the real world, even if we could count the number of regulating factors.
Though spatiotemporal MCT has produced some theoretical insights, its primary value is as a methodology for inferring the mechanisms of coexistence in real communities.Spatiotemporal MCT allows for the analysis of more realistic models, which naturally lead to better inferences.Although generating realistic models requires immense amounts of system-specific knowledge, data collection, and statistical expertise, all of this hard work can be thought of as a safeguard against bad inferences.When simplistic statistical approaches are used to understand community structure, the data is often overdetermined by theory.For example, left skew in a species abundance distributions could indicate neutral population dynamics (Hubbell, 2001); or temporal autocorrelation in sampling (McGill, 2003); or an excess of transient species (Magurran and Henderson, 2003); or a sequential stick-breaking model (Nee et al., 1991); or a log-normal distribution paired with a zero-sum constraint (Pueyo, 2006).Randomization-based null models for detecting interspecific competition can implicitly exclude or include the effects of competition (Connor andSimberloff, 1979, Diamond andGilpin, 1982).A saturating curve on a plot of regional vs. local species richness could indicate environmental filtering (Cornell and Lawton, 1992) or dispersal limitation (Fox et al., 2000).
While data is always overdetermined by theory to some extent (Duhem, 1954), the problem can be abated by MCT's model-based approach and a few best practices.First, one ought to large / flexible / complex models.Such models are less biased, and implicitly capture structural uncertainty (Draper, 1995) in the form of parameter uncertainty (e.g. for the student's t-distribution, the degrees of freedom parameter interpolates between a gaussian distribution and and a cauchy distribution).As Leonard Savage used to say, all models should be "as big as a house" (qtd in Draper, 1995).Simple "template models" (like the annual plant model; Lanuza et al., 2018) can be made complex through the process of continuous, iterative model expansion (Box, 1980;Draper, 1995;Gelman et al., 2020;Gelman et al., 2020).
Another modelling "best practice" is to propagate uncertainty in model parameters through to the level of coexistence mechanisms, which can be generically accomplished by sampling from bootstrap or posterior distributions of model parameters.To our knowledge, only one empirical application of MCT (Ellner et al., 2016, Section SI.8) has performed this crucial step.Without uncertainty propagation, it is difficult to say whether estimates of coexistence mechanisms reflect reality or sampling error.
Although we have extended MCT to more complex models, there remain a number of problems with MCT, primarily concerning the external validity of invasion growth rates as a measure of coexistence.But we should not be surprised nor disheartened that such problems exist: MCT was invented to explain the role of environmental variation in coexistence (Barabás et al., 2018, p. 288, Chesson, 2019, p. 6), not to be a methodology.There has been a recent surge of interest in the interpretation and application of MCT (Ellner et al., 2016;Ellner et al., 2019;Grainger, Letten, et al., 2019;Song et al., 2020;Pande et al., 2020;Ellner et al., 2020;Barabás et al., 2018;Chesson, 2019;and Barabás and D'Andrea, 2020;Johnson and Hastings, 2022a;Johnson and Hastings, 2022b;Johnson and Hastings, 2022c), but more work needs to be done.

Acknowledgements
We would like to thank Simon Stump and Sebastian Schreiber for discussions; and Logan Brissette for copy editing.This research is supported in part by NSF Grant DMS -1817124 Metacommunity Dynamics: Integrating Local Dynamics, Stochasticity and Connectivity.

Deriving small-noise coexistence mechanisms
The derivation of spatiotemporal coexistence mechanisms can be broken into four parts.In part 1, the local finite rate of increase is expressed in a common format: a polynomial of E j and C j .This requires expressing a model of population dynamics as function of E j and C j (Section 7.1.1),assuming that environmental fluctuations are small (Section 7.1.3),and applying a Taylor series expansion (Section 7.1.2).In part 2, the appropriate spatial (Section 7.1.4)and temporal (Section 7.1.5)averaging is applied in order to express the invasion growth rate in terms of local finite rates of increase.In part 3, The approximations derived in part 1 and 2 are combined to create a long expression for each species' average growth rate (Section 7.1.6).In part 4, the small-noise coexistence mechanisms are finally produced (formulas presented in the main text) by comparing the invader to the residents.
Why does our exposition feature discrete-time populations dynamics?For one, the connection with data-based modelling of real communities is more transparent, since data is collected at discrete points in time, and as a consequence, ecologists primarily fit discrete-time models.Secondly, the expressions for the small-noise coexistence mechanisms in the case of discrete-time are identical to those in case of continuous-time when environmental stochasticity is proportional to white noise (Section 7.4.1).
A brief technical note: Throughout the paper, we use the notation E j as shorthand for E j (x, t); it is not the case that that E j is a random variable and that E j (x, t) is a realization of said random variable, as the notation seems to imply.As Chesson (2000) points out, the notation can be made more precise by adding the seed number/ sample path as an additional argument, such that E j (x, t, ω) is a realization of the random variable E j (x, t).Throughout this paper, when we apply the expectation operator (or covariance or variance operators), we sum over space and/or time while fixing the sample path ω.

Population growth as a function of the environment and competition
The local finite rate of increase, λ j , is given by the function g j (E j , C j ), where E j represents the effects of density-independent factors and C j represents the effects of density-dependent factors (also known as regulating factors or limiting factors).
The parameter E j has many names: the environmentally-dependent parameter, the response to the environment, the environmental parameter, or the environment.It is typically a demographic parameter that depends on the abiotic environment, such as per capita fecundity or the probability of seed germination, hence the terminology response to the environment.But E j may also be a literal environmental variable, such as annual precipitation, degree days, or soil type.It is important to keep in mind that E j need not represent the effects of the abiotic environment, since not all densityindependent factors are part of the abiotic environment (e.g., mortality from a generalist predator), and not all density-dependent factors are biotic (e.g., refugia, soil nutrients).
The parameter C j is often called the competition parameter, or simply competition.Concrete examples of the competition parameter are the number of juvenile fish competing per open territory in the lottery model, or a linear combination of population densities, as in the competitive Lotka-Volterra model.The focus on competition reflects MCT's intellectual origin (and more generally, ecology's bias towards competition; Mittelbach, 2019, p. 164) but the density-dependent C can just as easily predation pressure (Kuang and Chesson, 2010;Chesson and Kuang, 2010;Stump and Chesson, 2015;Stump and Chesson, 2017) or mutualistic benefits (Stump et al., 2018).
We note that in some papers (e.g., (Chesson, 1994;Chesson, 2018;Ellner et al., 2016), C {−i} j or C j\i is used to denote the competition parameter of species j when species i is absent.We simply use C j to denote the same, since we are always considering a community in which one species is the invader.

Decomposing the finite rate of increase: the quadratic approximation
We will decompose g j (E j , C j ) via a second-order Taylor series expansion.First though, we must select equilibrium values of the environment and competition to expand about.These values, denoted E * j and C * j , must be selected so that that g j (E * j , C * j ) = 1, which functions to eliminate the zeroth-order Taylor series coefficient (see Eq.98).
In general, there is no unique choice of E * j and C * j , though as Chesson (1994) notes, fixing one parameter will determine the other.That being said, not all choices are equally appropriate.In particular, for every term in the Taylor series expansion to be the same order of magnitude -and thus of commensurate importance -we must simultaneously select E * j to be close to E x,t [E j ], and C * j to be close to E x,t [C j ] (the reasoning will be explained in the following section; 7.1.3).
There is a canonical method for selecting E * j and C * j : virtually eliminate environmental noise, select E * j as the environmental parameter in the resulting deterministic skeleton (Coulson et al., 2004), and then select C * j based on the constraint g j (E * j , C * j ) = 1.In many models, the species-specific competition parameter C j can be expressed as a species-specific function of shared regulating factors (e.g., species densities, mineral nutrients).In such models, if one desires to quantify the contributions of individual regulating factors to various coexistence mechanisms (see Section 7.4.2),then one must select equilibrium values of these regulating factors.When there are multiple regulating factors, there are an infinite number of ways to select their equilibrium values -there are multiple unknowns and just one constraint (g j (E * j , C * j ) = 1) -but there are several reasonable strategies (see Johnson and Hastings, 2022a, Section 2.1).
With the appropriate selection of the equilibrium values, we expand the local finite rate of increase with a second-order Taylor Series about E * j and C * j : The coefficients of the Taylor series are ∂E j ∂C j . (99)

Small noise assumptions
In order for the second-order Taylor series expansion (the r.h.s. of Eq.98) to be a good approximation of g j (E j , C j ), we must make some assumptions about the magnitude of environmental fluctuations.
First, we assume that the environmental parameter E j fluctuates about E * j in a small finite range, and that the size of this range in controlled by a small parameter σ.Here, we use the conventional "big-oh" notation to denote an upper bound on magnitude of fluctuations: More precisely, this means that E j − E * j < kσ, with some constant k as σ → 0. Our next assumption states that environmental fluctuations are even smaller when averaged across space and time: Note that the spatiotemporal average of fluctuations is much smaller than maximum fluctuation, since the square of small number is much smaller than that number.The justification of the above assumption is either 1) that positive and negative fluctuations cancel out, or 2) that large fluctuations (which set the magnitude of E j − E * j ) are overpowered by many smaller fluctuations.Functionally, the assumption ensures that the effects of spatiotemporal averages are on the same order of magnitude as the effects of spatiotemporal variance (note that Eq.100 and Eq.101 imply that Var x,t (E) = O(σ 2 ) ).
To help make sense of the above assumptions, consider an environmental parameter E j (x, t) = a(x) + b(t).Both the patch effect a(x) and time effect b(t) independently take the value +σ or −σ with probability = 0.5.By construction, the first assumption Eq.100 is met.If we then select E * j = 0, the relevant bounds are Here we see that spatial and temporal averages of environmental fluctuations are on the same order of magnitude as the raw fluctuations, E j − E * j .Furthermore, we see that E x,t [E j ] − E * j = 0, which neatly demonstrates that the spatiotemporal average of fluctuations is exceedingly small (Eq.101).
Throughout this paper, we will refer to the two assumptions (Eq.100 and Eq.101) as small-noise assumptions.Under fairly unrestrictive conditions, the small-noise assumptions can be used to prove analogous bounds for the competition parameter ( ) and for relative density (ν j − 1 = O(σ) and E x,t [ν j ] − 1 = O(σ 2 )).Heavily paraphrased, the conditions are 1) that competition is a function of population densities and environmental responses (Chesson, 1994, p. 269); 2) that competition does not amplify itself over time (Chesson, 1994, p. 269)); and 3) that "... any increase in local density due to dispersal cannot increase competition any more than O(σ) above the maximum competition applicable if there were no dispersal."(Chesson, 2000, p. 234).For all the details, see Appendix 2 of Chesson (1994) and Appendix 3 of Chesson (2000).The same small parameter, σ, controls fluctuations in all relevant quantities (i.e environment, competition, relative density), since all fluctuations are ultimately a product of fluctuations in the environment.
The small-noise assumptions serve two primary purposes.First, they allow us to truncate the Taylor series (Eq.98) at second order, thus limiting the number of coexistence mechanisms that we might simultaneously consider.Second, the small-noise assumptions allow us to use the small-noise approximation for dynamical systems (Gardiner, 1985), resulting in simple stochastic models that permit analytical expressions for important quantities, e.g., the covariance between environment and competition.See Schreiber, 2021 for a worked example of the small-noise approximation in the context of coexistence theory.
As Chesson (1994) points out, the small-noise assumptions are not statements about the absolute magnitude of environmental fluctuations.Instead, they are statements about the magnitude of environmental fluctuations, relative to other demographic parameters in a particular model.This does not mean that fluctuation-dependent coexistence mechanisms are unimportant, since the deterministic dynamics (corresponding to comparatively large parameter values) produce small per capita growth rates near equilibrium.Because the invader is not near equilibrium, however, we must make the additional assumption that between-species differences in the effects of regulating factors / competition on per capita growth rates are O(σ 2 ) (see Chesson, 1994, p. 238).
When the small-noise assumptions (and the auxiliary conditions above) are not met, one can proceed with two risks.First, the small-noise coexistence mechanisms may not sum approximately to the invasion growth rate; they will "miss" important processes that promote or hinder coexistence.Second, the exact coexistence mechanisms may capture unknown processes that involve large environmental fluctuations, thus making the exact coexistence mechanism less interpretable.
The small-noise assumptions above require large fluctuations to be impossible, not just improbable.Restricting fluctuations to a finite range ensures that growth rates will not be dominated by lowprobability, high-impact events.The gain in internal validity comes at the cost of external validity: it is often reasonable to model the environmental response by a random variable with support on the positive real numbers.For example, recruitment in some marine animals appears to follow lognormal distributions (Hennemuth et al., 1980;Ripley and Caswell, 2006).However, the exact coexistence mechanisms circumvent the finite range assumption entirely, as long as we exclude from consideration the unlikely scenario where the distributions of E j and C j are so fat-tailed that spatial, temporal, or spatiotemporal averages of E j and C j do not exist.Given the plethora of assumptions implicit in any ecological model, a violation of the finite range assumption is just one of many ways in which the results of an MCT analysis are provisional.

Spatial averaging and fitness-density covariance
Next, we will derive a decomposition of the metapopulation finite rate of increase, λ j (t).Consider a community with K distinct patches.The metapopulation finite-rate of increase can be calculated as simple average of each individual's finite rate of increase, or equivalently, a weighted average of each patch's finite rate of increase, with weights equal to the relative density of the population in that patch.To see the logic of the latter scheme, first note that Using the local dynamics (Eq.1) to substitute for n j (x, t + 1) , we find that To simplify the above expression, we would like second additive term (the spatial sum of net dispersal) to vanish.This can be accomplished by assuming either 1) that the system is "closed", i.e., no individuals can enter or leave the system of patches, or 2) that the community receives roughly as many immigrants as it loses emigrants.Scenario 1 is likely to be approximately true for communities that span entire ecosystems, or for communities with very specific habitat requirements (e.g., Californian plants endemic to serpentine soils; Harrison et al., 2006).In either case, there is no immigration into the metacommunity, and emmigration out of the metacommunity results in mortality that can be treated as part of the local dynamics of marginal patches.Scenario 2 is likely to be approximately true when the habitat surrounding the focal area is similar enough to the habitat within the focal area, so that immigration and emigration balances out over the margin of the focal area.In other words, the focal area (which itself is not closed) is representative of a larger metacommunity which is effectively closed.
Assuming that dispersal is negligible at the spatial scale of the metapopulation, and rearranging terms, Eq.103 simplifies significantly, thus revealing that the metapopulation finite rate of increase is a density-weighted average of local finite rates of increase.λ j (t) can be decomposed further with the law of total covariance: where ν j is the relative density of species j, defined precisely as ν j (x, t) = nj (x,t) Ex [nj (x,t)] .The first term in Eq.105 is the spatial average of local per capita growth rates.It will be decomposed further with the Taylor series decomposition (Section 7.1.2).The second term is the covariance between relative-density and growth rates, which captures the ability of species j to end up in locations where it has high fitness, though the mechanism is completely unspecified.This term is the precursor to fitness-density covariance.

Temporal averaging
The quantity which is predictive of persistence is not E t λ k , but rather E t log λ j .The logarithmic transformation converts a product of λ j into a sum of log λ j , which facilitates average-taking.
Conditions on the magnitude of fluctuations in E j , C j , and ν j (Section 7.1.3)can be used to show that λ j = 1 + O(σ) and E t λ j = 1 + O(σ 2 ).The logarithm can now be decomposed with a Taylor series expansion Utilizing the fact that E t λ j − 1 2 = Var t λ j + O(σ 4 ), we take the average over time to obtain the average growth rate: Plugging the decomposition of λ j (t) (Eq.105) into equation Eq.107, we find that the invasion growth rate can be approximated entirely in the moments of λ j and ν j .
7.1.6Putting it all together: A decomposition of the average growth rate The Taylor series decomposition of g j (E, C) (Eq.98) can be plugged into Eq.108,producing a finegrained partition of species j's average growth rate (1) (109) The additive terms in equation Eq.109, can be thought of as a components of the average growth rate, each of which captures some "effect" on population growth.The components are not generally independent, which implies that the consequent coexistence mechanisms are not generally independent (Song et al., 2020;Kuang and Chesson, 2010;Yuan and Chesson, 2015).For instance, in the spatiotemporal lottery model (Section 4 in the main text) a single parameter modulates all coexistence mechanisms.However, growth rate components may be conceptualized as distinct processes, just as ecology and evolution are interdependent but conceptually distinct.
Note that the term E x,t (E j − E * j )(C j − C * j ) has been replaced with Cov x,t (E j , C j ), since Cov x,t (E j , C j ) = E x,t (E j − E * j )(C j − C * j ) +O(σ 3 ) via the small-noise assumptions.Analogous replacements have been made for other variance and covariance terms in Eq.109.These replacements are not a necessary part of MCT, but they do shorten the mathematical expressions, which is aesthetically pleasing.
7.2 Justification of the space-time decomposition To be more concrete, consider two abiotic factors, W and Y .W only varies over space (i.e., at a particular location, W does not vary from year-to-year) and Y only varies over time (i.e., at a single point in time, all locations have the same value of Y ).Select the equilibrium values of the abiotic resources, W * and Y * , so that E * j = f j (W * , Y * ), where f j is a the function which relates abiotic factors to species j's environmental response.The small-noise assumptions of MCT imply that Using this information, we can derive expressions for the space-time decomposition of Var x,t (E j ).Applying a Taylor series of f j about W * and Y * for E j , and utilizing the fact that the variance of a constant equals zero (e.g., Var t (W (x)) = 0), the leading-order approximations of S j , T j , and R j (using Eq.28-Eq.30)are The Taylor series coefficients show that S j captures the main effect of the spatially varying abiotic factor, T j captures the main effect of the temporally varying abiotic factor, and that R j captures the interaction effect between the two abiotic factors.This model is exceedingly simple, but it is the first line of evidence that our space-time decomposition behaves as desired.

The space-time decomposition measures causation
Counterfactual theories of causation posit that causation can be explained in terms of counterfactual dependency (Hume, 1748;Mill, 1856, Lewis and Possibility, 1973, Pearl and Mackenzie, 2018).To say "A caused B", is to say "if A had not occurred, then B would not have occurred".To operationalize causation, we may calculate differences (with respect to some outcome of interest) between possible worlds, where the possible worlds are similar in every relevant way except for some focal causal factor.The comparison of possible worlds is crucial, which is why the counterfactual account of causation is sometimes called the difference-making account of causation.Lewis and Possibility (1973) explains "We think of a cause as something that makes a difference, and the difference it makes must be a difference from what would have happened without it." The exposition above makes our challenge clear: to justify our space-time decomposition on the grounds that it captures causation, we must 1) describe S j , T j , and R j (see Eq.28 -Eq.30) in terms of differences between possible worlds, as has been done in the main text (Section 2.3) and 2) argue that the possible worlds in question are close in some relevant sense, following Lewis's (1979) guideline that possible worlds "...maximize the spatiotemporal region thorough-out which perfect match of particular fact prevails".By using spatial (temporal) averaging to squash spatial (temporal) variation, we are doing just that: the sequence of spatial averages A(t) = E x [E j ] minimizes the squared error x,t (E j (x, t) − A(x)) 2 , under the constraints that there is no spatial variation, and that spatial variation must be squashed using only information from each individual time-step.
The small-noise assumptions (Section 7.1.3)allow us to make the substitution, λ j (x, t) = 1+O(σ 2 ), which simplifies the relative density map to ν j (x, t + 1) = q j ν j (x, t)λ j (x, t) + 1 − q j . (115) We now expand v j in powers of σ and match terms of order σ.
Substituting the above expression into the covariance produces Substituting α (1) Next, we express invader's competition parameter fluctuation in terms of the resident's environmental response.In the two-species lottery model, i Finally, we write the environmental fluctuations in terms of patch and time effects (Eq.81), evaluate the above expression using the geometric series and the symbols introduced in the Section 4, e.g., r , and take the average across time: In the lottery model, there are always more larvae produced than are necessary to compensate for adult mortality.If there is only one resident, its densities will be exactly 1 everywhere after the local growth phase.Since global dispersal with local retention acts symmetrically on all patches, the resident's density will still be 1 everywhere after the dispersal phase.Therefore, the residents' covariance terms is zero, and the fitness density covariance coexistence mechanism is simply the expression above, Eq.120; i.e., ∆κ i = E t [Cov x (v i , λ i )].When symmetries in demographic parameters are taken into consideration, Eq.120 reduces to the result in the main text, Eq.97.

Continuous-time models
The continuous-time dynamics of a scalar population are given by the differential equations, dn j dt = n j (x, t)r j (x, t) + c j (x, t) − e j (x, t) j = (1, 2, ..., S), where r j (x, t) is the instantaneous per capita growth rate or the intrinsic growth rate, and c j and e j are dispersal terms which will cancel out at the scale of the metapopulation (see Section 7.1.4).
For the most part, the derivation of coexistence mechanisms for continuous-time models follows the derivation in Section 7.1.However, the expressions for the single-species decomposition of the average growth rate (i.e., the continuous-time analogue of Eq.109) will depend on how stochasticity enters the population dynamics.First, define the metapopulation per capita growth rate as in analogy with Eq.105.Next, consider the case where E j or C j fluctuates so rapidly that species j's dynamics can be cast as a stochastic differential equation.The metapopulation density, n j , evolves according to where dW j is an increment of the Weiner Process, E t [ r j ] is the infinitesimal mean, and Var t ( r j ) is the infinitesimal variance (Lande et al., 2003;Braumann, 2007).To calculate future population densities, and thus determine whether an invader will invade, the right-hand-side of the stochastic differential equation must be integrated across time.The two most popular calculi for evaluating stochastic integrals are Ito's calculus and Stratonovitch's calculus (Roughgarden, 1979).Braumann (2007) convincingly showed that Ito's calculus is the correct choice when the infinitesimal mean is defined as the arithmetic (temporal mean of per capita growth rates.Under Ito's calculus, the solution to the stochastic differential equation is n (Braumann (2007)), so the invader only tends to increase when (E t [ r i ]−Var t ( r i ) /2 > 0. The discounting of the expected growth rate by half of the temporal variance should be reminiscent of Eq.107.In discrete time models, this discounting is an approximation that we justify using small-noise assumptions (Section 7.1.3).Here, because stochastic differential equations are defined in the limit as the time-increment shrinks to zero, the noise is automatically small, and so the discounting is exact.
To obtain expressions for the average growth rate that are analogous to Eq.109, we can expand E t [ r i ] and Var t ( r i ) with Taylor series; and truncate using the small-noise assumptions (Section 7.1.3).Once expressions for average growth rates are in hand, the invader-resident comparison is straightforward.The Ito calculus produces which is nearly identical to the discrete-time case (Eq.109), the only difference being that that the Taylor series coefficients are derivatives of r j , not λ j .For example, in the expression above, α When population densities are not governed by stochastic differential equations (regardless of whether E j or C j are, e.g., Li and Chesson (2016)) a simple arithmetic average over space and time gives the correct invasion growth rate: j (E j − E * j ) + β (1) Here, there is no discounting for temporal variation, so spatial and temporal variation are treated symmetrically (with the exception of fitness density covariance).Finally, we note that it is often more difficult to fit a continuous-time model to data, since there are many trajectories that population densities can take between two successive observations.The typical way to fit such models is to convert a system of stochastic differential equations (or Langevin equations) into its Fokker-Planck representation, and then integrate the partial differential equation (for each observation) to get a probability density function (Karlin and Taylor, 1981;Lande et al., 2003).

Multiple regulating factors
In the spatiotemporal lottery model, competition was a function of just one regulating factor: space.In more realistic models, we may want to cast competition as function of L regulating factors, F = (F 1 , F 2 , ..., F L ).The regulating factors can be species densities, refugia, resources, or natural enemies, etc: In previous work (e.g., Chesson, 1994;Barabás and D'Andrea, 2020), the Taylor series coefficients β (1) j and β (2) j were absorbed into φ (1) jk and φ (2) jkl .Our preferred notation makes the formulas slightly longer, but also implies that φ j (F ) can straightforwardly substituted for C j , which in turn implies that the case of multiple regulating factors is not different from what is presented in the main text.
With this approach, it is sometimes the case that C j = λ j , such that β (1) j = β (2) j = 1.This is similar to the approach taken by Chesson (2019), who directly expands the growth rate with respect to the regulating factors by first defining φ j via the relationship C j = φ j (F ) (where C j = log λ j ), and then expanding φ j with respect to the regulating factors.
Small-noise coexistence mechanisms Formulas for small-noise coexistence mechanisms which explicitly use the regulating factors can be obtained by taking the formulas for small-noise coexistence mechanisms in the main text (Eq.7 -Eq.11), substituting in the Taylor series expansion of φ j for C j , and truncating using the small-noise assumptions.To taylor expand φ j , one must select equilibrium values F * such that C * j = φ j (F * ).This task may be guided by the the requirements that ), which are implied by the small-noise assumptions (Section 7.1.3).To keep the number of coexistence mechanisms from exploding beyond comprehension, all linear terms in F k get shunted into ∆ρ i , all nonlinear terms in F k get shunted into ∆N i , and all nonadditive terms in F k get shunted into ∆I i .This shunting helps to simplify and standardize, but users of MCT can still look at the relative roles of different regulating factors in promoting coexistence.We will present the small-noise coexistence mechanisms for a system with L regulating factors, but first we introduce new notation to keep the expressions as simple as possible.Let φ The invasion growth rate Density-independent effects Linear density-dependent effects Relative nonlinearity ik φ (1) (1) 2. The contribution of covariance between F k and F l (k = l) on relative nonlinearity, or equivalently, the degree of specialization on the covariance between F k and F l : ik φ (1) i φ (2) rkl Cov x,t (F k , F l ) − β (1) i 2 φ (1) rk φ (1) 3. The total contribution of F k to relative nonlinearity, or equivalently, the degree of specialization on fluctuations in F k , given that there are fluctuations in other regulating factors: i φ (2) ikk Var x,t (F k ) − β (1) i 2 φ (1) ik φ (1) i φ (2) rkk Var x,t (F k ) − β (1) i 2 φ (1) rk φ (1) ik φ (1) Exact coexistence mechanisms The exact coexistence mechanisms can be obtained by following the directions implied by the formulas for the exact coexistence mechanisms (Eq.18 -Eq.25).For example, the formula for ∆ρ i (e) (Eq.139) directs the user to set C j to E x,t [C j ]; because C j = φ j (F ), one would set φ j (F ) to E x,t [φ j (F )].
However, this approach does not give the user much latitude to partition the coexistence mechanisms further into contributions from individual regulating factors or subsets of regulating factors.Returning to the task of partitioning ∆ρ i (e) , we might try setting φ j (F 1 , . . ., F L ) to φ j (F 1 , . . ., E x,t [F k ] , . . ., F l ), one F k at a time, and then summing the resulting pieces of invasion growth rate to approximate ∆ρ i (e) .This approach will make for a good approximation of ∆ρ i (e) under the small-noise assumptions.Similar procedures can be defined for ∆N To define these procedures in a reasonable amount of page-space, new notation is required.Let F −{k} be the vector of regulating factors with the k-th element removed.A natural extension is v −{k,l} , a vector v where the k-th and l-th elements have been removed.Let v −{k} , a be a vector v where the k-th element has been replaced with a.Similarly, let v −{k,l} , a, b be a vector v where the k-th element has been replaced with a, and the l-th element has been replaced by b.The notation introduced here allows us to express ideas such as holding all elements of F at their equilibrium values, except for F k , which is held at its spatiotemporal average: F * −{k} , E The exact coexistence mechanisms here are slightly different from the exact coexistence mechanisms presented in the main text (Eq.18 -Eq.25), hence the "prime" notation.This is because the exact coexistence mechanisms here are deliberately defined in terms of sums across regulating factors; this property enables more fine-grained partitioning into the effects of particular regulating factors, or various space-time decompositions.Under the small-noise assumptions, the two types of exact coexistence mechanisms do not differ by more than Oσ 3 .We note that different partitions may serve different purposes The linear density-dependent effects is obtained by fixing the environment and most of the regulating factors at their equilibrium values, with the exception that a single regulating factor is fixed at its spatiotemporal average: E x,t [F k ].The growth rate is calculated under these conditions, and then procedure is repeated for each regulating factor.The sum of results is ∆ρ i (e) .Relative nonlinearity is obtained by fixing the environment and most regulating factors at their equilibrium levels, except now two regulating factors are allowed to vary.Since the growth rate calculated under these conditions includes the average effects of regulating factors, we must subtract the average effect (e.g., log g j E * j , φ j F * j −{l} , E x,t [F l ] ) of each of the regulating factors that are varying.Corresponding growth rates are summed across all pairs of regulating factors to produce ∆N i (e) .The storage effect is obtained by allowing the environment and a single regulating factor to vary.In this scenario, the emergent growth rate includes the main effect of the environment, the spatiotemporal average effect of the regulating factor, and effects of fluctuations in pairs of regulating factors.Therefore, in order to isolate the interaction between the environment and a regulating factor, we must subtract E i .We must also subtract the appropriate terms within ∆ρ i (e) and ∆N i (e) , which amounts to L l=1 E t log E x g r E * r , φ r F * r −{k,l} , F k , F l .

Structured population models
In a structured population model, discrete age, stage, or size classes can be treated as different regulating factors F k , and thus handled via the methods above (Section 7.4.2).When population structure is continuous in nature, the methods above can still be applied, but instead of holding some regulating factors at their equilibrium values while allowing others to vary, one would hold a range of a single (continuous) regulating factor constant, while allowing another range to vary.In other words, sums across discrete regulating factors are replaced by an integral across the states of a single continuous regulating factor.

7. 2
.1 A toy model with only spatially or only temporally varying abiotic factors Here, we aim to remove idle doubts about the appropriateness of our space-time decomposition by providing two justifications.Our first justification comes from the analysis of an edge case where the environmental response E j is a function of abiotic factors that individually vary only over space or time.This case is simple enough that we can describe our intuitions regarding what a space-time decomposition should do: The space component should only include the effects of the spatially varying abiotic factors; and the time component should only include the effects of the temporally varying abiotic factors.
∂F k ∂F l , where both quantities are evaluated at E j = E * j and F = F * .Formulas for small-noise coexistence mechanisms: multiple regulating factors

rklrl
Cov x,t (F k , F l ) − β Cov t (E x [F k ] , E x [F l ])

rklrl
Cov x,t (F k , F l ) − β Cov t (E x [F k ] , E x [F l ]) x,t [F k ]Formulas for exact coexistence mechanisms: multiple regulating factorsThe invasion growth rateE t log λ i = ∆E i = E t log E x g i (E i , φ i (F * i ) [log(E x [g r (E r , φ r (F * r )])] E * i , φ i F * i −{k} , E x,t [F k ] log E x g i E * i , φ i F * i −{k,l} , F k , F l log E x g r E * r , φ r F * r −{k,l} , F k , F l log E x g i E * i , φ i F * i −{k,l} , F k , F l (143) − log g i E * i , φ i F * i −{k} , E x,t [F k ] (144) − log g i E * i , φ i F * i −{l} , E x,t [F l ] log E x g r E * r , φ r F * r −{k,l} , F k , F l (146) − log g r E * r , φ r F * r −{k} , E x,t [F k ] (147) − log g r E * r , φ r F * r −{l} , E x,t [F l ] log E x g i E i , φ i F * i −{k} , F k − E i log E x g i E * i , φ i F * i −{k,l} , F k , F l log E x g r E r , φ r F * r −{k} , F k − E r log E x g r E * r , φ r F * r −{k,l} , F k , F lFitness-density covariance ∆κ i (e) = E t log λ i − ∆E i (e) + ∆ρ i (e) + ∆N i (e) + ∆I i t t t t t t t t