Description Usage Arguments Value Note Author(s) Examples
a function that calculates the space matrix for AST model by determining adjacent locations and give them equal weights 1 and 0 for non-neighbors.
1 | calcSpaceMat(adjacent.mat, par.space = 0.9)
|
adjacent.mat |
a matrix for adjacent locations with weight 1 and 0 for non-neighbors. Rownames of this matrix must be match with location variable. |
par.space |
A parameter which specify the amount of correlation between adjacent locations. |
a square matrix
rowname of space matrix should be numeric and the same as location variable in data.residual.
If a shapefile is used for making adjacent matrix, package "spdep" can be used to identify neighbors.
Parinaz Mehdipour, Ali Ghanbari
1 2 3 | library("AST")
data(data.adjacent.mat,package="AST")
calcSpaceMat(data.adjacent.mat,par.space=0.9)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.