View source: R/uncorrelationTest.R
noSpatCorr.test | R Documentation |
Permutation test for checking lack of spatial correlation.
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))),
...
)
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 |
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.
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
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.