Prepare input data for the CAR model when your dataset consists of observations on a regular (rectangular) 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 generate approximate eigenvalues for a row-standardized spatial weights matrix from a P-by-Q dimension regular tessellation.
This function can accommodate very large numbers of observations for use with stan_car
; for large N data, it is also recommended to use slim = TRUE
or the drop
argument. For more details, see: vignette("raster-regression", package = "geostan")
.