noSpatCorr.test: Test for lack of spatial correlation

View source: R/uncorrelationTest.R

noSpatCorr.testR Documentation

Test for lack of spatial correlation

Description

Permutation test for checking lack of spatial correlation.

Usage

noSpatCorr.test(Z, ...)

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

## Default S3 method:
noSpatCorr.test(Z, ...)

## S3 method for class '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

data("jura", package="gstat")
X = jura.pred[, 1:2]
Z = data.frame(compositions::ilr(jura.pred[,-(1:6)]))
## Not run:  
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,]) 

## End(Not run)

gmGeostats documentation built on April 18, 2023, 5:08 p.m.