David A. W. Miller. 2012. General methods for sensitivity analysis of equilibrium dynamics in patch occupancy models. *Ecology* 93:1204–1213.

Supplement

R code with general functions for calculating sensitivities and code used to conduct analyses in the paper.
*Ecological Archives* E093-103-S1.

Authors

File list (downloads)

Description

David Miller

U.S. Geological Survey

Patuxent Wildlife Research Center

12100 Beech Forest Road

Laurel, MD 20708

E-mail: [email protected]

File list

functions.R (md5: cddb3d724691a2c5c7c6ded2a0f21bdc)

toads.R (md5: d23838869810c495ea1f0b86b7f5a5f5)

butterflies.R (md5: e76685d0f1eea2e4c525d9461e034be8)

eagles.R (md5: f22babc1ea9402d3e1793bafd6bf8318)

TransProbs.csv (md5: fb71eb184a4507d32d5c08473f6ec59c)

Description

Four scripts are included to create functions and run analyses described in the paper. Appendix A includes detailed background descriptions of how to conduct analyses including a large number of annotated examples of how the code is used.

The first script, functions.R, includes a series of functions that can be called to conduct analyses. Prior to using the other scripts, this script must be run in R to load the functions. The included functions are:

sens(R) - This function calculates sensitivities of the elements of the stationary state distribution to changes in each of the transition elements of R. No compensation method is used. Two outputs are given: sensitivities is the 3-dimensional array of sensitivities and ssd is the stationary state distribution.

markov.sens(R) - This function calculates sensitivities of the elements of the stationary state distribution to changes in each of the transition elements of R with a compensation method imposed. Outputs are the sensitivities under uniform compensation - unif, under proportional compensation - prop, and the stationary state distribution - ssd.

ssd.T(R,burn,iter) - This function calculates the stationary state distribution when R varies among time periods. Output is the stationary state distribution - e.T.

unif.Tsens(R,q,burn,iter) - This function calculates the sensitivities of elements of the stationary state distribution to changes in elements of the transition matrix using uniform compensation. Outputs are the stationary state distribution - ssd, and the sensitivities - sens.

prop.Tsens(R,q,burn,iter) - This function calculates the sensitivities of elements of the stationary state distribution to changes in elements of the transition matrix using proportional compensation. Outputs are the stationary state distribution - ssd, and the sensitivities - sens.

lower.Tsens(R,R2,q,burn,iter) - This function can be generalized to calculate a wide variety of sensitivities when temporal variation in transitions occur. Outputs include the sensitivities - sens, as well as the stationary state distribution for the original and perturbed matrices - e.T and p.T, respectively.

The additional scripts, toads.R, butterflies.R, and eagles.R, were used to conduct all the calculations presented in the paper and Appendix B. The data set for the arroyo toad example, which is read by the toads.R script, is in the file TransProbs.csv.

ESA Publications | Ecological Archives | Permissions | Citation | Contacts