View source: R/testStability.R
testStability | R Documentation |
Test the stability of an interaction matrix. The first two methods (coyte and eigen) determine whether the community's steady state is stable in the sense that the community returns to it after a small perturbation. The last method tests for explosion in simulations with Ricker.
testStability(A, method = "eigen", K = rep(0.1, N), y = runif(N), sigma = 0.01, explosion.bound = 10^4, tend = 100)
A |
the interaction matrix to test |
method |
the method to test stability (coyte, eigen, ricker) |
K |
carrying capacities for ricker test |
y |
initial abundances for ricker test |
sigma |
noise term for ricker test |
explosion.bound |
explosion boundary for ricker test |
tend |
end of simulation time for ricker test |
Coyte's stability criterium is fulfilled if: max(r_e,r_s) - s < 0, where s is the average of the diagonal values (the intra-species competition), r_e is the half-horizontal radius of the eigenvalue ellipse of A (which equals its Jacobian when assuming that species abundances sum to one) and r_s is the eigenvalue corresponding to the average row sum. The more negative max(r_e,r_s) - s is, the quicker the community returns to steady state. This criterium assumes that realized inter-species interaction strengths are drawn from a half normal distribution |N(0,sigma2)| (the absolute of the normal distribution). Only non-zero, non-diagonal interactions are considered to compute the mean interaction strength. The eigen method implements the classical stability criterion, which tests whether all real parts of the eigenvalues of the interaction (=Jacobian) matrix are smaller than zero.
boolean false if unstable and true if stable
Coyte et al. (2015). The ecology of the microbiome: Networks, competition, and stability. Science 350:663-666.
A=generateA(N=20) testStability(A)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.