## Quantitative Conservation Biology: Theory and Practice of Population Viability Analysis

*Duke University*and Daniel F. Doak,

*University of Colorado at Boulder*

*Duke University*and Daniel F. Doak,

*University of Colorado at Boulder*

**William F. Morris** is a Professor in the Biology Department at Duke University.

**Daniel F. Doak** is a Professor in the Environmental Studies Program at the University of Colorado at Boulder.

“This book is unique because it is written much like a tutorial that describes the process of PVA in a well-organized and easy-to-follow manner and does so in sufficient detail (with specific real-world examples) to serve as a starting point for more detailed treatments. . . . The book is sure to appeal to a wide audience and should serve as a useful resource for those who wish to better understand PVAs, as well as for more experienced theoreticians and conservation practitioners.”

—Carlyle Brewster, *American Entomologist*

“William Morris and Daniel Doak have written a comprehensive volume on population viability analyses (PVA) that integrates the theory of population ecology with the analytical tools necessary to synthesize observational data on the dynamics of populations. . . . The book is a thorough, quantitative treatment and should be approachable by conservation biologists and ecologists with an interest in learning the details and application of PVA.”

—William R. Clark, *Landscape Ecology*

“This is a book we've needed for a decade. PVA is not only a bridge between science and policy, it is the flagship technology of conservation biology. When applied to strongly interacting species, it is also a foundational tool of ecosystem conservation. Thank goodness, therefore, that this book is readable. Morris and Doak draw on a treasury of experience and eschew complexity except where necessary. Their book is truly the definitive step in making PVA accessible to students and practitioners. Hooray!”

—Michael Soulé, The Wildlands Project

“Population viability analysis (PVA) has become one of the core tools of conservation practice. Although several recent books develop the theory of PVA, Morris and Doak are the first to produce a 'how to' handbook that is faithful to rigorous population theory, yet down-to-earth enough in presentation that a field biologist could learn the craft of PVA without any prior training. This is the one book that puts the modern quantitative tools of conservation biology in the hands of the practitioner. No method is mentioned without also carefully working through an application using real data at a patient pace, yet with lively prose. I hope that agency biologists, conservation planners, and land managers around the world either read this book or make sure someone on their staff is familiar with its practical wisdom.”

—Peter Kareiva, Lead Scientist for The Nature Conservancy

“If you teach a course in introductory ecology, population ecology, conservation biology, or applied ecology, then you should have a copy of this book.... Morris and Doak have done a real service by providing an effective self-contained manual for anybody who wants to do a state-of-the-art PVA but doesn't know how. If you do PVA or teach PVA, this book is required reading.”

—Stephen P. Ellner, *Écoscience*

“This important book makes it clear that well-designed demographical studies and PVAs are nowadays among the basics for any wildlife population to be studied and managed. It provides crucial tools for a quantitative wildlife monitoring and conservation in the new millennium.”

—Falk Huettmann, *The Canadian Field-Naturalist*

Available here are listings of all MATLAB programs included as boxes in the text. There are some corrections in the zip file below (CORRECTIONS.m) to the programs as they appeared in print.

**Download all the files in a .zip archive.** (76k)

**Box 2.1 - randdraw.m** MATLAB code to simulate population trajectories using Equation 2.1, and drawing each year's annual growth rate from a list of observed rates.

**Box 3.3** MATLAB code defining five functions used in calculating the extinction time cumulative distribution function and its confidence limits:extcdf.m, stdnormcdf.m, gammarv.m, betarv.m, and chi2rv.m. These functions are used by many other programs in subsequent chapters.

**Box 3.4 - extprob.m** MATLAB code to calculate extinction probabilities and bootstrap confidence intervals.

**Box 4.1 - tbar_ceiling.m** MATLAB code to plot the mean time to extinction for the ceiling model (Equation 4.1) as functions of the carrying capacity and initial population size.

**Box 4.4 - theta_logistic.m** MATLAB code to predict the probability of extinction using the theta logistic model (Equation 4.2).

**Box 4.5 - demstoch.m** A MATLAB program to simulate growth of a density-dependent population with both environmental and demographic stochasticity. It would be straightforward to hybridize this code with the program "theta_logistic" in Box 4.4 to compute the probability of extinction under both types of stochasticity.

**Box 4.6 - ricker_corr.m** MATLAB code to calculate the probability of quasi-extinction for the Ricker model with temporally autocorrelated environmental effects.

**Box 4.7 - extremes.m**. MATLAB code to calculate extinction risk in the presence of catastrophes and bonanzas.

**Box 5.1 - correct_sigma2.m** MATLAB code to correct a raw estimate of σ^{2} for sampling variation when census counts represent means from replicate samples.

**Box 5.2 - dennisholmes.m** MATLAB code defining the function "dennisholmes", which estimates µ and σ^{2} using the method of Holmes (2001).

**Box 7.1 - eigenall.m** MATLAB code defining the function "eigenall", which calculates eigenvalues and eigenvectors of the matrix A. This function is used by many other programs in Chapters 7, 8, 9, and 11.

**Box 7.2 - box7_2.m** Fragment of MATLAB code that uses the function "eigenall" defined in Box 7.1 to generate Equations 7.8, 7.9, and 7.11 using the semi-palmated sandpiper projection matrix in Equation 7.5.

**Box 7.3 - iidenv.m** MATLAB code to simulate growth of a structured population in an iid stochastic environment. This program calls on the data filehudmats.m.

**Box 7.4 - stoc_log_lam.m** MATLAB code to estimate log ls by simulation and by Tuljapurkar's approximation. This program calls on the data filehudmats.m.

**Box 7.5 - simext.m** MATLAB code to simulate the extinction time cumulative distribution function. This program calls on the data file hudmats.m.

**Box 7.6 - box7_6.m** Fragment of MATLAB code to calculate the extinction time CDF for mountain golden heather using Tuljapurkar's approximation (Equations 7.12 and 7.13) and Equation 3.5. This program calls on the data filehudmats.m.

**Box 8.1 - white.m** MATLAB code to use White's method to correct for sampling variation.

**Box 8.2 - kendall.m** MATLAB code to use Kendall's method to correct for sampling variation.

**Box 8.3 - betaval.m** A second MATLAB function to make beta-distributed random numbers (see Box 3.3 for a different method). "betaval" returns a beta-distributed value with the specified CDF value. The program BetaDemo is also included, showing the use of betaval. This function is used by many other programs in Chapters 8, 9, and 11.

**Box 8.4 - lnorms.m** A MATLAB m-file for the function lnorms, which returns random lognormal values. This function is used by many other programs in Chapters 8, 9, and 11.

**Box 8.5 - stretchbetaval.m** A MATLAB m-file defining the function stretchbetaval, which returns stretched beta-distributed values. Note that this program uses betaval, defined in Box 8.3. The program StBetaDemo shows the use ofstretchbetaval.m. This function is used by many other programs in Chapters 8, 9, and 11.

**Box 8.6 - corrrates.m** A simple example program to generate correlated random vital rates using an estimated correlation matrix between vital rates.

**Box 8.7 - stnormfx.m** A MATLAB file for the function stnormalfx, which provides a good standard normals (Abramowitz and Stegun 1964). This function is used by many other programs in Chapters 8, 9, and 11.

**Box 8.8 - AnalyzeCorrs.m** A MATLAB program going through steps needed to calculate a correlation matrix and look for the problems caused by sparse sampling or small numbers of observations, using correlations for the desert tortoise.

**Box 8.9 - BetweenYrCorrNEW.m** A program, BetweenYrCorrNEW.m, to demonstrate the simulation of within-year correlations, autocorrelations, and cross-correlation in vital rates. Note that this program has been modified and is now quite different from BetweenYrCorr.m as described in the book. Also, this box contains a function that is called by the program, onestep.m.

**Box 8.10 - vitalsimNEW.m** A program, vitalsimNEW.m, to calculate the extinction time CDF and the stochastic growth rate for Hudsonia, using simulations that include correlation, autocorrelation, and cross-correlation. Note that this program has been modified and is now quite different from VitalSim.m as described in the book. Also, this box contains a function that is called by the program, onestep.m, and two other files that it calls: hudcorrs.matand the matrix definition program hudmxdef.m.

**Box 8.11 - multiresult.m** A function to decide the fates of a set of individuals simultaneously, given a set multinomial probabilities of different outcomes (after Caswell 2001, pg. 459).

**Box 8.12 - lynx.m** MATLAB code to perform a density-dependent demographic PVA for the Iberian lynx.

**Box 8.13 - salmon_dd.m** A MATLAB program to simulate deterministic, density-dependent growth of a salmon population.

**Box 9.1 - vitalsens.m** A MATLAB program to find the sensitivities and elasticities of λ_{1}to vital rates.

**Box 9.2 - limitsens.m** MATLAB code to simulate random matrices between user-defined limits.

**Box 9.3 - secder.m** A MATLAB function to calculate the second derivatives of deterministic growth rate (or first derivatives of sensitivities) owith respect to matrix elements (modified from Caswell 2001). This function is used to calculate stochastic sensitivities (see Box 9.4).

**Box 9.4 - StochSens.m** A MATLAB program to calculate the sensitivities and elasticities of stochastic growth rate (λ_{s}) to means, variances, and covariances of matrix elements. This program calls on the data file tortmxs.mat.

**Box 9.5 - stochsenssim.m** A MATLAB program that performs stochastic simulations to estimate the sensitivities and elasticities of stochastic growth rate (λ_{s}) and extinction probabilities to mean, variance, and covariance of matrix elements. This program calls on the data files tortbetas.mat andtortcorrmx.mat, as well as the matrix definition program maketortmx.m. The program also calls the function betaset.m.

**Box 10.1 - joincount.m** A MATLAB program to calculate join-count statistics for spatial correlations between binary data. This program calls on the data filedelug90s.txt.

**Box 11.1 - logregB.m** A MATLAB program to find the maximum likelihood parameter values for a logistic regression model of metapopulation dynamics. This program calls on the function in Box 11.2 - logregA.m, which does most of the actual calculations. This program calls on the data file delugA.txt.

**Box 11.2 - logregA.m** A MATLAB function that provides an estimate of the log-likelihood of a set of occupancy, extinction, and colonization data, given a set of parameters provided by the program in Box 11.1 - logregB.m.

**Box 11.3 - logregextsim.m** A program to simulate a logistic regression model for patch-based metapopulation dynamics. This program calls on the data filedelugA.txt.

**Box 11.4 - MultisiteCount.m** A stochastic simulation for a count-based multi-site PVA. This program is a modification of single-population matrix models developed in Chapter 8. This program calls on the matrix definition programrailmxdef.m.

**Box 11.5 - DemoMetaSim.m** A MATLAB program to perform demographic, multi-site simulations. Much of the machinery needed for this program is identical to that in the vital rate-based simulation models presented previously, and in this code we refer to pieces of vitalsim.m in Box 8.10 that need to be inserted to make a fully functional program. This program calls on the data file coryrates.mat and the matrix definition program makecorymx.m