Description Usage Arguments Value Author(s) Source References See Also Examples
View source: R/stoch.quasi.ext.R
Estimate the quasiextinction probability by simulation for a structured population in an an independently and identically distributed stochastic environment
1 2  stoch.quasi.ext(matrices, n0, Nx, tmax = 50, maxruns = 10, nreps = 5000,
prob = NULL, sumweight = NULL, verbose=TRUE)

matrices 
a 
n0 
initial population vector 
Nx 
quasiextinction 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

sumweight 
A vector of ones and zeros used to omit stage classes when checking quasiextinction threshold. Default is to sum across all stage classes. 
verbose 
Print comment at start of run 1,2,3,etc. 
A matrix with quasiextinction probabilities for each run by columns
Chris Stubben
converted Matlab code from Box 7.5 in Morris and Doak (2002)
Morris, W. F., and D. F. Doak. 2002. Quantitative conservation biology: Theory and practice of population viability analysis. Sinauer, Sunderland, Massachusetts, USA.
1 2 3 4 5 6 7 8 9  data(hudsonia)
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="Quasiextinction probability",
type='l', lty=1, col=rainbow(10), las=1,
main="Time to reach a quasiextinction threshold
of 10 aboveground individuals")

[1] Calculating extinction probability for run 1
[1] Calculating extinction probability for run 2
[1] Calculating extinction probability for run 3
[1] Calculating extinction probability for run 4
[1] Calculating extinction probability for run 5
[1] Calculating extinction probability for run 6
[1] Calculating extinction probability for run 7
[1] Calculating extinction probability for run 8
[1] Calculating extinction probability for run 9
[1] Calculating extinction probability for run 10
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.