MI.decomp {spfilteR} | R Documentation |
Decomposition of the Moran Coefficient
Description
A decomposition of the Moran coefficient in order to separately test for the simultaneous presence of positive and negative autocorrelation in a variable.
Usage
MI.decomp(x, W, nsim = 100)
Arguments
x |
a vector or matrix |
W |
spatial connectivity matrix |
nsim |
number of iterations to simulate the null distribution |
Details
If x
is a matrix, this function computes the Moran
test for spatial autocorrelation for each column.
The p-values calculated for I+
and I-
assume
a directed alternative hypothesis. Statistical significance is assessed
using a permutation procedure to generate a simulated null distribution.
Value
Returns a data.frame
that contains the following information
for each variable:
I+
observed value of Moran's I (positive part)
VarI+
variance of Moran's I (positive part)
pI+
simulated p-value of Moran's I (positive part)
I-
observed value of Moran's I (negative part)
VarI-
variance of Moran's I (negative part)
pI-
simulated p-value of Moran's I (negative part)
pItwo.sided
simulated p-value of the two-sided test
Author(s)
Sebastian Juhl
References
Dary, Stéphane (2011): A New Perspective about Moran’s Coefficient: Spatial Autocorrelation as a Linear Regression Problem. Geographical Analysis, 43 (2): pp. 127 - 141.
See Also
MI.vec
, MI.ev
, MI.sf
,
MI.resid
, MI.local
, getEVs
Examples
data(fakedata)
X <- cbind(fakedataset$x1, fakedataset$x2,
fakedataset$x3, fakedataset$negative)
(MI.dec <- MI.decomp(x = X, W = W, nsim = 100))
# the sum of I+ and I- equals the observed Moran coefficient:
I <- MI.vec(x = X, W = W)[, "I"]
cbind(MI.dec[, "I+"] + MI.dec[, "I-"], I)