eigen_bam {bamm}R Documentation

eigen_bam: Compute the Eigen system of two bam objects

Description

Calculates the Eigen values and Eigen vectors of bam objects

Usage

eigen_bam(A = NULL, M = NULL, which_eigen = 1, rmap = TRUE)

Arguments

A

A bam object of class setA.

M

A bam object of class setM.

which_eigen

An integer representing the which eigen value and eigen vector will be computed.

rmap

Logical. If TRUE the function will return a map of the eigen vector of the product AM.

Details

The eigenvector associated with the dominant eigenvalue of an adjacency matrix provides information about the number of forms in which a cell can be visited from other cells. Details about the eigen analysis in the context of the area of distribution can be found in Soberon and Osorio-Olvera (2022).

Value

A list with four objects. 1) eigen_values (these are indicated in which_eigen parameter of the function), 2) eigen_vectors (the corresponding eigen vectors of each eigen value), 3) Standardized eigen vectors (0 to 1), 4) A RasterLayer depicting the information of the first eigen vector of the system.

Author(s)

Luis Osorio-Olvera & Jorge SoberĂ³n

References

SoberĂ³n J, Osorio-Olvera L (2022). “A Dynamic Theory of the Area of Distribution.” doi:10.48550/ARXIV.2212.06308, https://arxiv.org/abs/2212.06308..

Examples


model_path <- system.file("extdata/Lepus_californicus_cont.tif",
                          package = "bamm")
model <- raster::raster(model_path)
sparse_mod <- bamm::model2sparse(model = model,0.75)
plot(sparse_mod@niche_model)
adj_mod <- bamm::adj_mat(sparse_mod,ngbs = 1,eigen_sys = TRUE)
eig_bam <- bamm::eigen_bam(A=sparse_mod,M=adj_mod)
raster::plot(eig_bam$map)


[Package bamm version 0.4.3 Index]