Learn R Programming

popdemo (version 0.1-2)

elas: Calculate elasticity matrix

Description

Calculate the elasticity matrix using eigenanalysis for a specified population projection matrix (PPM).

Usage

elas(A, eval="max")

Arguments

A
a square, non-negative numeric matrix of any dimension
eval
the eigenvalue to evaluate. Default is eval="max", which evaluates the dominant eigenvalue. Otherwise, specifying e.g. eval=2 will evaluate elasticity of the eigenvalue with second-largest modulus.

Value

  • An elasticity matrix of equal dimension to A.

Details

elas uses the eigenvectors of A to calculate the elasticity matrix of the specified eigenvalue, see section 9.1 in Caswell (2001).

References

Caswell (2001) Matrix Population Models 2nd ed. Sinauer.

See Also

sens

Examples

Run this code
# Create a 3x3 PPM
    A <- matrix(c(0,1,2,0.5,0.1,0,0,0.6,0.6), byrow=TRUE, ncol=3)
    A

    # Calculate elasticities of dominant eigenvalue
    elas(A)

    # Calculate elasticities of first subdominant eigenvalue
    elas(A, eval=2)

Run the code above in your browser using DataLab