Learn R Programming

AST (version 0.1.0)

calcSpaceMat: 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

Examples

Run this code
# NOT RUN {
library("AST")
data(data.adjacent.mat,package="AST")
calcSpaceMat(data.adjacent.mat,par.space=0.9)

# }

Run the code above in your browser using DataLab