MI.decomp | R Documentation |
A decomposition of the Moran coefficient in order to separately test for the simultaneous presence of positive and negative autocorrelation in a variable.
MI.decomp(x, W, nsim = 100)
x |
a vector or matrix |
W |
spatial connectivity matrix |
nsim |
number of iterations to simulate the null distribution |
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.
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
Sebastian Juhl
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.
MI.vec
, MI.ev
, MI.sf
,
MI.resid
, MI.local
, getEVs
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.