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)
Run the code above in your browser using DataLab