Learn R Programming

popbio (version 2.8)

stoch.quasi.ext: Quasi-extinction threshold

Description

Estimate the quasi-extinction probability by simulation for a structured population in an an independently and identically distributed stochastic environment

Usage

stoch.quasi.ext(
  matrices,
  n0,
  Nx,
  tmax = 50,
  maxruns = 10,
  nreps = 5000,
  prob = NULL,
  sumweight = NULL,
  verbose = TRUE
)

Value

A matrix with quasi-extinction probabilities for each run by columns

Arguments

matrices

a list with two or more projection matrices, or a matrix with one projection matrix per column, with elements filled by columns

n0

initial population vector

Nx

quasi-extinction threshold

tmax

number of time steps or projection intervals

maxruns

number of times to simulate cumulative distribution function

nreps

number of iterations

prob

a vector of probability weights used by sample for selecting the projection matrices

sumweight

A vector of ones and zeros used to omit stage classes when checking quasi-extinction threshold. Default is to sum across all stage classes

verbose

Print comment at start of run 1,2,3,etc.

Author

Chris Stubben

Details

converted Matlab code from Box 7.5 in Morris and Doak (2002)

References

Morris, W. F., and D. F. Doak. 2002. Quantitative conservation biology: Theory and practice of population viability analysis. Sinauer, Sunderland, Massachusetts, USA.

See Also

stoch.projection

Examples

Run this code
n <- c(4264, 3,30,16,25,5)
names(n) <- c("seed",  "seedlings", "tiny", "small", "medium" , "large")
## exclude seeds using sumweight.  Using 100 nreps for speed
x <- stoch.quasi.ext(hudsonia, n, Nx=10, nreps=100, sumweight=c(0,1,1,1,1,1))
matplot(x, xlab="Years", ylab="Quasi-extinction probability",
 type='l', lty=1, las=1,
 main="Time to reach a quasi-extinction threshold
of 10 above-ground individuals")

Run the code above in your browser using DataLab