Electronic Supplementary Material 2

Evaluating the causal basis of ecological success within the Scleractinia: an Integral Projection Model approach

Peter J. Edmunds,Scott C. Burgess,Hollie M. Putnam,Marissa L. Baskett, Lorenzo Bramanti, Nick S. Fabina, Xueying Han, Michael P. Lesser,Joshua S. Madin, Christopher B. Wall, Denise M. Yost, Ruth D. Gates

Numerical methodology for implementing a coral IPM

Here we provide the steps for numerical analysis of a coral IPM. For each step, we indicate the relevant functions that one would employ if using the R programming language (R Core Team 2013), drawing in part from the code in the IPMpack package (Metcalf et al. 2012).

(1)  Define a growth, survival, and fecundity function and fit each to the data to define the parameters. In R, using the example functions in Box 1:
growth <- function(x,y) dnorm(y,mx+c, sigma)
survival <- function(x) (b+epsilon)*logit(mx+c+epsilon,inverse=T)

fecundity <- function(x,y) {

f <- q*10^x

f[x<recsize | y>=recsize] <- 0

f

}

(2)  Define the kernel as a composite of the growth, survival, and fecundity functions. In R:
K <- function(x,y) survival(x)*growth(x,y)+fecundity(x,y)

(3)  Numerically define the size (or phenotype) vector at the midpoints of each bin of size Δx. In R:
vx <- seq(minx, maxx, by=deltax)
vx.mids <- (vx[-1]+vx[-length(vx)])/2

(4)  Evaluate the kernel over the matrix of all combinations of the size class transitions. In R:
KM <- t(outer(vx.mids, vx.midx, K)*deltax).

(5)  Find leading eigenvalue and corresponding normalized left and right eigenvectors, which provide the stable growth factor, phenotypic distribution, and reproductive values, as well as sensitivities based on the normalized eigenvectors. In R:
evv <- eigen(KM)
lambda <- Re(evv$values[1]) # eigenvalue/stable growth factor
v <- Re(evv$vectors[,1])
v <- v/sum(v) # right eigenvector/stable distribution
w <- Re(eigen(t(KM))$vectors[,1]
w <- w/sum(w) # left eigenvector/reproductive values
sensitivities <- outer(w,v)/sum(w*v)
elasticities <- K*sensitivities/lambda.

(6)  For evaluating how these values might change with a changing environment, iterate steps #2-5 over the trajectory of environmental conditions. Note that, if the objective were to predict changes in population size over time (as opposed to changes in λ or other matrix outputs over time), then the iteration in eq. 1 can be approximated by n(y,t+1) ≈ k(y,x,θ(t))n(x,t)Δx (in R, N[,t+1] <- KM%*%N[,t] given KM from step #4), but this approximation will have a high degree of numerical error. Using alternative numerical integration approaches can substantially increase the numerical accuracy of such a projection (Press et al. 1992).

References

Metcalf, CJE, McMahon SM, Salguero-Gomez R, Jongejans E (2012) IPMpack: an R package for integral projection models. Methods in Ecology and Evolution 4:195-200.

Press WH, Teukolsky SA, Vetterling,WT, and Flannery BP (1992) Integration of Functions. Chapter 4 in Numerical Recipes in C, Cambridge: Cambridge University.

R Core Team (2013). R: A Language and Environment for Statistical Computing, R Foundation for Statistical Computing, Vienna, Austria, http://www.R-project.org.