meigen_f {spmoran}R Documentation

Fast approximation of Moran eigenvectors

Description

This function performs a fast approximation of Moran eigenvectors and eigenvalues.

Usage

meigen_f( coords, model = "exp", enum = 200, s_id = NULL, coords_knot = NULL )

Arguments

coords

Matrix of spatial coordinates (N x 2)

model

Type of kernel to model spatial dependence. The currently available options are "exp" for the exponential kernel, "gau" for the Gaussian kernel, and "sph" for the spherical kernel. Default is "exp"

enum

Number of eigenvectors and eigenvalues to be extracted (scalar). Default is 200

s_id

Optional. Location/zone ID for modeling inter-group spatial effects. If specified, Moran eigenvectors are extracted by groups. It is useful e.g. for multilevel modeling (s_id is the groups) and panel data modeling (s_id is given by individual location id). Default is NULL

coords_knot

Matrix of spatial coordinates for knots that are used for the eigen-approximation (N_k x 2). If NULL, k-means centers are used. Default is NULL

Details

This function extracts approximated Moran eigenvectors from MCM. M = I - 11'/N is a centering operator, and C is a spatial connectivity matrix whose (i, j)-th element is given by exp( -d(i,j)/h), where d(i,j) is the Euclidean distance between the sample sites i and j, and h is a range parameter given by the maximum length of the minimum spanning tree connecting sample sites (see Dray et al., 2006).

Following a simulation result that 200 eigenvectors are sufficient for accurate approximation of ESF models (Murakami and Griffith, 2019), this function approximates the 200 eigenvectors corresponding to the 200 largest eigenvalues by default (i.e., enum = 200). If enum is given by a smaller value like 100, the computation time will be shorter, but with greater approximation error. Eigenvectors corresponding to negative eigenvalues are omitted from the enum eigenvectors.

Value

sf

Matrix of the first L approximated eigenvectors (N x L)

ev

Vector of the first L approximated eigenvalues (L x 1)

ev_full

Vector of all approximated eigenvalues (enum x 1)

other

List of other outcomes, which are internally used

Author(s)

Daisuke Murakami

References

Dray, S., Legendre, P., and Peres-Neto, P.R. (2006) Spatial modelling: a comprehensive framework for principal coordinate analysis of neighbour matrices (PCNM). Ecological Modelling, 196 (3), 483-493.

Murakami, D. and Griffith, D.A. (2019) Eigenvector spatial filtering for large data sets: fixed and random effects approaches. Geographical Analysis, 51 (1), 23-49.

See Also

meigen


[Package spmoran version 0.2.3 Index]