Description Usage Arguments Details Value Examples
Analyse long-term dynamics of a stochastic population matrix projection model.
1 2 3 4 5 6 7 8 9 10 |
A |
a list of matrices. |
what |
what should be returned. A character vector with possible entries "lambda" (to calcualate stochastic growth), "var" (to calculate variance in stochastic growth) and/or "all" (to calculate both). |
Aseq |
the sequence of matrices in a stochastic projection.
|
vector |
(optional) a numeric vector describing the age/stage
distribution used to calculate the projection. If |
Astart |
(optional) in a stochastic projection, the matrix with which to
initialise the projection (either numeric, corresponding to the matrices in
|
iterations |
the number of projection intervals. The default is 1e+5. |
discard |
the number of initial projection intervals to discard, to discount near-term effects arising from the choice of vector. The default is 1e+3 |
PREcheck |
many functions in |
Calculates stochastic growth and its variance for a given stochastic population matrix projection model.
A numeric vector with two possible elements: "lambda" (the stochastic population
growth rate) and "var" (the variance in stochastic population growth rate). Values
returned depend on what's passed to what
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # load the Polar bear data
( data(Pbear) )
# Find the stochastic growth for a time series with uniform probability of each
# matrix
( lambda_unif <- stoch(Pbear, what = "lambda", Aseq = "unif") )
# Find the variance in stochastic growth for a time series with uniform
# probability of each matrix
( var_unif <- stoch(Pbear, what = "var", Aseq = "unif") )
# Find stochastic growth and its variance for a time series with a sequence of
# matrices where "bad" years happen with probability q
q <- 0.5
prob_seq <- c(rep(1-q,3)/3, rep(q,2)/2)
Pbear_seq <- matrix(rep(prob_seq,5), 5, 5)
( var_unif <- stoch(Pbear, what = "var", Aseq = Pbear_seq) )
|
Welcome to popdemo! This is version 1.3-0
Use ?popdemo for an intro, or browseVignettes('popdemo') for vignettes
Citation for popdemo is here: doi.org/10.1111/j.2041-210X.2012.00222.x
Development and legacy versions are here: github.com/iainmstott/popdemo
[1] "Pbear"
[1] 0.9388749
[1] 0.01671197
[1] NA
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.