Computes the positive Moran's Eigenvector Maps of a distance matrix.

mem(
  distance.matrix = NULL,
  distance.threshold = 0,
  colnames.prefix = "mem"
)

Arguments

distance.matrix

Distance matrix. Default: NULL.

distance.threshold

Numeric vector with distance thresholds defining different neighborhood extents within the distance matrix, Default: 0

colnames.prefix

Character, name prefix for the output columns. Default: "mem"

Value

A data frame with positive Moran's Eigenvector Maps.

Details

Takes the distance matrix x, double-centers it with double_center_distance_matrix(), applies eigen, and returns eigenvectors with positive normalized eigenvalues (a.k.a Moran's Eigenvector Maps, or MEMs). These MEMs are later used as spatial predictors by rf_spatial().

Examples

if(interactive()){

 #loading example distance matrix
 data(distance_matrix)

 #Moran's Eigenvector Maps of the distance matrix
 mem <- mem(x = distance_matrix)

}