\SweaveOpts{ eval=TRUE, prefix=FALSE, width=4, height=4, eps=FALSE, include=FALSE} \chapter{Lotka--Volterra Interspecific Competition} \label{cha:lotka-volt-intersp}\index{Lotka--Volterra!two-species~competition} Different species frequently compete for limiting resources, and as a result have negative impacts on each other. For example, change in species composition during secondary succession (Fig. \ref{fig:weeds}) appears mediated by, among other things, a species' ability to intercept light, grow, and cast shade over other species. This chapter addresses very simple ways to represent such interactions between species.\index{Buell-Small}\index{solidago@\emph{Solidago}} <>= setwd("~/Documents/Projects/Book/draft/Chap05") rm(list=ls()) badfonts = FALSE .detach.stuff = function() { s1 = grep("package|Autoloads",search()) nattach = length(search()) xattach = search()[c(-1,-s1)] for (i in xattach) eval(substitute(detach(i),list(i=i))) } .detach.stuff() ## ps.options(family="NimbusSan") ps.options(colormodel="cmyk") options(width=75, SweaveHooks=list(fig=function() par(mar=c(5,4,.5,1.5))) ) ## palette(gray((0:8)/8)) library(lattice) trellis.par.set(canonical.theme(color=FALSE)) myQ <- function(w=4,h=4, mr = c(5,4,.5,1.5)) { quartz(width=w,height=h) par(mar=mr) } <>= #weeds <- read.csv("OldfieldPerennials.csv") library(primer) data(weeds) #trellis.device(color=F, width=5, height=5) print( xyplot(Cover~ Age, groups=Species, data=weeds, main="Oldfield Succession", #subset=Age < 20, lwd=2, ylim=c(2,13), xlim=c(2,21), #lty=c(1,1,3,2,4,5), lwd=c(1,2,1,2,1,1), xlab="Age (years)", scales=list(tck=c(1,0), y=list(at=seq(0,14,by=2) ), x=list(at=seq(0,25, by=5)) ), auto.key=list(points=F, columns=2, lines=T), # legend=list("inside"), type=c('smooth'), ylab="Percent Cover") ) @ \begin{figure}[h] \centering \includegraphics[width=.6\textwidth]{weeds5} \caption{Changes in abundances of six species of \emph{Aster}, \emph{Euthamia}, and \emph{Solidago} during early secondary succession. This turnover of perennial weeds appears mediated by competition for light, among other factors \cite{Bazzaz1996} (data from the long-term Buell-Small Succession study [http://www.ecostudies.org/bss/]).} \label{fig:weeds} \end{figure} \section{Discrete and Continuous Time Models} Chapter 3 (Density-dependent Growth) was built upon the assumption that individuals \emph{within a single population} had negative effects on each other. Here we assume that individuals of different species also have negative effects on each other. This negative effect may arise as a direct effect via their behavior, or indirect effects via their uptake of limiting resources. In this chapter, we learn how to keep track of two species that compete, that is, that have mutually negative effects upon each other. We begin with a model of discrete growth, and then switch to a continuous growth model. \subsection{Discrete time model} We pick up from Chapter 3 with the discrete logistic growth model \begin{equation} \label{eq:ch4.disc.log.gro} N_{t+1}=N_{t}+r_{d}N_{t}\left(1-\alpha N_{t}\right) \end{equation} where the population size in one year, $N_{t+1}$, is equal to the previous year's population size, $N_t$, plus a growth increment. That growth increment includes a proportional change, the discrete growth factor, $r_{d}$. Last, we have the density dependence term, $(1-\alpha N_t)$, in which $\alpha$ is the per capita effect of each individual upon all other individuals.\index{$\alpha$|see{competition coefficient}} In Part 1 of this book, per capita effects on growth rates attempted to encapsulate simulataneously all factors in the life of an organism that influence the growth of that population. Here we make explicit one of those many other negative impacts by adding another per capita effect --- we add the negative effect of another, competing, species. If members of a species' own population can have a per capita negative effect, then certainly individuals of other species might have per capita negative effects. Because we have two species, we now have to keep track of their particular populations and per capita effects using subscripts. We now have \begin{equation} \label{eq:ch5.pop1} N_{1,t+1}=N_{1,t}+r_{1,d}N_{1,t}\left(1-\alpha_{11} N_{1,t} - \alpha_{12} N_{2,t}\right), \end{equation} where $\alpha_{11}$ is the effect that an individual of species 1 has on its own growth rate, and $\alpha_{12}$ is the effect that an individual of species 2 has on the growth rate of species 1 (Fig. \ref{fig:ic1}). Now that we are including a second population, we need an equation describing the dynamics of that population \begin{equation} \label{eq:ch5.pop2} N_{2,t+1}=N_{2,t}+r_{2,d}N_{2,t}\left( 1 - \alpha_{21} N_{1,t} - \alpha_{22} N_{2,t} \right), \end{equation} where $\alpha_{21}$ is the per capita effect of species 1 on species 2, and $\alpha_{22}$ is the per capita effect that species 2 has on itself (Fig. \ref{fig:ic1}).\index{competition coefficient!two species}\index{competition coefficient|see{logistic growth}} \medskip \noindent \begin{boxedminipage}{\linewidth} {\footnotesize \paragraph{Code for a model of discrete logistic competition} This will calculate $N_{t+1}$, given $N_t$, $r_d$ and a matrix of competition coefficients $\boldsymbol{\alpha}$. <<>>= dlvcomp2 <- function(N, alpha, rd=c(1,1)) { N1.t1 <- N[1] + rd[1] * N[1] * (1 - alpha[1,1]*N[1] - alpha[1,2]*N[2]) N2.t1 <- N[2] + rd[2] * N[2] * (1 - alpha[2,1]*N[1] - alpha[2,2]*N[2]) c(N1.t1, N2.t1) } @ Note the indices for \texttt{alpha} match the subscripts in eqs. \ref{eq:ch5.pop1}, \ref{eq:ch5.pop2}. } \end{boxedminipage} \medskip \subsection{Effects of $\alpha$} Before proceeding it might be good to understand where these subscripts come from. Why are they read from right to left --- why not left to right? As we saw in Chapter 2, \index{competition coefficient!subscripts}it comes from the underlying linear algebra used to work with all these equations. We define all of the $\alpha$'s together as a matrix, \begin{equation} \label{eq:alphD} \bm{\alpha} = \begin{pmatrix} \alpha_{11} & \alpha_{12} \\ \alpha_{21} & \alpha_{22} \end{pmatrix} = \begin{pmatrix} 0.010 & 0.005\\ 0.008 & 0.010 \end{pmatrix} \end{equation} The subscripts on the $\alpha$s represent the row and column of the coefficient; $\alpha_{12}$ is in the first row, second column. This merely reflects how mathematicians describe matrix elements and dimensions --- row $\times$ column. When we use matrix multiplication (Chapter 2), $\alpha_{12}$ becomes the effect of species 2 (column) on species 1 (row). In this case, $\alpha_{11}=\alpha_{22}=0.01$, $\alpha_{21}=0.008$, and $\alpha_{12}=0.005$. Thus, both species have greater effects on themselves than on each other. Remember, the larger the $\alpha$, the larger the effect. \begin{figure}[ht] \centering \includegraphics[width=.5\linewidth]{InterComp5} \caption{Discrete population growth of two competing species. Both species have the same intraspecific competition coefficient, $\alpha_{ii}=0.01$. In the absence of interspecific competition, both species would reach $K$. However, they both have negative effects on each other ($\alpha_{ij} >0$), and species 1 (solid line) has a greater negative effect on species 2 ($\alpha_{21} > \alpha_{12}$). \label{fig:ic1}} \end{figure} You can think of a row of coefficients as part of a growth rate equation that includes those coefficients, so row 1 represents the equation governing the growth rate of species 1, and using $\alpha_{11}$ and $\alpha_{12}$. In general, we can refer to the intraspecific coefficients as $\alpha_{ii}$ and the interspecific coefficients as $\alpha_{ij}$. If we model two species using $\bm{\alpha}$ above (eq. \eqref{eq:alphD}), we can see the negative effects of interspecific competition (Fig. \ref{fig:ic1}). Species 1 (solid line, Fig. \ref{fig:ic1}) has a larger negative affect on species 2 than species 2 has on species 1. As a result, species 1 is able to maintain a positive growth rate at higher population sizes, and thereby grow to a larger $N$ than can species 2. Put another way, species 1 suppresses species 2 to a larger degree than vice versa. Nonetheless, each has a smaller effect on the other than either does on itself ($\alpha_{ij} < \alpha_{ii}$). \medskip \noindent \begin{boxedminipage}{\linewidth} {\footnotesize \paragraph{Discrete logistic competition dynamics (Fig. \ref{fig:ic1})} First we specify the matrix of $\alpha$'s, the effects each species has on itself and each other, the initial paopulation sizes, and the number of time steps. <<>>= alphs <- matrix(c( .01, .005, .008, .01), ncol=2, byrow=TRUE) t <- 20 @ We then create a matrix to hold the results, put in the initial population sizes, and project the populations. <<>>= N <- matrix(NA, nrow=t+1, ncol=2) N[1,] <- c(10,10) for(i in 1:t) N[i+1,] <- dlvcomp2(N[i,], alphs) @ At last, we can plot the populations, adding a reference line for the size of the populations, if there were only one species, at $K_i=1/\alpha_{ii}$. <>= matplot(0:t, N, type='l', col=1, ylim=c(0,110)) abline(h=1/alphs[1,1], lty=3) text(0, 1/alphs[1,1], "K", adj=c(0,0)) legend("right", c(expression("Sp.1 "*(alpha[21]==0.008)), expression("Sp.2 "*(alpha[12]==0.005))), lty=1:2, bty='n') @ } \end{boxedminipage} \medskip \subsection{Continuous time model} Perhaps the classic model of competitive interactions is the continuous Lotka-Volterra model of interspecific competition \cite{Kingsland:1985kx}. Following directly the structure of the discrete version, we represent the two species as \begin{align} \frac{\D N_1}{\D t}&=r_1N_1\left(1-\alpha_{11}N_1-\alpha_{12}N_2\right) \label{eq:N2a}\\ \frac{\D N_2}{\D t}&=r_2N_2\left(1-\alpha_{21}N_1-\alpha_{22}N_2\right) \label{eq:N2b} \end{align} where we interpret all the parameters as the instantaneous rates analogous to the parameters in the discrete version above, but with different units, because the effects are instantaneous, rather than effects over a given time interval (Table \ref{tab:cc}). \begin{table}[ht] \centering \caption{Parameters of the continuous 2 species Lotka-Volterra competition model. The rest of the chapter explains the meaning and motivation.} \label{tab:cc} \begin{tabular}{cp{10cm}} \hline \hline Parameter~& Description \\ \hline $r_i$ & Instantaneous rate of increase; intrinsic rate of growth; individuals produced per individual per unit time. \\ $\alpha_{ii}$ & Intraspecific density dependence; intraspecific competition coefficient; the negative effect of an individual of species $i$ on its own growth rate. \\ $\alpha_{ij}$ & Interspecific density dependence; interspecific competition coefficient; the effect of interspecific competition; the negative effect that an individual of species $j$ has on the growth rate of species $i$.\\ $K_i$ & $1/\alpha_{ii}$; \emph{carrying capacity} of species $i$; the population size obtainable by species $i$ in the absence of species $j$.\\ $\alpha'_{ij}$ & $\alpha_{ij}/\alpha_{ii}$; the relative importance of interspecific competition.\\ $\beta_{ij}$ & $\alpha_{ij}/\alpha_{jj}$; the \emph{invasion criterion} for species $i$; \index{$\beta_{ij}$|see{competition coefficient, invasion criterion}}\index{$\beta_{ij}$}the relative importance of interspecific competition; the importance of the effect of species $j$ on species $i$ relative to the effect of species $j$ on itself; see sec. 5.3.5.\\ \hline \end{tabular} \end{table} \medskip \noindent \begin{boxedminipage}{\linewidth} {\footnotesize \paragraph{Continuous logistic competition} Here we simply write the code for 2-species Lotka-Volterra competition. <<>>= lvcomp2 <- function(t, n, parms) { with(as.list(parms), { dn1dt <- r1*n[1]*(1-a11*n[1] - a12*n[2]) dn2dt <- r2*n[2]*(1-a22*n[2] - a21*n[1]) list(c(dn1dt, dn2dt)) } ) } @ We could then use this to numerically integrate the dynamics, using \texttt{ode} in the \texttt{deSolve} package, and plot it (graph not shown). <<>>= library(deSolve) parms <- c(r1=1, r2=.1, a11=.2, a21=0.1, a22=0.02, a12=0.01); initialN <- c(2,1) out <- ode(y=initialN, times=1:100, func=lvcomp2, parms=parms) matplot(out[,1],out[,-1], type='l') @ } \end{boxedminipage} \medskip These equations are also commonly represented using carrying capacity, $K_i$, to summarize intraspecific effects on abundance, and coefficients to modify the intraspecific effects quantified with $K_i=1/\alpha_{ii}$. This representation looks like \begin{align} \frac{\D N_1}{\D t}&=r_1N_1\left(\frac{K_1-N_1-\alpha'_{12}N_2}{K_1}\right) \label{eq:K1}\\ \frac{\D N_2}{\D t}&=r_2N_2\left(\frac{K_2-N_2-\alpha'_{21}N_1}{K_2}\right). \label{eq:K2} \end{align} In this version, $K_1=1/\alpha_{11}$, and \emph{note that $\alpha'_{12}$ differs from $\alpha_{12}$}. The $\alpha'_{12}$ in eq. \ref{eq:K1} merely modifies the effect of $1/K_1$. It turns out the $\alpha'_{1,2}$ is equal to the \emph{ratio} of the interspecific and intraspecific per capita effects, or \begin{align} \alpha_{12}&=\frac{\alpha'_{12}}{K_1}\notag\\ \alpha'_{12}&=\frac{\alpha_{12}}{\alpha_{11}}. \end{align} Another useful measure of the relative importance of interspecific competition is $\beta_{ij}=\alpha_{ij}/\alpha_{jj}$ (see \emph{Invasion criteria}, below). \section{Equilbria} In this section, we describe how we find equilibria in a simple multispecies model, by solving the growth equations for zero, much the way we did in Chapters 3 and 4. We begin with \emph{isoclines}, and move on to \emph{boundary and internal equilibria} and \emph{invasion criteria}. \subsection{Isoclines} An \index{isoclines!two species, Lotka--Volterra}isocline is, in general, a line connecting points on a graph or map that have equal value. For instance, a topographic map has elevation isoclines, connecting points of equal elevation. Here, our isoclines will connect points in state space at which the growth rate for species $i$ equals zero --- every point on that line will represent $\dot{N}_i=0$. We call these \emph{zero net growth isoclines}. A \emph{\index{zero net growth isocline|see{isocline}}zero net growth isocline}, typically referred to simply as an \emph{isocline} or \index{ZNGI|see{isocline}}ZNGI, is the set of all points for which the growth of a population is zero, when all else (such as the population size of a competing species) is held constant. An \emph{equilibrium} is one (or sometimes more than one) of those points, and in particular, it is a point at which the growth rates of \emph{all} populations are zero. You saw in Chapter 3 that the carrying capacity of a single species logistic population is an equilibrium. With two species, it gets a tad trickier. We find the isocline of a species by setting its growth rate equal to zero and solving the equation for that species in terms of the other species. As an example, let's focus on $N_2$ and solve for its zero net growth isocline. We find below that there is a straight line that describes all points for which $\D N_2/dt=0$, if $N_1$ were held constant. We start by setting eq. \ref{eq:N2b} to zero, and solving for $N_2$. \begin{equation} \begin{split} \frac{\D N_2}{\D t}&=r_2N_2\left(1-\alpha_{21}N_1-\alpha_{22}N_2\right) \\ 0 &=r_2N_2\left(1-\alpha_{21}N_1-\alpha_{22}N_2\right)\\ 0 &= 1-\alpha_{21}N_1-\alpha_{22}N_2\\ N_2 &=\frac{1}{\alpha_{22}} - \frac{\alpha_{21}}{\alpha_{22}}N_1 . \label{eq:N2iso} \end{split} \end{equation} Recall that the formula for a straight line is $y=mx + b$ where $m$ is the slope and $b$ is the intercept on the $y$ axis. We can see that the expression for $N_2$ in eq. \ref{eq:N2iso} is a straight line, where $y=N_2$, $m= \alpha_{21}/\alpha_{22}$, and $b=1/\alpha_{22}$ (Fig. \ref{fig:Nison2}). When $N_1$ is zero, $N_2=1/\alpha_{22}$. This is precisely what we saw in Chapter 3 (logistic growth), that a single species logistic population has an equilibrium at its carrying capacity, $K=1/\alpha$. The isocline (Fig. \ref{fig:Nison2}) shows that as the competitor's population size, $N_1$, becomes larger, $N_2$ declines by $\alpha_{21}/\alpha_{22}$ for each additional individual of the competing species 1, until finally $N_2=0$ when $N_1=1/\alpha_{21}$. \begin{figure}[H] \centering \subfloat[Species 2 isocline]{\includegraphics[width=.48\textwidth]{N2iso.pdf}\label{fig:Nison2}} \subfloat[Species 1 isocline]{\includegraphics[width=.48\textwidth]{N1iso.pdf}\label{fig:Nison1}}\\ \caption{Phase plane plots of each of the two competing species, with Lotka-Volterra zero growth isoclines. Arrows indicate independent population trajectories.} \label{fig:Niso1} \end{figure} \medskip \noindent \begin{boxedminipage}{\linewidth} {\footnotesize \paragraph{Graphing an Isocline} Here we graph something similar, but not identical, to Fig. \ref{fig:Nison2}. First, we define a new matrix of competition coefficients, where $\alpha_{11}=\alpha_{22} > \alpha_{12}=\alpha_{21}$. <<>>= a <- matrix(c( 0.01, 0.005, 0.005, 0.01), ncol=2, byrow=TRUE) @ We create an expression to plot the $N_2$ isocline, as a function of possible values of $N_1$. <<>>= N2iso <- expression(1/a[2,2] - (a[2,1]/a[2,2])*N1) @ We then specify $N_1$, and then evaluate and plot $N_2$. <<>>= N1 <- 0:200 plot(N1, eval(N2iso), type='l', ylim=c(0, 200), xlim=c(0, 200), ylab=expression("N"[2])) @ We add arrows to remind us of what happens if $N_2$ is above or below the value on the isocline. <<>>= arrows(x0=90, y0=150, x1=90, y1=80, length=0.1) arrows(x0=75, y0=0, x1=75, y1=50, length=0.1) @ } \end{boxedminipage} \medskip\ The isocline for $N_2$ (Fig. \ref{fig:Nison2}) is the line at which $\D N_2/\D t =0$ \emph{for a fixed value of $N_1$}. Just as in the single species logistic growth model, if $N_2$ exceeds its equilibrium, it declines, and if $N_2$ is less than its equilibrium, it grows. The isocline (Fig. \ref{fig:Nison2}) is the set of balance points between positive and negative growth. This is reflected in the arrows in Fig. \ref{fig:Nison2} --- if the $N_2$ is ever above this isocline, it declines and if it is ever below this isocline, it rises. This isocline shows that whether $N_2$ increases or decreases depends on $N_1$. <>= a <- matrix(c( 0.01, 0.005, 0.005, 0.01), ncol=2, byrow=TRUE) myQ() curve(1/a[2,2] - (a[2,1]/a[2,2])*x, 0, 1/a[2,1], axes=FALSE, lty=2, ylim=c(0, max(1/a[2,2], 1/a[1,2])), xlim=c(0, max(1/a[1,1], 1/a[2,1])), ylab=expression("N"[2]), xlab=expression("N"[1]), pty="s" ) box() axis(1, c(0, 1/a[1,1], 1/a[2,1]), c(0, expression(1/alpha[11]),expression(1/alpha[21])) ) axis(2, c(0, 1/a[2,2], 1/a[1,2]), c(0, expression(1/alpha[22]),expression(1/alpha[12])) ) arrows(c(75, 175), c(150,150), lty=2, c(75,175), c(80,45), length=0.12) arrows(c(25, 125), c(5, 5), lty=2, c(25,125), c(55, 20), length=0.12) dev.print(pdf, "N2iso.pdf") ### N1 isocline ### To graph this isocline, we have to solve the N1 isocline ### for N2 merely because N2 happens to be on the y axis myQ() #quartz(width=5.5/2.54, height=6.5/2.54) curve(1/a[1,2] - (a[1,1]/a[1,2])*x, 0, 1/a[1,1], axes=FALSE, ylim=c(0, max(1/a[2,2], 1/a[1,2])), xlim=c(0, max(1/a[1,1], 1/a[2,1])), ylab=expression("N"[2]), xlab=expression("N"[1]),pty='s' ) axis(1, c(0, 1/a[1,1], 1/a[2,1]), c(0, expression(1/alpha[11]),expression(1/alpha[21])) ) axis(2, c(0, 1/a[2,2], 1/a[1,2]), c(0, expression(1/alpha[22]),expression(1/alpha[12])) ) box() arrows(c(150,150), c(75, 175), c(80,45), c(75,175), length=0.12) arrows( c(5, 5), c(25, 125), c(55, 20), c(25,125), length=0.12) dev.print(pdf, "N1iso.pdf") @ By analogy, the isocline for species 1 turns out to be \begin{align} N_1 &=\frac{1}{\alpha_{11}} - \frac{\alpha_{12}}{\alpha_{11}}N_2. \label{eq:N1iso} \end{align} Note that these isoclines are merely equations for straight lines, and it is easy to do nonsensical things, such as specify coefficients that result in negative population sizes. Therefore, let us proceed with some thoughtfulness and care. \subsection{Finding equilibria} By themselves, the isoclines tell us that if species 2 becomes extinct ($N_2=0$), then species 1 reaches its carrying capacity ($N_1=1/\alpha_{11}$) (Fig. \ref{fig:Nison1}). Similarly, if $N_1=0$, then $N_2=1/\alpha_{22}$. These are important equilibria, because they verify the internal consistency of our logical, and they provide end-points on our isoclines. {\em If the species coexist ($N_1,\,N_2 >0$) it means that they must share one or more points on their isoclines} --- such an equilibrium is the point where the lines cross \index{isoclines!interspecific competition}. We find these equilibria by solving the isoclines simultaneously. A simple way to do this is to substitute the right hand side of the $N_2$ isocline (eq. \ref{eq:N2iso}) in for $N_2$ in the $N_1$ isocline (eq. \ref{eq:N1iso}). That is, we substitute an isocline of one species in for that species' abundance in another species' isocline. Combining eqs. \ref{eq:N2iso} and \ref{eq:N1iso}, we get \begin{align} N_1 &=\frac{1}{\alpha_{11}} - \frac{\alpha_{12}}{\alpha_{11}}\left(\frac{1}{\alpha_{22}} - \frac{\alpha_{21}}{\alpha_{22}}N_1 \right)\notag\\ N_1 &=\frac{1}{\alpha_{11}} - \frac{\alpha_{12}}{\alpha_{11}\alpha_{22}}+ \frac{\alpha_{12}\alpha_{21}}{\alpha_{11}\alpha_{22}}N_1 \notag\\ N_1\left(1-\frac{\alpha_{12}\alpha_{21}}{\alpha_{11}\alpha_{22}}\right)&= \frac{\alpha_{22}-\alpha_{12}}{\alpha_{11}\alpha_{22}} \notag\\ N_1^*&=\frac{\alpha_{22}-\alpha_{12}}{\alpha_{11}\alpha_{22}-\alpha_{12}\alpha_{21}}\label{eq:lvn1eq} \end{align} When we do this for $N_2$, we get \begin{align} N_2^*&=\frac{\alpha_{11}-\alpha_{21}}{\alpha_{22}\alpha_{11}-\alpha_{12}\alpha_{21}}\label{eq:lvn2eq} \end{align} We now have the values for $N_1^*$ and $N_2^*$ at the point at which their isoclines cross (Fig. \ref{lvisob}). These equilibria apply only when isoclines cross within feasible state space. The expressions for $N_1^*$ and $N_2^*$ look pretty complicated, but can we use them to discern an intuitive understanding for species 1? First, we see that $r_i$ is not in the expressions for the equilibria --- they do not depend on $r_i$. It is important to remember that this intrinsic rate of increase is not germaine to the long term equilibria for the two species model. Second, we can confirm that as interspecific competition intensity falls to zero ($\alpha_{12}=\alpha_{21}=0$), each species reaches its own carrying capacity. That is, when putative competitors occupy sufficiently different niches and no longer compete, then they both reach their own carrying capacities. We can also say something a little less obvious about species 1. What happens when the negative effect of the competitor, $N_2$, starts to increase, that is, as $\alpha_{12}$ gets bigger? Or, put more obtusely but precisely, let's find \begin{equation} \label{eq:1} \lim_{\alpha_{12} \to \infty}\frac{\alpha_{22}-\alpha_{12}}{\alpha_{22}\alpha_{11}-\alpha_{12}\alpha_{21}} \end{equation} that is, find the limit of the equilibrium (eq. \ref{eq:lvn1eq}) as $\alpha_{12}$ gets very large. Well, the $\alpha_{ii}$ become effectively zero because $\alpha_{12}$ gets so big. This leaves $-\alpha_{12}/(-\alpha_{12}\alpha_{21})=1/\alpha_{21}$. Huh? This means simply that as the negative effect of the competitor increases, the abundance of species 1 becomes increasingly dependent upon $\alpha_{21}$, its negative effect on its competitor. Thus we have an arms race: as the negative effect of its competitor increases, the abundance of a species depends increasingly on its ability to suppress the competitor. Summarizing, we see that in the absence of interspecific competition, species are attracted toward their carrying capacities. Second, if interspecific competition is intense, then a species' carrying capacity becomes less important, and its abundance is increasingly determined by its ability to suppress its competitor. \subsubsection{Coexistance --- the \index{invasion criterion}invasion criterion} Based on the numerators in eqs. \ref{eq:lvn1eq} and \ref{eq:lvn2eq}, it seems that $N_1^*$ and $N_2^*$ may both be greater than zero whenever $\alpha_{ii}-\alpha_{ji} >0$. This is, indeed, the case. Below we step through the analysis of what we refer to as the ``invasion criterion,'' which specifies the conditions for $N_i^* > 0$. In general, the details of any model and its dynamics may be quite complicated, but as long as we know whether a species will always \emph{\index{increase when rare|see{invasion criterion}}increase when it is rare}, or \emph{invade},\footnote{Note that ecologists who study invasion of exotic species may use the word ``invade'' to mean the successful dispersal to, establishment and spread at a site. This incorporates a tremendous amount of species- or system-specific biology. Here we mean ``invasion'' in only a much more strict or narrow sense --- to increase when rare.} then we know whether it can persist in the face of complex interactions. Thus we don't need to find its equilibrium, but merely its behavior near zero. How do we determine whether a species can increase when rare? Let's explore that with the Lotka-Volterra competition model. We can start by examining species 1's growth equation \begin{equation*} \label{eq:coex1} \frac{\D N_1}{\D t}=r_1N_1\left(1-\alpha_{11}N_1-\alpha_{12}N_2\right). \end{equation*} From this we can see that in the absence of any density dependence ($\alpha=0$) and assuming $r_1>0$, and $N_1>0$, the population grows exponentially. Further, we can see that $\D N/\D t >0$ as long as $\left(1-\alpha_{11}N_1-\alpha_{12}N_2\right)>0$. Therefore, let's examine this expression for density dependence and see what it looks like as $N_1$ gets very close to zero. We start by expressing $\D N_1 / \D t$ completely in terms of $N_1$ and $\alpha$. We do this by substituting $N_2$'s isocline (eq. \ref{eq:N2iso}) in place of $N_2$ in eq. \ref{eq:coex1}. We then solve this for any growth greater than zero. \begin{align} 0&< \left(1-\alpha_{11}N_1-\alpha_{12}N_2\right)\notag\\ 0&<\left(1-\alpha_{11}N_1-\alpha_{12}\left(\frac{1}{\alpha_{22}}-\frac{\alpha_{21}}{\alpha_{22}}N_1\right)\right) \label{eq:N1crit1} \end{align} Now --- what is the value of eq. \ref{eq:N1crit1} as $N_1 \to 0$? We can substitute 0 for $N_1$, and eq. \eqref{eq:N1crit1} becomes \begin{align} 0&<\left(1-\alpha_{12}\left(\frac{1}{\alpha_{22}}\right)\right) \notag\\ 0&<1-\frac{\alpha_{12}}{\alpha_{22}}\notag\\ \alpha_{12}&<{\alpha_{22}}.\label{eq:N1criterion} \end{align} What is this saying? It is saying that as long as $\alpha_{12}<\alpha_{22}$, then our focal species can persist, increasing in abundance from near zero --- $N_1$ \emph{will increase when rare}, that is, it will successfully invade (Fig. \ref{lvisob}). For two species to both persist, or coexist, it must be that case that \begin{equation*} \alpha_{12}<\alpha_{22} \quad , \quad \alpha_{21}<\alpha_{11} . \label{eq:N1criterion} \end{equation*} Simply put, \emph{for species to coexist stably, their effects on themselves must be greater than their effects on each other} (Fig. \ref{lvisob}). \subsubsection{Other equilibria} Given our isoclines and equilibria above, what other logical combinations might we see, other than coexistence? Here we list others, and provide graphical interpretations (Fig. \ref{fig:LVIsoclines}). \paragraph{Species 1 can invade when rare, but species 2 cannot (Fig. \ref{lviso1}).} \begin{equation*} \alpha_{12} < \alpha_{22} \quad,\quad \alpha_{21}>\alpha_{11} \end{equation*} This leads to competitive exclusion by species 1 --- species 1 wins. This is referred to as a \emph{boundary equilibrium}, because it is on the boundary of the state space for one species. Equilibria where all $N_i>0$ are referred to as \emph{internal equilibria}. \paragraph{Species 1 cannot invade when rare, but species 2 can (Fig. \ref{lviso2}). } \begin{equation*} \alpha_{12}>\alpha_{22} \quad,\quad \alpha_{21}<\alpha_{11} \end{equation*} This leads to competitive exclusion by species 2 --- species 2 wins. This is the other boundary equilibrium. Note that for both this and the previous boundary equilibrium, the equilibrium equations (eqs. \ref{eq:lvn1eq}, \ref{eq:lvn2eq}) can return $N^*$ that are negative or too large ($>K$). Recall that these equations derive from simple equations of straight lines, and do not guarantee that they are used sensibly --- equations aren't dangerous, theoreticians who use equations are dangerous. \paragraph{Neither species can invade when rare (Fig. \ref{lviso0}).} \begin{equation*} \alpha_{12} > \alpha_{22} \quad,\quad \alpha_{21} > \alpha_{11} \end{equation*} This creates an unstable internal equilibrium --- exclusion will occur, but either species could win. This condition is sometimes referred to as \emph{founder control} \cite{Bolker2003a} because the identity of the winner depends in part on the starting abundances. It creates a \emph{\index{saddle}saddle} in state space. What the heck is a saddle? More on that below. It suffices to say that from some directions, an saddle attracts the trajectories of the populations, while from other directions, it repels the trajectories.\footnote{The topography of mountain ranges can include saddles, which are precisely the context in which we use ``saddle'' here. Search the web for Saddleback Mountain, New York, USA, Lat/Long: 44$^\circ$ 8' N; 73$^\circ$ 53' W. See also pictures of horse saddles --- same shape.} <>= ### Isoclines for combinations of invasion criteria ### Both isoclines on the same graph a <- matrix(c( 0.01, 0.005, 0.005, 0.01), ncol=2, byrow=TRUE) myQ() #quartz(width=55/2.54, height=6.5/2.54) plot( (a[2,2]-a[1,2])/(a[2,2]*a[1,1] - a[1,2]*a[2,1]), (a[1,1]-a[2,1])/(a[2,2]*a[1,1] - a[1,2]*a[2,1]), cex=2, pch=1, col=1, axes=FALSE, ylim=c(0, max(1/a[2,2], 1/a[1,2])), xlim=c(0, max(1/a[1,1], 1/a[2,1])), ylab=expression("N"[2]), xlab=expression("N"[1]), pty='s') curve(1/a[2,2] - (a[2,1]/a[2,2])*x, 0, 1/a[2,1], add=TRUE, lty=2) curve(1/a[1,2] - (a[1,1]/a[1,2])*x, 0, 1/a[1,1], add=T) axis(1, c(0, 1/a[1,1], 1/a[2,1]), c(0, expression(1/alpha[11]),expression(1/alpha[21])) ) axis(2, c(0, 1/a[2,2], 1/a[1,2]), c(0, expression(1/alpha[22]),expression(1/alpha[12])) ) box() arrows(c(25,25,25), c(25,25,25), c(25,50,50), c(50,25,50), col=1, length=.12, lwd=c(1,1,2), lty=c(2,1,1)) arrows(c(150,150,150), c(150,150,150), c(150,120, 120), c(120,150,120), col=1, length=.12, lwd=c(1,1,2), lty=c(2,1,1)) arrows(c(10, 10, 10), c(125,125,125), c(10,30,30), c(105,125,105), length=0.12, col=1, lwd=c(1,1,2), lty=c(2,1,1)) arrows(c(125,125,125), c(10, 10,10), c(125,105,105), c(30,10,30), length=0.12, col=1, lwd=c(1,1,2), lty=c(2,1,1)) dev.print(dev=pdf, file="LVisocline1.pdf") ### Stable coexistence SEE ABOVE ### Species 2 can invade , species one cannot. myQ() a <- matrix(c( 0.01, 0.02, 0.005, 0.01), ncol=2, byrow=TRUE) curve(1/a[2,2] - (a[2,1]/a[2,2])*x, 0, 1/a[2,1], lwd=1, lty=2, axes=FALSE, ylim=c(0, max(1/a[2,2], 1/a[1,2])), xlim=c(0, max(1/a[1,1], 1/a[2,1])), ylab=expression("N"[2]), xlab=expression("N"[1])) curve(1/a[1,2] - (a[1,1]/a[1,2])*x, 0, 1/a[1,1], add=T) axis(1, c(0, 1/a[1,1], 1/a[2,1]), c(0, expression(1/alpha[11]),expression(1/alpha[21])) ) axis(2, c(0, 1/a[2,2], 1/a[1,2]), lwd=1, c(0, expression(1/alpha[22]),expression(1/alpha[12])) ) box() xs <- c(1, 1, .4, .4) * a[1,1]^-1 ys <- c(.2, .4, .4, .7)*a[2,2]^-1 arrows(xs[1:3], ys[1:3], xs[2:4], ys[2:4], lty=2:1, lwd=c(1,1), length=0.12) points(0,1/a[2,2], cex=2) dev.print(dev=pdf, file="LVisocline2wins.pdf") ### Species 1 can invade , species 2 cannot. myQ() a <- matrix(c( 0.01, 0.005, 0.02, 0.01), ncol=2, byrow=TRUE) curve(1/a[2,2] - (a[2,1]/a[2,2])*x, 0, 1/a[2,1], lwd=1, lty=2, axes=FALSE, ylim=c(0, max(1/a[2,2], 1/a[1,2])), xlim=c(0, max(1/a[1,1], 1/a[2,1])), ylab=expression("N"[2]), xlab=expression("N"[1])) curve(1/a[1,2] - (a[1,1]/a[1,2])*x, 0, 1/a[1,1], add=T) box() axis(1, c(0, 1/a[1,1], 1/a[2,1]), c(0, expression(1/alpha[11]),expression(1/alpha[21])) ) axis(2, c(0, 1/a[2,2], 1/a[1,2]), c(0, expression(1/alpha[22]),expression(1/alpha[12])) ) ys <- c(1, 1, .4, .4) * a[1,1]^-1 xs <- c(.2, .4, .4, .7)*a[2,2]^-1 arrows(xs[1:3], ys[1:3], xs[2:4], ys[2:4], lty=1:2, lwd=c(1,1), length=0.12) points(1/a[1,1],0, cex=2) dev.print(dev=pdf, file="LVisocline1wins.pdf") ### Neither species can invade , yet an unstable equilbrium -- a saddle point attractor-repellor -- exists. myQ() a <- matrix(c( 0.01, 0.02, 0.02, 0.01), ncol=2, byrow=TRUE) curve(1/a[2,2] - (a[2,1]/a[2,2])*x, 0, 1/a[2,1], lty=2, axes=FALSE, ylim=c(0, max(1/a[2,2], 1/a[1,2])), xlim=c(0, max(1/a[1,1], 1/a[2,1])), ylab=expression("N"[2]), xlab=expression("N"[1])) curve(1/a[1,2] - (a[1,1]/a[1,2])*x, 0, 1/a[1,1], add=T) box() axis(1, c(0, 1/a[1,1], 1/a[2,1]), c(0, expression(1/alpha[11]),expression(1/alpha[21])) ) axis(2, c(0, 1/a[2,2], 1/a[1,2]), c(0, expression(1/alpha[22]),expression(1/alpha[12])) ) pxys <- matrix(c(.13,.1,.25,.1, .1,.13,.1,.25, .115,.115,.25,.25, .7,.8,.4,.8, .8,.7,.8,.4, .75,.75,.4,.4, .25,.4,.1, .6, .4,.25,.6, .1), nc=4, byrow=T) xys <- pxys xys[,1:2] <- a[1,1]^-1 * pxys[,1:2] xys[,3:4] <- pxys[,3:4] * a[2,2]^-1 arrows(xys[,1], xys[,2], xys[,3], xys[,4], lty=c(1,2,3,1,2,3,2,1), lwd=c(1), length=0.12) n2star <- (a[1,1] - a[2,1])/(a[1,1]*a[2,2] - a[1,2]*a[2,1]) n1star <- (a[2,2] - a[1,2])/(a[1,1]*a[2,2] - a[1,2]*a[2,1]) points(n1star,n2star, cex=2) dev.print(dev=pdf, file="LVisocline0win.pdf") @ \begin{figure}[h] \centering \subfloat[Stable coexistence] {\includegraphics[width=.49\linewidth]{LVisocline1}\label{lvisob}} \subfloat[Species 1 wins] {\includegraphics[width=.49\linewidth]{LVisocline1wins}\label{lviso1}}\\ \subfloat[Species 2 wins] {\includegraphics[width=.49\linewidth]{LVisocline2wins}\label{lviso2}} \subfloat[Founder wins] {\includegraphics[width=.49\linewidth]{LVisocline0win}\label{lviso0}} \caption{Phase plane diagrams of Lotka-Volterra competitors under different invasion conditions. Horizontal and vertical arrows indicate directions of attraction and repulsion for each population (solid and dased arrows); diagonal arrows indicate combined trajectory. Circles indicate equilibria; additional boundary equilibria can occur whenever one species is zero.} \label{fig:LVIsoclines} \end{figure} % Insert the other set of figs. \section{Dynamics at the Equilibria} Here we use eigenanalysis to analyze the properties of the equilibrium, whether they are attractors, repellers, or both, and whether the system oscillates around these equilibria. In Chapter 3, we assessed stability with the partial derivative of the growth rate, with respect to population size. If it was negative the population was stable, and the more negative the value, the shorter the return time. Here we build on this, and present a general \index{stability analysis!recipe}recipe for stability analysis \cite{Morin1999a}: \begin{compactenum} \item Determine the equilibrium abundances of each species by setting its growth equation to zero, and solving for $N$. \item Create the Jacobian matrix. This matrix represents the response of each species to changes in its own population and to changes in each other's populations. The matrix elements are the partial derivatives of each species' growth rate with respect to each population. \item Solve the Jacobian. Substitute the equilibrium abundances into the partial derivatives of the Jacobian matrix to put a real number into each element of the Jacobian matrix. \item Use the Jacobian matrix to find the behavior of the system near the equilibria. The trace, determinant, and eigenvalues of the Jacobian can tell us how stable or unstable the system is, and whether and how it cycles. \end{compactenum} \subsection{Determine the equilibria} We just did this above. Given eqs. \ref{eq:lvn1eq} and \ref{eq:lvn2eq}, we see that the $\bm{\alpha}$ determine completely $N_1^*$ and $N_2^*$. \emph{This is not true for Lotka-Volterra systems with more than two species}; such systems also depend on $r_i$. \medskip \noindent \begin{boxedminipage}{\linewidth} {\footnotesize \paragraph{Finding equilibria} We can create equations or \emph{expressions} for the equilibria, $N_1^*$ and $N_2^*$. These will be symbolic representations that we later evaluate. <<>>= N1Star <- expression( (a22-a12)/(a22*a11 - a12*a21) ) N2Star <- expression( (a11-a21)/(a22*a11 - a12*a21) ) @ Next we create the $\bm{\alpha}$ and evaluate our expressions. <<>>= a11 <- a22 <- 0.01; a12 <- 0.001; a21 <- 0.001 N1 <- eval(N1Star) N2 <- eval(N2Star) N1 @ } \end{boxedminipage} \medskip \subsection{Create the \index{Jacobian matrix}Jacobian matrix} The next step is to find each partial derivative. The partial derivatives describe how the growth rate of each species changes with respect to the abundance of each other species and with respect to its own abundance. Thus a positive value indicates that a growth rate increases as another population increases. A negative value indicates a growth rate decreases as another population increases. Here, we work through an example, explicitly deriving the partial derivative of species 1's growth rate with respect to itself. First let's expand the growth rate of species 1 (eq. \ref{eq:N2a})\footnote{Recall that the time derivative, $\D N / \D t$, can be symbolized with $\dot{N}$ (``n-dot'').} \begin{align} \frac{\D N_1}{\D t}&=\dot{N_1} =r_1N_1 - r_1\alpha_{11}N_1^2 - r_1\alpha_{12}N_2N_1. \end{align} Now we derive the \index{partial differential equation}partial differential equation (PDE)\footnote{PDEs are typically written using a fancy symbol, delta, as in $\partial F/\partial N$. For most intents and purposes, these are equivalent to ``d''.} with respect to $N_1$, \emph{treating $N_2$ as a constant}\footnote{Recall that when taking a derivative with respect to $X$, we treat all other variables as constants.} \begin{equation} \frac{\partial \dot{N_1} }{\partial N_1}=r_1 - 2r_1\alpha_{11}N_1 - r_1\alpha_{12}N_2 \end{equation} We should think of this as the per capita effect of species 1 on its growth rate. To derive the PDE with respect to $N_2$, we treat $N_1$ as a constant, and find \begin{equation} \frac{\partial \dot{N_1} }{\partial N_2}= - r_1\alpha_{12}N_1. \end{equation} This is the per capita effect of species 2 on species 1's growth rate. We then do the same for $\dot{N_2}$, and so derive the full matrix of PDE's, \begin{align} \label{eq:Jac5} \left( \begin {array}{cc} \frac{\partial \dot{N_1}}{\partial N_1}&\frac{\partial \dot{N_1}}{\partial N_2}\\ \noalign{\medskip} \frac{\partial \dot{N_2} }{\partial N_1}&\frac{\partial \dot{N_2}}{\partial N_2} \end {array} \right) = \left( \begin {array}{cc} r_1 - 2r_1\alpha_{11}N_1 - r_1\alpha_{12}N_2& - r_1\alpha_{12}N_1\\ \noalign{\medskip} - r_2\alpha_{21}N_2&r_2 - 2r_2\alpha_{22}N_2 - r_2\alpha_{21}N_1\\ \end {array} \right). \end{align} This matrix of PDE's is the Jacobian matrix, or simply the ``Jacobian.'' As differential equations, they describe the slopes of curves (i.e. the slopes of tangents of curves) at a particular point. That is, they describe the straight line interpretations as that point. As \emph{partial} differential equations, they describe how the growth rates change as population sizes change. \medskip \noindent \begin{boxedminipage}{\linewidth} {\footnotesize \paragraph{Finding partial differential equations and the Jacobian matrix} Here we create equations or \emph{expressions} for the for the growth rates, $\dot{N_1}$ and $\dot{N_2}$, and use these to find the partial derivatives. First, expressions for the growth rates: <<>>= dN1dt <- expression( r1 * N1 - r1 * a11 * N1^2 - r1 * a12 * N1 * N2 ) dN2dt <- expression(r2*N2 - r2*a22*N2^2 - r2*a21*N1*N2) @ Next, we use each expression for $\dot{N}$ to get each the partial derivatives with respect to each population size. Here we use the \R~function \texttt{D()} (see also \texttt{?deriv}). We reveal here the result for the first one only, the partial derivative of $\dot{N_1}$ with respect to itself, and then get the others. <<>>= ddN1dN1 <-D(dN1dt, "N1") ddN1dN1 @ Here we find the remaining PDE's. <<>>= ddN1dN2 <- D(dN1dt, "N2") ddN2dN1 <- D(dN2dt, "N1") ddN2dN2 <- D(dN2dt, "N2") @ Last we put these together to create the Jacobian matrix, which is itself an expression that we can evaluate again and again. <<>>= J <- expression( matrix(c(eval(ddN1dN1), eval(ddN1dN2), eval(ddN2dN1), eval(ddN2dN2)), nrow=2, byrow=TRUE) ) @ } \end{boxedminipage} \medskip \subsection{Solve the Jacobian at an equilibrium} To \emph{solve} the Jacobian at an equilibrium, we substitute the $N_i^*$ (eqs. \ref{eq:lvn1eq}, \ref{eq:lvn2eq}) into the Jacobian matrix eq. (\ref{eq:Jac5}). Refer to those equations now. What is the value of $N_1$ in terms of $\alpha_{ii}$ and $\alpha_{ij}$? Take that value and stick it in each element of the Jacobian (eq. \ref{eq:jac}). Repeat for $N_2$. When we do this, and rearrange, we get, \begin{align} \mathbf{J}= \left( \begin {array}{cc} -r_1\alpha_{11}\left(\frac{\alpha_{22}-\alpha_{12}}{\alpha_{11}\alpha_{22}-\alpha_{12}\alpha_{21}}\right)& - r_1\alpha_{12}\left(\frac{\alpha_{22}-\alpha_{12}}{\alpha_{11}\alpha_{22}-\alpha_{12}\alpha_{21}}\right)\\ \noalign{\medskip} - r_2\alpha_{21} \left(\frac{\alpha_{11}-\alpha_{21}}{\alpha_{11}\alpha_{22}-\alpha_{12}\alpha_{21}}\right)& -r_2\alpha_{22}\left(\frac{\alpha_{11}-\alpha_{21}}{\alpha_{11}\alpha_{22}-\alpha_{12}\alpha_{21}}\right)\\ \end {array} \right). \label{eq:jac} \end{align} Yikes \ldots seems a little intimidating for such a small number of species. However, it is remarkable how each element can be expressed as a product of $-r_i\alpha_{ij}N_i^*$, where $i$ refers to row, and $j$ refers to column. \medskip \noindent \begin{boxedminipage}{\linewidth} {\footnotesize \paragraph{Evaluating the Jacobian matrix} Assuming that above we selected particular $\bm{\alpha}$, used these to determine $N_1^*$ and $N_2^*$, found the PDEs and created an expression for the Jacobian matrix, and labeled everything appropriately, we can then evaluate the Jacobian at an equilibrium. For $\alpha_{ii}=0.01$ and $\alpha_{ij}=0.001$ (see above) we find <<>>= r1 <- r2 <- 1 J1 <- eval(J) J1 @ Note that all of these PDEs are negative for this equilibrium. This indicates a stable equilibrium, because it means that each population's growth rate slows in response to an increase in any other. } \end{boxedminipage} \medskip \subsection{Use the Jacobian matrix} Just the way we used eigenanalysis to understand long term asymptotic behavior of demographic matrices, we can use eigenanalysis of the Jacobian to assess the long-term asymptotic behavior of these competing Lotka-Volterra populations. We can again focus on its dominant, or leading, eigenvalue ($\lambda_1$). \emph{The dominant \index{eigenvalue!dominant}eigenvalue will be the eigenvalue with the greatest real part}, and not necessarily the eigenvalue with the greatest magnitude\footnote{This criterion is different than for demographic, discrete time projection matrices.}. In particular, the dominant eigenvalue, $\lambda_1$, may have a real part for which the magnitude, or absolute value is smaller, but which is less negative or more positive (e.g., $\lambda_1=-.01$, $\lambda_2=-1.0$). For continuous models, the dominant eigenvalue, $\lambda_1$, is approximately the rate of change of a perturbation, $x$, from an equilibrium, \begin{equation} \label{eq:2x} x_t=x_0e^{\lambda_{1}t}. \end{equation} Thus, the more negative the value, the faster the exponential decline back toward the equilibrium (i.e., toward $x=0$). We can think of the dominant eigenvalue as a ``perturbation growth rate'': negative values mean negative growth (i.e. a decline of the perturbation), and positive values indicate positive growth of the perturbation, causing the system to diverge or be repelled away from the equilibrium. In addition to the dominant eigenvalue, we need to consider the other eigenvalues. Table \ref{tab:eiginterpret} provides a summary for interpreting eigenvalues with respect to the dynamics of the system. The eigenvalues depend upon elements of the Jacobian, and values calculated from the elements, notably the determinant, the trace, and the discriminant; a similar set of rules of system behavior can be based upon these values \cite{Roughgarden1998}. For instance, the \emph{\index{Routh-Hurwitz criteria}Routh-Hurwitz criterion} for stability tells us that a two-species equilibrium will be locally stable, only if $\mathbf{J_{11}} + \mathbf{J_{22}} < 0$ and if $\mathbf{J_{11}}\mathbf{J_{22}-\mathbf{J_{12}}\mathbf{J_{21}}} > 0$. The biological interpretation of this criterion will be posed as a problem at the end of the chapter. For now, Table \ref{tab:eiginterpret} will suffice. \begin{table} \caption{Interpretation of eigenvalues of Jacobian matrices.} \label{tab:eiginterpret} \centering \begin{tabular}{ll} \hline\hline Eigenvalues & Interpretation\\ \hline All real parts $< 0$ & Globally Stable Point (Point Attractor)\\ Some real parts $< 0$ & Saddle (Attractor-Repellor)\\ No real parts $ < 0$ & Globally Unstable Point (Point Repellor)\\ Real parts $= 0$ & Neutral \\ \hline Imaginary parts absent & No oscillations\\ Imaginary parts present ($\pm\omega i$) & Oscillations with period $2\pi/\omega$\\ \hline \end{tabular} \end{table} \medskip \noindent \begin{boxedminipage}{\linewidth} {\footnotesize \paragraph{Eigenanalysis of the Jacobian matrix} Now that we have evaluated the Jacobian matrix (previous box), we simply perform eigenanalysis on the matrix (from previous boxes: $\alpha_{11}=\alpha_{22}=0.01,\,\alpha_{12}=\alpha_{21}=0.001,\, r=1$). <<>>= eigStable <- eigen(J1); eigStable[["values"]] @ The dominant eigenvalue is negative (the larger of the two: $\lambda_1$ = \Sexpr{round(max(eigStable[["values"]]), 3)}) indicating a globally stable equilibrium (Table \ref{tab:eiginterpret}). Both eigenvalues are real, not complex, indicating that there would be no oscillations (Table \ref{tab:eiginterpret}). } \end{boxedminipage} \medskip \subsection{Three interesting equilbria} Here we examine the dynamical properties of three particularly interesting internal equilibria that are, respectively, stable, unstable, and neutral. In each case, our examples use $\alpha_{11}=\alpha_{22}=0.01$ and $r_1=r_2=1$. What is most important, however, is not the particular eigenvalues, but rather their sign, and how they vary with $\alpha_{12}$ and $\alpha_{21}$, and the resulting stability properties and trajectories. Given our stability criteria above, let us next examine the dominant eigenvalue of the Jacobian for each equilibrium \ldots but which values of $\alpha_{ij},\,\alpha_{ji}$ should we choose? We can describe our invasion criterion for species $i$ as \begin{equation} \label{eq:8} \beta_{ij}=\alpha_{ij}/\alpha_{jj} \end{equation} where, if $\beta_{ij}<1$, species $i$ can invade. This ratio is the relative strength of inter-\emph{vs.} intraspecific competitive effect. It turns out to be useful to calculate $\lambda_1$ (``perturbation growth rate'') for combinations of $\beta_{ij},\,\beta_{ji}$. \subsubsection{Stable equilibrium -- $\beta_{ij},\, \beta_{ji} <1$} These criteria correspond to $\alpha_{12}<\alpha_{22}\, , \, \alpha_{21}<\alpha_{11}$. As the relative strength of interspecific effects increases toward 1.0, $\lambda_1$ approaches zero, at which point the system would no longer have a single global point attractor. When $\beta_{ij},\, \beta_{ji} <1$, then both species can invade each other. We find that all of the eigenvalues of the Jacobian are negative and real (Fig. \ref{fig:LVeig}), demonstrating that these populations will reach a stable equilibrium (Table \ref{tab:eiginterpret}). When we plot these eigenvalues for these combinations of $\beta$, we see that the dominant eigenvalue increases from negative values toward zero as either $\beta_{12}$ or $\beta_{21}$ approaches 1 (Fig. \ref{fig:LVeig}). \begin{figure}[h] \centering \subfloat[Contour view of $\lambda_1$]{\includegraphics[width=.48\linewidth]{LVeigContour} \label{fig:LVeigContour} } \subfloat[Trajectories of $N_1,\, N_2$ for $\beta<1$]{\includegraphics[width=.48\textwidth]{LVStable.pdf}\label{lvstabstab}} \caption[]{Stable equilibria: as the relative strength of interspecific competition increases ($\beta_{ij} \to 1$), instability increases ($\lambda_1 \to 0$). \subref{fig:LVeigContour} $\lambda_1 \to 0$ as $\beta \to 1$, \subref{lvstabstab} a globally stable equilibrium attracts trajectories from all locations (solid dots represent initial abundances).} \label{fig:LVeig} \end{figure} @ \subsubsection{Unstable equilibria -- $\beta_{ij}, \, \beta_{ji} > 1$} These criteria correspond to $\alpha_{12}>\alpha_{22} ,\, \alpha_{21}>\alpha_{11}$ (Fig. \ref{fig:LVeigU}). As we saw above, the Lotka-Volterra competition model has not only stable equilibria, but also unstable equilibria, when both populations are greater than zero. Although an unstable equilibrium cannot persist, $\beta_{ij}, \, \beta_{ji} > 1$ creates interesting and probably important dynamics \cite{Hastings2004a}. One of the results is referred to as \emph{founder control}, where either species can colonize a patch, and whichever species gets there first (i.e. the founder) can resist any invader \cite{Bolker2003a}. Another interesting phenomenon is the \emph{saddle} itself; this unstable equilibrium is an \emph{attractor-repeller}, that is, it attracts from some directions and repels from others (Fig. \ref{fig:LVeigU}). This implies that the final outcome of dynamics may be difficult to predict from initial trajectories. \begin{figure} \centering \subfloat[Contour view of $\lambda_1$]{\includegraphics[width=.48\linewidth]{LVeigContourU} \label{fig:LVeigContourU} } \subfloat[Trajectories of $N_1,\, N_2$ for $\beta<1$]{\includegraphics[width=.48\textwidth]{LVSaddle.pdf}\label{lvstabun}} \caption{Unstable equilibria: as the relative strength of interspecific competition increases ($\beta_{ij} > 1$), instability increases ($\lambda_1 > 0$). \subref{fig:LVeigContourU} $\lambda_1$ increases as $\beta$ increases, \subref{lvstabun} the unstable equilibrium may attract trajectories from some initial states, but repel from others (solid dots represent initial abundances).} \label{fig:LVeigU} \end{figure} Recall the geometric interpretation of this unstable equilibrium --- a saddle. The trajectory of a ball rolling across a saddle can depend to a very large degree on where the ball starts. Place it on the crown of the saddle, and it will tend to roll in a very deterministic fashion directly toward the unstable equilibrium, even if it eventually rolls off the side. \medskip \noindent \begin{boxedminipage}{\linewidth} {\footnotesize \paragraph{Eigenanalysis of the Jacobian where $\beta_{ij}, \, \beta_{ji} > 1$} Here we create values for $\bm{\alpha}$ that create an unstable equilbrium. <<>>= a11 <- a22 <- 0.01 a12 <- a21 <- 0.011 N1 <- eval(N1Star); N2 <- eval(N2Star) eigen( eval(J) )$values @ The dominant eigenvalue is now positive, while the other is negative, indicating a saddle (Table \ref{tab:eiginterpret}). } \end{boxedminipage} \medskip @ @ \subsubsection{Neutral equilibria --- $\beta_{ij} = \beta_{ji} = 1$} What happens when the inter- and intraspecific effects of each species are equal? This puts the populations on a knife's edge, between an unstable saddle and a stable attractor. Let's think first about a geometric interpretation, where we shift between a bowl, representing a stable attractor, and a saddle, representing what we call a \emph{\index{saddle!neutral}neutral saddle}. Imagine that we begin with a stable attractor, represented by a bowl, where $\alpha_{ij} < \alpha_{ii}$. We drop a ball in a bowl, and the bowl rolls to the bottom --- the global attractor. As we increase the interspecific competition coefficients, $\alpha_{ij} \to \alpha_{ii}$, we are pressing down on just two points on opposite sides of the bowl. Our hands push down on two opposite sides, until the bowl is flat in one direction, but has two remaining sides that slope downward. Perhaps you think this looks like a taco shell? The same shape is easily replicated by just picking up a piece of paper by opposite edges, letting it sag in the middle. This is the neutral saddle. What would eigenanalysis tell us? Let's find out. We could just charge ahead in \R, and I encourage you to do so, repeating the steps above. You would find that doesn't work because when $\beta_{ij} = \beta_{ji} = 1$, our equilibria are undefined (numerator and denominator are zero in eq. \ref{eq:7}). Hmmm. Perhaps we can simplify things by taking the \emph{limit} of the equilibrium, as $\alpha_{ij} \to \alpha_{jj}$. Let $\alpha_{12}=a$ and $\alpha_{22}=a+h$, and let $\alpha_{21}=b$ and $\alpha_{11}=b+h$. Then we want the limit of the equilibrium as $h$ goes to zero. \begin{align} \label{eq:lim} \lim_{h \to 0}\frac{\left(a+h\right)-a}{\left(a+h\right)\left(b+h\right) - ab} &=\frac{1}{a+b} \end{align} Thus, $N_1^* = 1/(\alpha_{11}+\alpha_{22})$, assuming $\alpha_{12} = \alpha_{22}$ and $\alpha_{21}=\alpha_{11}$. Therefore, the equilibrium population size is simply the inverse of the sum of these coefficients. \begin{figure} \centering \includegraphics[width=.48\textwidth]{LVNeutral.pdf} \caption{Trajectories of $N_1,\, N_2$ for $\beta_{12},\,\beta_{21}=1$. The entire isocline is an attractor, a neutral saddle, and the final abundances depend on the initial abundances and the ratio of $\alpha_{11}:\alpha_{22}$. The circle represents our one derived equilibrium (eq. \ref{eq:lim}).} \label{lvstabneut} \end{figure} \medskip \noindent \begin{boxedminipage}{\linewidth} {\footnotesize \paragraph{Eigenanalysis of the Jacobian where $\beta_{ij} = \beta_{ji} = 1$} Here we create values for $\bm{\alpha}$ that create a neutral equilbrium. <<>>= a11 <- a21 <- 0.01; a22 <- a12 <- 0.015 @ We determine $N^*$ differently (eq. \ref{eq:7}) because the usual expression fails when the denominator equals 0. <<>>= N1 <- N2 <- 1/(a11+a22) eigen( eval(J) )[["values"]] @ The dominant eigenvalue is now zero, indicating a neutral equilibrium (Table \ref{tab:eiginterpret}). The neutral nature of this equilibrium results in more than one equilibrium. Let's try a different one, also on the isocline. <<>>= N1 <- 1/(a11); N2<-0 eigen( eval(J) )[["values"]] @ Again $\lambda_1=0$ so this equilibrium is also neutral. } \end{boxedminipage} \medskip When we perform eigenanalysis, we find that the largest of the two eigenvalues is zero, while the other is negative. This reveals that we have neither a bowl nor an unstable saddle, but rather, a \index{taco shell|see{saddle, neutral}}taco shell, with a level bottom --- a neutral saddle. For example, if the populations start at low abundances, both populations will tend to increase at constant rates until they run into the isocline. Thus, both populations can increase when rare, but the relative abundances will never change, regardless of initial abundances. Recall the Lotka-Volterra isoclines, and what we originally stated about them. We stated that \emph{the equilibrium will be the point where the isoclines cross}. When all $\beta_{ij} = \beta_{ji} = 1$, \emph{the isoclines completely overlap}, so we have an infinite number of equilibria---all the points along the line \begin{equation} N_2= \frac{1}{\alpha_{22}} - \frac{\alpha_{11}}{\alpha_{22}}N_1 \end{equation} and the initial abundances determine the trajectory and the equilibrium (Fig. \ref{lvstabneut}). \section{Return Time and the Effect of $r$} Above, we referred to \index{$\lambda_1$|see{return time}}$\lambda_1$ as the \index{perturbation growth rate|see{return time, stability analysis}}perturbation growth rate. More commonly, people refer to another quantity known as \emph{characteristic \index{return time}return time} (see Chapter 3). Return time is commonly calculated as the negative inverse of the largest real part of the eigenvalues, \begin{equation} \label{eq:rt4} RT = -\frac{1}{\lambda_1}. \end{equation} It is the time required to return a fraction of the distance\footnote{This ``fraction'' happens to be about 63\% or $1/e$; thus the hypothetical initial perturbation $x_0$ shrinks to $0.37x_0$.} back toward an equilibrium. Negative return times ($\lambda_1>0$) refer to ``backward time,'' or time into the past when this population would have been this far away (Fig. \ref{fig:RT}). If we envision the populations sitting at an equilibrium, we can then envision a small perturbation that shifts them away from that point in state space (see Chap. 3). Let's call this displacement $x_0$. The rate of change of in $x$ is approximately the exponential rate, \begin{equation} \label{eq:3} \frac{\D x}{\D t} \approx c\lambda_1 t. \end{equation} where $c$ is a constant, so the distance traveled, $x$, is given by (eq. \ref{eq:2x}). Therefore, a negative $\lambda_1$ indicates an exponential decline in the disturbance, back toward the equilibrium (Fig. \ref{fig:RT}). The units of return time the same as for $r$. Recall that all of this depends on the linearization of the curved surface around an equilibrium; it therefore applies exactly to only an infinitesimally small region around the equilibrium. It also usually provides the average, regardless of whether the perturbation is a population decline or a population increase. \begin{figure} \centering \includegraphics[width=.5\textwidth]{RT} \caption{For small $\beta_{ij}$ ($\alpha_{ij} < \alpha_{jj}$), return time is positive because some time will lapse before the system returns toward to its equilibrium. For large $\beta_{ij}$ ($\alpha_{ij} > \alpha_{jj}$), return time is negative, because it would have been some time in the past that this system was closer to its (unstable) equilibrium. ($\alpha_{ii} = 0.01$)} \label{fig:RT} \end{figure} \paragraph{Effect of $r$ on stability and return time} Consider the Jacobian matrix (eq. \ref{eq:jac}), and note that $-r_i$ appears in each Jacobian element. Therefore, the larger the $r$, the greater the magnitude of the Jacobian elements. This causes $\lambda_1$ to increase in magnitude, reflecting greater responsiveness to perturbation at the equilibrium (Fig.~\ref{fig:LVeigR}). If we consider return time for continuous models where $\beta_{12},\,\beta_{21} < 1$, greater $r$ shortens return time, increasing stability (Fig. \ref{fig:LVeigR}). For continuous models where $\beta_{12},\,\beta_{21} > 1$, greater $r$ increases perturbation growth rate, decreasing stability (Fig. \ref{fig:LVeigR}). For discrete models, which we have not discussed in this context, recall that increasing $r_d$ of discrete logistic growth can destabilize the population because of the built-in lag. The same is true for discrete competition models --- increasing $r_d$ too much destabilizes the interaction. \begin{figure} \centering \subfloat[$\lambda_1$ with $r=1$]{\includegraphics[width=.48\linewidth]{LVeig3DAll} \label{fig:LVeig3DAll} } \subfloat[$\lambda_1$ with $r=0.5$]{\includegraphics[width=.48\textwidth]{LVeig3DAllhalf} \label{fig:eig3DAllhalf}} \caption{The dominant eigenvalue of the Jacobian matrix varies with $r$ as well as with $\beta$ --- higher $r$ causes greater responsiveness to perturbations around an internal equilibrium. \subref{fig:LVeig3DAll} $r=1$, \subref{fig:eig3DAllhalf} $r=0.5$.} \label{fig:LVeigR} \end{figure} % \medskip \noindent % \begin{boxedminipage}{\linewidth} % {\footnotesize % \paragraph{Eigenanalysis of the Jacobian with different $r$} % Here we use $\alpha_{ij}$ and $\alpha_{ji}$ that create stable and unstable % equilbria with $\alpha_{11}=\alpha_{22}=0.01$, and examine the effects of % varying $r$. % <<>>= % aij <- seq(0.0001, 0.009, length=30) % RT <- sapply(aij, function(a) { a12 <- a21 <- a % N1 <- eval(N1Star); N2 <- eval(N2Star) % -1/max(Re(eigen(eval(J))$values))}) % aij2 <- seq(0.011, 0.019, length=30) % RT2 <- sapply(aij2, function(a) { a12 <- a21 <- a % N1 <- eval(N1Star); N2 <- eval(N2Star) % -1/max(Re(eigen(eval(J))$values))}) % @ % Next we plot these, adding a reference line also. % <>= % plot(aij, RT, type='l', xlab=expression(alpha[ij]), xlim=c(0,.02), % ylim=c(-20,20)) % lines(aij2, RT2, lty=2) % abline(h=0, lty=3) % @ % This creates Fig. \ref{fig:RT}. % } % \end{boxedminipage} \medskip @ \section{Summary} This chapter has provided several useful results. \begin{itemize} \item We can represent species effects on each other in precisely the same way we represented their effects on themselves. \item Considering only two species, species $i$ can invade species $j$ when the effect of species $j$ on species $i$ is less than its effect of species $j$ on itself. \item Two species coexist stably when their effects on each other are smaller than their effects on themselves. \item The dominant eigenvalue of the Jacobian matrix (perturbation growth rate), and its negative inverse, return time, are useful mathematical definitions of stability. \item Perturbation growth rate decreases as $\beta_{ij},\, \beta_{ji}$ decrease, and are either both less than one or both greater than 1 ($\beta_{ij} = \alpha_{ij}/\alpha_{jj}$). \item The magnitude of perturbation growth rate increases with $r$. \end{itemize} @ \section*{Problems} \addcontentsline{toc}{section}{Problems} % % Use the following environment. % Don't forget to label each problem; % the label is needed for the solutions' environment % \begin{prob} % \label{prob1} % The problem\footnote{Footnote} is described here. The % problem is described here. The problem is described here. % \end{prob} % \begin{prob} % \label{prob1} % \textbf{Problem Heading}\\ % (a) The first part of the problem is described here.\\ % (b) The second part of the problem is described here. % \end{prob} \begin{prob} \label{prob:LVbasic} \textbf{Basics}\\ Let $\alpha_{11}=\alpha_{22}=0.1,\:\alpha_{12}=0.05,\:\alpha_{21}=0.01$.\\ (a) Determine $N^*_1,\:N^*_2,\:K_1,\:K_2$.\\ (b) Draw (by hand, or in \R) the ZNGIs (zero net growth isoclines); include arrows that indicate trajectories, and label the axes.\\ (c) Select other values for the $\alpha$ and repeat (a) and (b); swap your answers with a friend, and check each other's work. \\ (d) Start with equilibria for competing species, and show algebraically that when interspecific competition is nonexistent, species reach their carrying cappacities. \end{prob} \begin{prob} \label{prob:relabundance} Derive the expression for $N_1^*/N_2^*$. \end{prob} \begin{prob} \label{prob:partderivcomp} Show the derivations of the partial derivatives of $\D N_2 / \D t$, with respect to $N_2$ and to $N_1$; begin with eq. \ref{eq:N2b}. \end{prob} \begin{prob} \label{prob:LVTotal} \textbf{Total community size}\\ Assume for convenience that $\alpha_{11}=\alpha_{22}$ and $\alpha_{12}=\alpha_{21}$, and let $N_T=N_1+N_2$. \\ (a) Write $N^*_T$ as a function of $\alpha_{11},\,\,\alpha_{22},\,\,\alpha_{12},\,\,\alpha_{21}$.\\ (b) Describe in words how $N_T$ varies as $\alpha_{ij}$ varies from $\alpha_{ii} \to 0$.\\ (c) Graph (by hand, or in \R) the relation between $N_T$ versus $\alpha_{ij}$. Let $\alpha_{ii}=0.01$. \end{prob} \begin{prob} \label{prob:Routh} Interpret the Routh-Hurwitz criterion in terms of species relative inter- and intraspecific competitive abilities. \end{prob} \begin{prob} \label{prob:LVJac} \textbf{The Jacobian matrix}\\ Here we turn words into math. Note that this is one way of making our assumptions very precise and clear. In each case below (a.--d.), (i) use algebraic inequalities between the $\beta$s and between the $\alpha$s to show what the assumptions imply for the equalities and inequalities with respect to all $\alpha$s, (ii) use these inequalities to simplify the Jacobian matrix (eq. (\ref{eq:jac}) as much as possible, (iii) show algebraically how these (in)equalities determine the sign of each element of the Jacobian, and (iv) explain in words how the magnitudes of the Jacobian elements determine stability properties.\\ (a) Assume that both species are functionally equivalent, and intraspecific competition is more intense than interspecific competition.\\ (b) Assume species are functionally equivalent and that each species has a greater impact on each other than they do on themselves.\\ (c) Assume species are functionally equivalent and interspecific competition is precisely equal to intraspecific competition.\\ (d) Assume species have the same carrying capacity, and can coexist, but that species 1 is dominant.\\ (e) Assume species 1 is the better competitor (note: this may have multiple interpretations).\\ (f) Assume species 1 and 2 are equivalent (note: this may have multiple interpretations). \end{prob} <>= ### Rates of change with respect to each other: partials N1Star <- expression( (a22-a12)/(a22*a11 - a12*a21) ) N2Star <- expression( (a11-a21)/(a22*a11 - a12*a21) ) dN1dt <- expression(r1*N1 - r1*a11*N1^2 - r1*a12*N1*N2) dN2dt <- expression(r2*N2 - r2*a22*N2^2 - r2*a21*N1*N2) ### respect to each other. (ddN1dN1 <- D(dN1dt, "N1")) (ddN1dN2 <- D(dN1dt, "N2")) (ddN2dN1 <- D(dN2dt, "N1")) (ddN2dN2 <- D(dN2dt, "N2")) ### Tell R what the alpha's are a <- matrix(c( 0.01, 0.00, 0.005, 0.01), ncol=2, byrow=TRUE) r1 <- r2 <- r <- 1 a11 <- a[1,1]; a12 <- a[1,2]; a21 <- a[2,1]; a22 <- a[2,2] ### Evaluate the Jacobian using the above parameters N1 <- eval(N1Star); N2 <- eval(N2Star) ddN1dN1 <- D(dN1dt, "N1") ddN1dN2 <- D(dN1dt, "N2") ddN2dN1 <- D(dN2dt, "N1") ddN2dN2 <- D(dN2dt, "N2") J <- matrix(c(eval(ddN1dN1), eval(ddN1dN2), eval(ddN2dN1), eval(ddN2dN2)), nrow=2, byrow=TRUE) J (ea <- eigen(J)) LSA <- function(N1Star.exp=N1Star, N2Star.exp=N2Star, dN1dt.exp=dN1dt, dN2dt.exp=dN2dt, r1=r, r2=r, aM=a) { a11 <- aM[1,1]; a12 <- aM[1,2]; a21 <- aM[2,1]; a22 <- aM[2,2] ### Evaluate the Jacobian using the above parameters N1 <- eval(N1Star.exp); N2 <- eval(N2Star.exp) ddN1dN1 <- D(dN1dt.exp, "N1") ddN1dN2 <- D(dN1dt.exp, "N2") ddN2dN1 <- D(dN2dt.exp, "N1") ddN2dN2 <- D(dN2dt.exp, "N2") J <- matrix(c(eval(ddN1dN1), eval(ddN1dN2), eval(ddN2dN1), eval(ddN2dN2)), nrow=2, byrow=TRUE) ea <- eigen(J) list(r.s=c(r1,r2), a=aM, Jacobian=J, e.vals =ea$values, e.vecs<-ea$vectors, pdes = list(ddN1dN1,ddN1dN2, ddN2dN1, ddN2dN2) ) } library(deSolve) #source("LVComp2.r") params <- c(r1=1, r2=1, a11 = a[1,1], a12 = a[1,2], a21 = a[2,1], a22 = a[2,2]) a12s <- seq(.0041, .0161, length=100) lambdas <- t( sapply(as.list(a12s), function(x) {a[1,2] <- x; a[2,1] <- x LSA(aM=a)$e.vals}) ) myQ() matplot(a12s/params["a11"], lambdas, type="l", ylab="Eigenvalues", xlab=expression(italic( alpha["ij"]/alpha["ii"] )), lty=1 ) abline(h=0, lty=3) abline(v=1, lty=3) text(.6, -.33, "Stable", adj=0 ) text(1.4, .05, "Unstable" ) dev.print(dev=pdf, file="LVStab.pdf") myQ() a <- matrix(c( 0.01, 0.005, 0.005, 0.01), ncol=2, byrow=TRUE) curve(1/a[2,2] - (a[2,1]/a[2,2])*x, 0, 1/a[2,1], axes=FALSE, ylim=c(0, max(1/a[2,2], 1/a[1,2])), xlim=c(0, max(1/a[1,1], 1/a[2,1])), ylab=expression("N"[2]), xlab=expression("N"[1])) curve(1/a[1,2] - (a[1,1]/a[1,2])*x, 0, 1/a[1,1], add=T, lwd=2, lty=2) axis(1, c(0, 1/a[1,1], 1/a[2,1]), c(0, expression(1/alpha[11]),expression(1/alpha[21])) ) axis(2, c(0, 1/a[2,2], 1/a[1,2]), c(0, expression(1/alpha[22]),expression(1/alpha[12])) ) box() nstart <- 10 n1 <- c(seq(1/(2*a[1,1]), 1/a[2,1], length=nstart), seq(3/(4*a[1,1]), 1, length=nstart) ) n2 <- c(seq(1/a[1,2], 1/(2*a[2,2]), length=nstart), seq(1, 3/(4*a[2,2]), length=nstart ) ) paramsST <- c(r1=.1, r2=.1, a11 = a[1,1], a12 = a[1,2], a21 = a[2,1], a22 = a[2,2]) for( i in 1:length(n1) ) {Ns <- ode(c(n1[i],n2[i]), 1:200, lvcomp2, paramsST ) points(n1[i],n2[i], pch=19) lines(Ns[,2],Ns[,3]) } dev.print(dev=pdf, file="LVStable.pdf") ### Dynamics of Saddle repellors ### Neither species can invade , yet an unstable equilbrium -- a saddle point attractor-repellor -- exists. myQ() a <- matrix(c( 0.01, 0.02, 0.02, 0.01), ncol=2, byrow=TRUE) curve(1/a[2,2] - (a[2,1]/a[2,2])*x, 0, 1/a[2,1], axes=FALSE, ylim=c(0, max(1/a[2,2], 1/a[1,2])), xlim=c(0, max(1/a[1,1], 1/a[2,1])), ylab=expression("N"[2]), xlab=expression("N"[1])) curve(1/a[1,2] - (a[1,1]/a[1,2])*x, 0, 1/a[1,1], add=T, lwd=2,lty=2) axis(1, c(0, 1/a[1,1], 1/a[2,1]), c(0, expression(1/alpha[11]),expression(1/alpha[21])) ) axis(2, c(0, 1/a[2,2], 1/a[1,2]), c(0, expression(1/alpha[22]),expression(1/alpha[12])) ) box() nstart <- 10 n1 <- c(seq(1/(2*a[1,1]), 1/(a[1,1]), length=nstart), seq(1/(2*a[2,1]), 0, length=nstart) ) n2 <- c(seq(1/a[2,2], 1/(2*a[2,2]), length=nstart), seq(0, 1/(2*a[1,2]), length=nstart ) ) paramsUN <- c(r1=.1, r2=.1, a11 = a[1,1], a12 = a[1,2], a21 = a[2,1], a22 = a[2,2]) for( i in 1:length(n1) ) {Ns <- ode(c(n1[i],n2[i]), 1:100, lvcomp2, paramsUN ) points(n1[i],n2[i], pch=19) lines(Ns[,2],Ns[,3])} #abline(c(0,1), lwd=2, col="forestgreen") dev.print(dev=pdf, file="LVSaddle.pdf") myQ() a <- matrix(c( 0.01, 0.015, 0.01, 0.015), ncol=2, byrow=TRUE) curve(1/a[2,2] - (a[2,1]/a[2,2])*x, 0, 1/a[2,1], axes=FALSE, ylim=c(0,100), xlim=c(0, 100), ylab=expression("N"[2]), xlab=expression("N"[1])) curve(1/a[1,2] - (a[1,1]/a[1,2])*x, 0, 1/a[1,1], add=T, lwd=4, lty=2) axis(1, c(0, 1/a[1,1]), c(0, expression(1/alpha[11])) ) axis(2, c(0, 1/a[2,2]), c(0, expression(1/alpha[22])) ) box() nstart <- 6 n1 <- c(seq(0, 1/(a[1,1]), length=nstart), seq(1/(2*a[1,1]), 0, length=nstart) ) n2 <- c(seq(1.5/a[2,2], 1/(2*a[2,2]), length=nstart), seq(0, 1/(2*a[2,2]), length=nstart ) ) paramsUN <- c(r1=1, r2=1, a11 = a[1,1], a12 = a[1,2], a21 = a[2,1], a22 = a[2,2]) for( i in 2:length(n1) ) {Ns <- ode(c(n1[i],n2[i]), 1:10, lvcomp2, paramsUN ) points(n1[i],n2[i], pch=19) lines(Ns[,2],Ns[,3]) arrows(Ns[1,2],Ns[1,3],Ns[10,2],Ns[10,3], length=0.12)} points(1/sum(a[1,]), 1/sum(a[1,]), cex=2) dev.print(dev=pdf, file="LVNeutral.pdf") ratio <- ode(c(1,10), 1:100, lvcomp2, paramsUN );ratio[,2]/ratio[,3] a <>= findL1 <- function(B, r1=1, r2=1, a11=.01, a22=.01) { r1=r1; r2=r2; a11 = a11; a22 <- a22 a12 <- B[1]*a22; a21 <- B[2]*a11 if(B[1] < 1 & B[2] > 1) {N1 <- 1/a11 N2=0 } else if(B[1] > 1 & B[2] < 1) {N1 <- 0; N2 <- 1/a22 } else if(B[1] < 1 & B[2] < 1) { N1 <- eval(N1Star); N2=eval(N2Star) } else if(B[1] > 1 & B[2] > 1) {N1 <- eval(N1Star) N2 <- eval(N2Star) } else ### This is completely arbitrary if(B[1] == 1 & B[2] == 1) N1 <- N2 <- 1/(2*a11) ### Evaluate the Jacobian using the above parameters J <- expression( matrix(c(eval(ddN1dN1), eval(ddN1dN2), eval(ddN2dN1), eval(ddN2dN2)), nrow=2, byrow=TRUE) ) J1 <- eval(J); J1 eigAll <- eigen(J1) return( list(domL=max(Re(eigAll$values)), eigenanal = eigAll, Jacobian=J1, N = c(N1, N2) ) ) } a12/a22 findL1(B=c(1.5,1/1.5)) ### Figs for Stable Eq dat <- expand.grid(B12=seq(0.0001, 1, by=0.05), B21=seq(0.0001, 1, by=0.05)) dat$L <- apply(dat, 1, function(b) findL1(B=b)$domL) trellis.device(col=FALSE, width=4, height=4) print(wireframe(L ~ B12 + B21, dat, scales=list(arrows=FALSE), screen = list(z = 20, x = -70), xlim=c(0,1), ylim=c(0,1), drape=TRUE, colorkey=TRUE, zlab=expression(lambda[1]), xlab=expression(beta[12]), ylab=expression(beta[21]))) dev.print(pdf, "LVeig3D.pdf") trellis.device(col=FALSE, width=4, height=4) print(contourplot(L ~ B12 + B21, dat, cuts=10, xlab=expression(beta[12]), ylab=expression(beta[21]))) dev.print(pdf, "LVeigContour.pdf") ### Figs for unstable eq dat2 <- expand.grid(B12=seq(1.01, 2.01, by=0.05), B21=seq(1.01, 2.01, by=0.05)) dat2$L <- apply(dat2, 1, function(b) findL1(B=b)$domL) trellis.device(col=FALSE, width=4, height=4) print(wireframe(L ~ B12 + B21, dat2, scales=list(arrows=FALSE), screen = list(z = 20, x = -70), xlim=c(1,2), ylim=c(1,2), drape=TRUE, colorkey=T, zlab=expression(lambda[1]), xlab=expression(beta[12]), ylab=expression(beta[21]))) dev.print(pdf, "LVeig3Du.pdf") trellis.device(col=FALSE, width=4, height=4) print(contourplot(L ~ B12 + B21, dat2, cuts=10, ylim=c(.95,2.05), xlim=c(.95, 2.05), xlab=expression(beta[12]), ylab=expression(beta[21]))) dev.print(pdf, "LVeigContouru.pdf") ### Games dat3 <- expand.grid(B12=seq(.01, 2, by=0.05), B21=seq(.01, 2, by=0.05)) dat3$one <- dat3$B12*dat3$B21 dat3$L <- apply(dat3, 1, function(b) findL1(B=b)$domL) dat3$RT <- dat3$L^(-1) trellis.device(col=FALSE, width=4, height=4) print(contourplot(L ~ B12 + B21, dat3, cuts=20, labels=T, xlab=expression(beta[12]), ylab=expression(beta[21]))) dev.print(pdf, "LVeigContourAll.pdf") print(wireframe(L ~ B12 + B21, dat3, scales=list(arrows=FALSE), screen = list(z = 20, x = -70), zlim=c(-1,.35), drape=TRUE, colorkey=F, zlab=expression(lambda[1]), xlab=expression(beta[12]), ylab=expression(beta[21]))) dev.print(pdf, "LVeig3DAll.pdf") dat3$L2 <- apply(dat3, 1, function(b) findL1(B=b, r1=.5, r2=.5)$domL) trellis.device(col=FALSE, width=4, height=4) print(contourplot(L2 ~ B12 + B21, dat3, cuts=20, labels=T, xlab=expression(beta[12]), ylab=expression(beta[21]))) dev.print(pdf, "LVeigContourAllhalf.pdf") print(wireframe(L2 ~ B12 + B21, dat3, scales=list(arrows=FALSE), screen = list(z = 20, x = -70), zlim=c(-1,.35), drape=TRUE, colorkey=F, zlab=expression(lambda[1]), xlab=expression(beta[12]), ylab=expression(beta[21]))) dev.print(pdf, "LVeig3DAllhalf.pdf")