Description Usage Arguments Value Author(s)
Produce an RW2 Adjacency matrix for a rectangular grid for use with areal spatial models. This formulation uses cofficients inspired by a thin plate spline, as described in Rue & Held, section 3.4.2 Here I'm outputting an adjacency matrix of 'neighbor weights' which makes Q construction for regular latices easy to do when not trying to make inference about all cells (i.e., one can just eliminate rows and columns associated with cells one isn't interested in and set Q=-Adj+Diag(sum(Adj))
1 | rect_adj_RW2(x, y, byrow = FALSE)
|
x |
number of cells on horizontal side of grid |
y |
number of cells on vertical side of grid |
byrow |
If TRUE, cell indices are filled along rows (default is FALSE) |
adjacency matrix
Paul Conn paul.conn@noaa.gov
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.