random_mpm {mpmsim}R Documentation

Generate random Lefkovitch matrix population models (MPMs) based on life history archetypes

Description

This function is deprecated. Use rand_lefko_mpm instead.

Usage

random_mpm(n_stages, fecundity, archetype = 1, split = FALSE)

Arguments

n_stages

An integer defining the number of stages for the MPM.

fecundity

Fecundity is the average number of offspring produced. Values can be provided in 4 ways:

  • An numeric vector of length 1 to provide a fecundity measure to the top right corner of the matrix model only.

  • A numeric vector of integers of length equal to n_stages to provide fecundity estimates for the whole top row of the matrix model. Use 0 for cases with no reproduction.

  • A matrix of numeric values of the same dimension as n_stages to provide fecundity estimates for the entire matrix model. Use 0 for cases with no reproduction.

  • A list of two matrices of numeric values, both with the same dimension as n_stages, to provide lower and upper estimates of mean fecundity for the entire matrix model. In the latter case, a fecundity value will be drawn from a uniform distribution for the defined range. If there is no reproduction in a particular age class, use a value of 0 for both the lower and upper limit.

archetype

Indication of which life history archetype should be used, based on Takada et al. 2018. An integer between 1 and 4.

split

TRUE/FALSE, indicating whether the matrix produced should be split into a survival matrix and a fertility matrix. Yeah true, then the output becomes a list with a matrix in each element. Otherwise, the output is a single matrix.

Details

Generates a random matrix population model (MPM) with element values based on defined life history archetypes. Survival and transition/growth probabilities from any particular stage are restricted to be less than or equal to 1 by drawing from a Dirichlet distribution. The user can specify archetypes (from Takada et al. 2018) to restrict the MPMs in other ways:

In all 4 of these Archetypes, fecundity is placed as a single element on the top right of the matrix, if it is a single value. If it is a vector of length n_stages then the fertility vector spans the entire top row of the matrix.

The function is constrained to only output ergodic matrices.

Value

Returns a random matrix population model with characteristics determined by the archetype selected and fecundity vector. If split = TRUE, the matrix is split into separate fertility and a growth/survival matrices, returned as a list.

Author(s)

Owen Jones jones@biology.sdu.dk

References

Caswell, H. (2001). Matrix Population Models: Construction, Analysis, and Interpretation. Sinauer.

Lefkovitch, L. P. (1965). The study of population growth in organisms grouped by stages. Biometrics, 21(1), 1.

Takada, T., Kawai, Y., & Salguero-Gómez, R. (2018). A cautionary note on elasticity analyses in a ternary plot using randomly generated population matrices. Population Ecology, 60(1), 37–47.

See Also

generate_mpm_set() which is a wrapper for this function allowing the generation of large numbers of random matrices of this type.

Other Lefkovitch matrices: generate_mpm_set(), rand_lefko_mpm(), rand_lefko_set()

Examples

set.seed(42) # set seed for repeatability

random_mpm(n_stages = 2, fecundity = 20, archetype = 1, split = FALSE)
random_mpm(n_stages = 2, fecundity = 20, archetype = 2, split = TRUE)
random_mpm(n_stages = 3, fecundity = 20, archetype = 3, split = FALSE)
random_mpm(n_stages = 4, fecundity = 20, archetype = 4, split = TRUE)
random_mpm(
  n_stages = 5, fecundity = c(0, 0, 4, 8, 10), archetype = 4,
  split = TRUE
)
# Using a range of values for fecundity
random_mpm(n_stages = 2, fecundity = 20, archetype = 1, split = TRUE)


[Package mpmsim version 3.0.0 Index]