gmGeostats (version 0.10-6)

noSpatCorr.test: Test for lack of spatial correlation

Description

Permutation test for checking lack of spatial correlation.

Usage

noSpatCorr.test(Z, ...)

# S3 method for data.frame noSpatCorr.test(Z, X, ...)

# S3 method for default noSpatCorr.test(Z, ...)

# S3 method for matrix noSpatCorr.test( Z, X, R = 299, maxlag0 = 0.1 * max(as.matrix(dist(X))), minlagInf = 0.25 * max(as.matrix(dist(X))), ... )

Arguments

Z

matrix (or equivalent) of scaled observations

...

extra arguments for generic functionality

X

matrix (or equivalent) of sample location coordinates

R

number of realizations of the Monte Carlo test

maxlag0

maximum lag distance to consider in the short range covariance

minlagInf

minimum lag distance to consider in the long range covariance

Value

Produces a test of lack of spatial correlation by means of permutations. The test statistic is based on the smallest eigenvalue of the generalised eigenvalues of the matrices of covariance for short range and for long range.

Methods (by class)

  • data.frame: Test for lack of spatial correlation

  • default: Test for lack of spatial correlation, works only for Spatial objects with a "data" slot

  • matrix: Test for lack of spatial correlation

Examples

Run this code
# NOT RUN {
data("jura", package="gstat")
X = jura.pred[, 1:2]
Z = data.frame(compositions::ilr(jura.pred[,-(1:6)]))
noSpatCorr.test(Z=Z, X=X)
# now destroy the spatial structure reshuffling the coordinates:
ip = sample(nrow(X))
noSpatCorr.test(Z=Z, X=X[ip,]) 
# }

Run the code above in your browser using DataCamp Workspace