Prepare data for the SAR model when your raw dataset consists of observations on a regular tessellation, such as a raster layer or remotely sensed imagery. The rook criteria is used to determine adjacency. This function uses Equation 5 from Griffith (2000) to calculate the eigenvalues for a row-standardized spatial weights matrix of a P-by-Q dimension regular tessellation.
This function can accommodate very large numbers of observations for use with stan_sar
; for large N data, it is also recommended to use slim = TRUE
or the drop
argument. For details, see: vignette("raster-regression", package = "geostan")
.