Nicolle Salamanca
library(readxl)
bd <- BD_MODELADO
library(DT)
Registered S3 method overwritten by 'htmlwidgets':
method from
print.htmlwidget tools:rstudio
datatable(bd , class='cell-border stripe', filter='top', options = list(pageLength=10,autoWidth=T))
library(ggplot2)
ggplot(bd, aes(x = Avg_X_MCB, y=Avg_Y_MCE, colour=Avg_CEa_07))+
geom_point(size = 3, shape = 17)+
scale_color_continuous(type = 'viridis')
ggplot(bd, aes(x = Avg_X_MCB, y=Avg_Y_MCE, colour=Avg_CEa_15))+
geom_point(size = 3, shape=17)+
scale_color_continuous(type = 'viridis')
ggplot(bd, aes(x = Avg_X_MCB, y=Avg_Y_MCE, colour=NDVI))+
geom_point(size = 3, shape = 17)+
scale_color_continuous(type = 'viridis')
library(ape)
package 㤼㸱ape㤼㸲 was built under R version 3.6.3
bd.dists<-as.matrix(dist(cbind(bd$Avg_X_MCB, bd$Avg_Y_MCE)))
dim(bd.dists)
[1] 313 313
bd.dists.inv<-1/bd.dists
bd.dists.inv[is.infinite(bd.dists.inv)] <- 0
diag(bd.dists.inv)<-0
bd.dists.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
Índice de Moran CE a 70cm de profundidad
I.M.70<-Moran.I(bd$Avg_CEa_07, bd.dists.inv); I.M.70
$observed
[1] 0.2687468
$expected
[1] -0.003205128
$sd
[1] 0.004665906
$p.value
[1] 0
Debido a que el indice de morán es 0,27 a 70cm de profundidad existe una dependencia espacial positiva
Índice de Morán CE a 150cm de profundidad
I.M.150<-Moran.I(bd$Avg_CEa_15, bd.dists.inv); I.M.150
$observed
[1] 0.160951
$expected
[1] -0.003205128
$sd
[1] 0.00465455
$p.value
[1] 0
Debido a que el indice de morán es 0,16 a 150cm de profundidad existe una dependencia espacial positiva
Índice de Morán del NDVI
I.M.NDVI<-Moran.I(bd$NDVI, bd.dists.inv); I.M.NDVI
$observed
[1] 0.09750403
$expected
[1] -0.003205128
$sd
[1] 0.004644979
$p.value
[1] 0
Debido a que el indice de morán del NDVI es 0,09 existe una dependencia espacial positiva