This wrapper function calculates global and local Moran's I statistics to measure spatial autocorrelation by discrete area.
Arguments
- dat
Primary data containing information on hauls or trips. Table in FishSET database contains the string 'MaindataTable'.
- var
Numeric variable from
datto test for spatial autocorrelation.- dat_zone
Variable in
datthat identifies the individual zones or areas. Define if exists indatand is not named `ZoneID`. Defaults to NULL.- spat
Spatial data containing information on fishery management or regulatory zones. Shape, json, geojson, and csv formats are supported.
- spat_zone
Variable or list in
spatthat identifies the individual areas or zones. Ifspatis class sf,catshould be name of list containing information on zones.- project
Name of the project
Value
Returns a list with (1) global Moran's I stats, (2) Moran lagged plot, (3) LISA cluster map summarizing local Moran's values
Details
The function measures the degree of spatial autocorrelation and utilizes functions from the `spdep` package. The function requires a spatial file with latitude and longitude coordinates defining the boundaries of areas or zones and a variable of interest (`var`) to test for spatial autocorrelation.
