Computes the Global Moran's I statistic and expectation. Can produce spatial weights from an adjacency or sf dataframe, in which case the spatial_mat is a contiguity matrix. Users can also provide a spatial_mat argument directly.
Arguments
- shp
sfdataframe. Optional ifadjorspatial_matis supplied.- adj
Zero-indexed adjacency list. Optional if
shporspatial_matis supplied.- wts
Numeric vector of observed values.
- spatial_mat
Square spatial weights matrix. Optional if
shporadjis supplied.- epsg
numeric EPSG code to planarize to. Default is 3857.
