calcSpaceMat {AST} | R Documentation |
Space Matrix Calculation for AST
Description
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.
Usage
calcSpaceMat(adjacent.mat, par.space = 0.9)
Arguments
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. |
Value
a square matrix
Note
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.
Author(s)
Parinaz Mehdipour, Ali Ghanbari
Examples
library("AST")
data(data.adjacent.mat,package="AST")
calcSpaceMat(data.adjacent.mat,par.space=0.9)
[Package AST version 0.1.0 Index]