library(DT)
library(readxl)
BD_MODELADO <- read_excel("BD_MODELADO.xls")
BD_MODELADO1 <- BD_MODELADO[, -c(6, 7, 8)]
datatable(BD_MODELADO1)
library(ggplot2)
library(cowplot)

gfc1 <- ggplot(BD_MODELADO1, aes(x = Avg_X_MCB, y = Avg_Y_MCE, colour=
        Avg_CEa_07)) + geom_point(size = 2, shape= 10) + theme_void() +
        scale_color_continuous(type = 'viridis')

gfc2 <-  ggplot(BD_MODELADO1, aes(x = Avg_X_MCB, y = Avg_Y_MCE, colour=
        Avg_CEa_15)) + geom_point(size = 2, shape= 10) + theme_void() +
        scale_color_continuous(type = 'viridis')

gfc3 <-  ggplot(BD_MODELADO1, aes(x = Avg_X_MCB, y = Avg_Y_MCE, colour=
        NDVI)) + geom_point(size = 2, shape= 10) + theme_void() +
        scale_color_continuous(type = 'viridis')

plot_grid(gfc1, gfc2, gfc3, labels = "AUTO") 

Para determinar el indice de Moran se deben convertir los datos a una matriz y a esta se le debe hallar la inversa

library(ape)
BD_MODELADO1_dist <- as.matrix(dist(cbind(BD_MODELADO1$Avg_X_MCB,
                                          BD_MODELADO1$Avg_Y_MCE)))
dim(BD_MODELADO1_dist)
## [1] 313 313
BD_MODELADO1_dist_inv <- 1/BD_MODELADO1_dist 
diag(BD_MODELADO1_dist_inv) <- 0 
BD_MODELADO1_dist_inv[1:5, 1:5]
##            1          2          3          4          5
## 1 0.00000000 0.19320482 0.02207833 0.05403989 0.04558763
## 2 0.19320482 0.00000000 0.02476496 0.04650837 0.05738726
## 3 0.02207833 0.02476496 0.00000000 0.01665161 0.03039597
## 4 0.05403989 0.04650837 0.01665161 0.00000000 0.03392139
## 5 0.04558763 0.05738726 0.03039597 0.03392139 0.00000000

Indice de Moran para CE a 75:

Moran.I(BD_MODELADO1$Avg_CEa_07, BD_MODELADO1_dist_inv)
## $observed
## [1] 0.2687468
## 
## $expected
## [1] -0.003205128
## 
## $sd
## [1] 0.004665906
## 
## $p.value
## [1] 0

Indice de Moran para CE a 150:

Moran.I(BD_MODELADO1$Avg_CEa_15, BD_MODELADO1_dist_inv)
## $observed
## [1] 0.160951
## 
## $expected
## [1] -0.003205128
## 
## $sd
## [1] 0.00465455
## 
## $p.value
## [1] 0

Indice de Moran para NDVI:

Moran.I(BD_MODELADO1$NDVI, BD_MODELADO1_dist_inv)
## $observed
## [1] 0.09750403
## 
## $expected
## [1] -0.003205128
## 
## $sd
## [1] 0.004644979
## 
## $p.value
## [1] 0

A continuacion se prenta el indice de Moran realizado con GeoDa Conductividad Electrica a 75

Conductividad Electrica a 150 Conductividad Electrica a NDVI