Learn R Programming

popdemo (version 0.1-2)

blockmatrix: Block-permute a reducible matrix

Description

Block-permute a reducible matrix

Usage

blockmatrix(A)

Arguments

A
a square, reducible, non-negative numeric matrix of any dimension

Value

  • A list containing components:
  • blockmatrixthe block-permuted matrix.
  • orderthe permutation of rows/columns of A in the block-permuted matrix.

Details

Any reducible matrix may have its rows and columns simultaneously permuted so that it takes a specific structure, with irreducible square submatrices on the diagonal, zero submatrices in the lower triangle and nonzero submatrices in the upper triangle (see Caswell 2001; Stott et al. 2010). blockmatrix permutes a reducible matrix into this form, which enables further evaluation (e.g. computation of eigenvalues of submatrices).

References

Caswell (2001) Matrix population models 2nd ed. Sinauer. Stott et al. (2010) Methods. Ecol. Evol., 1, 242-252.

Examples

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

    # Block-permute the matrix
    blockmatrix(A)

Run the code above in your browser using DataLab