Spatial Analysis - Clustering

download Spatial Analysis - Clustering

of 5

Transcript of Spatial Analysis - Clustering

  • 8/11/2019 Spatial Analysis - Clustering

    1/5

    Gianni Gorgoglione

    1

    Spatial Analysis Clustering

    Work example in Ry

  • 8/11/2019 Spatial Analysis - Clustering

    2/5

    Gianni Gorgoglione

    2

    The Moran I-value is calculated by using the variable a7 from vector list that has the neighbours list ofspatial weights of a7_mbq. The returned values contain even a z-value.

    Then, it has been defined variables z.value.class, a7_moran_class and, a7_moran_class@data[,1] byextracting the interesting values for the object a7_moran_class z-values.

    Install.packages(spdep) a7_getis

  • 8/11/2019 Spatial Analysis - Clustering

    3/5

    Gianni Gorgoglione

    3

    The clustering method of this data sample is Morans I. The spot representing values above +1 are thosearea where we can expect a strong spatial pattern, thus we can reject the null hypothesis. In otherwords, in those area there is clustering. On the other hand, the yellow zones represent those areawhere Morans I is below 1 or O. These are the cases where there is not pattern or it is extremely rare tofind one.

    plot(ps, col=grey(0:256/256), legend=FALSE, main="Getis/OrdG*",ext=c(665850,667100,7587400,7588600))par(bg="transparent")plot(y, border="white", col="transparent", add=TRUE)

    666000 666200 666400 666600 666800 667000

    7 5 8 7 4 0 0

    7 5 8 7 8

    0 0

    7 5 8 8 2 0 0

    7 5 8 8 6 0 0

    Local Morans I

    under -2.58-2.58 - -1.96-1.96 - -1.65-1.65 - 1.651.65 - 1.961.96 - 2.58over 2.58

  • 8/11/2019 Spatial Analysis - Clustering

    4/5

    Gianni Gorgoglione

    4

    par(bg="transparent")plot(a7_getis_class,col=rgb.palette(8)[cut(a7_getis,breaks=brks)],add=TRUE)legend("topleft", legend=leglabs(brks), fill=rgb.palette(7), bty="white",bg="white")

    In this case, we can see both the zone with a high and low TWI value. That was possible by using thestatistical function LocalG that calculated points values according to high and low values of clusters

    values.

    Morans I takes into account weight term that represents the relationship between two elements in thedataset and tell about their spatial relationship. So, its possible to decide the weight by using a simpleapproach where in case of adjacency the weight will be 1 and in other case 0. (Binary table).

    Then, the weight is multiplied with an expression that compares attribute values for each pair of values(the mean and standard deviation of all dataset), with the z-scores of the variable values for each value.

    666000 666200 666400 666600 666800 667000

    7 5 8 7 4 0 0

    7 5 8 7 6 0 0

    7 5 8 7 8 0 0

    7 5 8 8 0 0 0

    7 5 8 8 2 0 0

    7 5 8 8 4 0 0

    7 5 8 8 6 0 0

    Getis/Ord G*

    under -2.58

    -2.58 - -1.96

    -1.96 - -1.65

    -1.65 - 1.65

    1.65 - 1.96

    1.96 - 2.58

    over 2.58

  • 8/11/2019 Spatial Analysis - Clustering

    5/5

    Gianni Gorgoglione

    5

    At the end, Morans I value as +1 indicate a very strong spatial pattern. Morans I closer to -1 indicate arare spatial pattern and values around 0 indicate an absence of spatial pattern. We can say that thespatial process was random.

    The Getis-Ord Gi* give as result a z-score. This is significant to understand if high values and low values

    are clustered. The larger the z-score the more intense are the positive clustered values. Vice-versa, thesmaller the z-score is, the more intense the clustered low values. Thus, we have hot spot and cold spotdepending of the z-value.

    The main difference between these global statistics test is the Getis G* tells more about the clusteredtype value. It is possible to detect if clusters have high values or not.