mpm_collapse: Collapse a matrix population model to a smaller number of...

View source: R/mpm_collapse.R

mpm_collapseR Documentation

Collapse a matrix population model to a smaller number of stages

Description

Collapse a matrix population model to a smaller number of stages. For instance, to compare properties of multiple projection matrices with different numbers of stages, one might first collapse those matrices to a standardized set of stages (e.g., propagule, pre-reproductive, reproductive, and post-reproductive). The transition rates in the collapsed matrix are a weighted average of the transition rates from the relevant stages of the original matrix, weighted by the relative proportion of each stage class expected at the stable distribution.

Usage

mpm_collapse(matU, matF, matC = NULL, collapse)

Arguments

matU

The survival component of a matrix population model (i.e., a square projection matrix reflecting survival-related transitions; e.g., progression, stasis, and retrogression)

matF

The sexual component of a matrix population model (i.e., a square projection matrix reflecting transitions due to sexual reproduction)

matC

The clonal component of a matrix population model (i.e., a square projection matrix reflecting transitions due to clonal reproduction). Defaults to NULL, indicating no clonal reproduction (i.e., matC is a matrix of zeros).

collapse

A list giving the mapping between stages of the original matrix and the desired stages of the collapsed matrix (e.g., list(1, 2:3, 4)). Original stages may be passed as either indices or stage names corresponding to stage index or name in matU, matF and matC). Names given to the elements of collapse are used as stage names in the new, collapsed matrix.

See Missing Stages for handling of NA within collapse.

Value

A list with four elements:

matA

Collapsed projection matrix

matU

Survival component of the collapsed projection matrix

matF

Sexual reproduction component of the collapsed projection matrix

matC

Clonal reproduction component of the collapsed projection matrix

Missing Stages

The collapsed matrix will always be of dimension length(collapse), even if one or more elements of the collapse argument is NA (corresponding to a desired stage of the collapsed matrix that is not present in the original matrix). In the collapsed matrix, any row/column corresponding to a missing stage will be coerced to NA.

Note

This method of collapsing a matrix population model preserves the equilibrium population growth rate (lambda) and relative stable distribution, but is not expected to preserve other traits such as relative reproductive values, sensitivities, net reproductive rates, life expectancy, etc.

Author(s)

Rob Salguero-Gómez <rob.salguero@zoo.ox.ac.uk>

William K. Petry <wpetry@ncsu.edu>

References

Salguero-Gomez, R. & Plotkin, J. B. 2010. Matrix dimensions bias demographic inferences: implications for comparative plant demography. The American Naturalist 176, 710-722. <doi:10.1086/657044>

See Also

mpm_standardize

Other transformation: is_leslie_matrix(), leslie_collapse(), mpm_rearrange(), mpm_split(), mpm_standardize(), name_stages(), repro_stages(), standard_stages()

Examples

data(mpm1)

# check which stages reproductive
repro_stages(matR = mpm1$matF)

# collapse reproductive stages (3 and 4) into single stage
mpm_collapse(
  matU = mpm1$matU, matF = mpm1$matF,
  collapse = list(1, 2, 3:4, 5)
)

# use stage names instead, and name stages in the collapsed matrix
mpm_collapse(
  matU = mpm1$matU, matF = mpm1$matF,
  collapse = list(
    seed = "seed", vegetative = "small",
    flowering = c("medium", "large"),
    dormant = "dormant"
  )
)


Rage documentation built on Sept. 30, 2023, 1:06 a.m.