prep_car_data2: Prepare data for the CAR model: raster analysis

View source: R/raster-analysis.R

prep_car_data2R Documentation

Prepare data for the CAR model: raster analysis

Description

Prepare a list of data required for the CAR model; this is for working with (large) raster data files only. For non-raster analysis, see prep_car_data.

Usage

prep_car_data2(row = 100, col = 100, quiet = FALSE)

Arguments

row

Number of rows in the raster

col

Number of columns in the raster

quiet

Controls printing behavior. By default, quiet = FALSE and the range of permissible values for the spatial dependence parameter is printed to the console.

Details

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").

Value

A list containing all of the data elements required by the CAR model in stan_car.

Source

Griffith, Daniel A. (2000). Eigenfunction properties and approximations of selected incidence matrices employed in spatial analyses. Linear Algebra and its Applications 321 (1-3): 95-112. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/S0024-3795(00)00031-8")}.

See Also

prep_sar_data2, prep_car_data, stan_car.

Examples


row = 100
col = 120
car_dl <- prep_car_data2(row = row, col = col)


geostan documentation built on April 3, 2025, 10:04 p.m.