Top Banner
Descriptive methods for spatial statistics Kirsi Virrantaus GIS-E1060 Spatial Analytics Department of Built Environment Aalto University 27.10.2020
42

Descriptive methods for spatial statistics

Nov 02, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Descriptive methods for spatial statistics

Descriptive methods

for spatial statistics

Kirsi Virrantaus

GIS-E1060 Spatial Analytics

Department of Built Environment

Aalto University

27.10.2020

Page 2: Descriptive methods for spatial statistics

Kuvailevat tilastolliset

menetelmät

spatiaalianalyysissä

Kirsi Virrantaus

GIS-E1060 Spatial Analytics

Rakennetun ympäristön laitos

Aalto-yliopisto

27.10.2020

Page 3: Descriptive methods for spatial statistics

1. Descriptive spatial statistics

• Use of quantitative measures, simple summaries

• Apply them to sample data sets

• Utilization of visual methods

• Used also in so-called explorative analysis

• Difference to statistical inference – no hypothesis testing

• Examples of simple spatial measures:

Page 4: Descriptive methods for spatial statistics

1. Kuvaileva spatiotilastotiede

• Kvantitatiivisten tunnuslukujen käyttö

• Otosaineiston kuvaamiseen

• Visuaalisten menetelmien käyttö

• Käytetään ns. eksploratiivisessa/tutkivassa analyysissä

• Ero tilastolliseen päättelyyn, ei hypoteesin testausta

• Esimerkkejä spatiaalisista tunnusluvuista:

Page 5: Descriptive methods for spatial statistics

Simple indices of descriptive spatial

statistics

– frequency• amount of the objects in the study area

– intensity• amount of objects per unit area

– mean center • is the point whose coordinates are the mean of the

corresponding coordinates of all the events of the pattern; average x, average y;

– median center• is the location to which the sum of traveled distances from

points is shortest; shortest total distance to all other features in the study area

– distance• in larger scales, assumption that the world is flat: most often

Euclidian distance

– standard distance• shows how dispersed the points are around the mean center

Page 6: Descriptive methods for spatial statistics

Yksinkertaisia kuvailevan

spatiotilastotieteen tunnuslukuja

– frekvenssi (tilastotieteessä) (esiintymistiheys)

• (samanarvoisten) pisteiden määrä tutkimusalueella

– tiheys

• kohteiden lukumäärä alueyksikössä

– keskiarvopiste

• piste, jonka koordinaatit ovat pistejoukon vastaavien koordinaattien keskiarvot

– mediaanipiste

• piste, josta etäisyyksien summa toisiin pisteisiin tutkimusalueella on pienin

– etäisyys

• tavallisesti Euklidinen etäisyys (muitakin on)

– keskietäisyys

• kuvaa pisteiden hajontaa keskiarvopisteen ympärillä

Page 7: Descriptive methods for spatial statistics

2. Some descriptive spatio-statistical

methods

• Descriptive methods

– Kernel density estimation

• Density/intensity based

– G-, F-, K-function

• Use distances between points/objects

– can used for point sets, also for areas and lines

Page 8: Descriptive methods for spatial statistics

2. Spatiotilastollisia kuvailevia menetelmiä

• Kuvailevia menetelmiä– Kernel tiheysestimointi

• Perustuu pistetiheyteen

– G-, F- ja K-funktiot

– Perustuu pisteiden/kohteiden välisiin etäisyyksiin

– Voidaan käyttää pistejoukoille, alueille ja viivoille

Page 9: Descriptive methods for spatial statistics

Density estimation

Naive Kernel method

• basic idea is that the point pattern has intensity in each location, not only in the event point

• by the “naive method”

– in each location of the study region the intensity is calculated inside for example a circle

– the amount of points inside kernel gives the value at each point directly

– compare Focal mean (in Map Algebra) (comes later)

– compare the floating average quadrat method (comes later)

Page 10: Descriptive methods for spatial statistics

Tiheyden estimointi

yksinkertainen Kernel menetelmä

• perusajatus on että pistekuviolla on tiheys jokaisessasijainnissa tutkimusalueella, ei ainoastaantapahtumapisteissä

• yksinkertaisin menetelmä

– jokaisessa tason sijainnisssa (esim. gridinpisteessä) lasketaan ympyrän sisälle jäävienpisteiden määrästä tiheyttä kuvaava arvo, pikselille tulee suoraan tämä tiheysarvo

– vrt FocalMean (Kartta-algebrassa)

– vrt. liukuvan keskiarvon tutkimusalamenetelmä

Page 11: Descriptive methods for spatial statistics

Variations of Kernel estimation

• a mathematical function can be used for weightingaccording to the inverse distance

– a suitable bivariate function is selected (kernel), for weighting every known value location, max weight in thecenter, on the edge 0;

– every cell is then visited and the weighted values aresummed up to the location

– bandwidth defines the region for the function; suitablewidth is important, if b is too big the result is flat, it is istoo small too many details

– ”dark” areas when points are clustering

Page 12: Descriptive methods for spatial statistics

Kernel-tiheysestimointi

• käytetään matemaattista funktiota painotukseen

– valitaan k, 2-ulotteinen tiheysfunktio (kernel, ydin),

jonka avulla pisteet painotetaan, keskipisteessä

paino max, reunalla 0;

– kuljetaan jokaisen pisteen kautta ja summataan

pisteen arvoksi

– bandwidth (ytimen leveys) määrittää alueen, jolle

funktio ulottuu; haettava sopiva leveys, kun b kasvaa

tulos on ”litteä”, kun b on pieni paljon detaljeja

– syntyy ”tummia” alueita kun pisteet klusteroituu

Page 13: Descriptive methods for spatial statistics

Kernel-menetelmän käyttö (Krisp, 2006)

• Kernel menetelmä

• yksittäisistä

havainnoista

• tiheyspinnaksi

yksittäiset havainnot tiheyspinta

Page 14: Descriptive methods for spatial statistics

Valittava oikea pikselikoko

Selecting the pixel size

• Laskennansolukoonpäättäminen –pieni solukokovaatii paljonlaskentaa muttatulos on visuaalisestiparempi

• Decision on the pixel size – small pixels require a lot of computation but result is visually better

• (Krisp,2006)a. Solukoko 250 pikseliä b. Solukoko 25 pikseliä

Page 15: Descriptive methods for spatial statistics

Kernel-säteen valinta (Krisp)

• Mitä suurempi säde sitäyleistetympi esitys

• Pieni säde näyttää enemmänyksityiskohtia

• Kernel-mentelmä on yksinkertainen ja helppokäyttää, mutta oikea käyttövaatii menetelmänkäyttäytymisen ymmärtämistä

• The bigger the radius the moregeneralized the presentation is

• Small radius shows moredetails

• Method is easy to use butinterpretation needs expertice

Page 16: Descriptive methods for spatial statistics

Visualisointi: aikasarjat• Hirvitiheysaineistoja vuosilta 2001, 2002, 2003

kaksidimensioisina tiheyskarttoina• Väriskaala punaisesta (korkea tiheys), oranssi, keltainen,

vihreään (alhainen tiheys); hirvitiheys = hirveäneliökilometrille

• Tiheyskartat tuottanut Jukka Krisp (TKK) väitöskirjatutkimuksessaan

Moose per km2

Page 17: Descriptive methods for spatial statistics

Muita visualisointimahdollisuuksia

Korkeuskäyräesitys

TIN-mallin avulla tuotettu

3d-kuvaHirvitiheys

Page 18: Descriptive methods for spatial statistics

Mathematics behind

• Kernel density estimation is a smoothing method that is based on

a sample of data

• Mathematically Kernel density estimation is actually a non-

parametric method to estimate probability density based on a data

sample

• Kernel density method is a kind of generalization of histogram

• A histogram

– a graphical presentation of the distribution of the data, graph showing the

frequencies of the values at specified intervals

– a histogram can also be seen as a simple kernel density estimation of the

function behind the data

• The naive Kernel density method is based on the so-called naive

estimator based on histogram

• In the spatial case Kernel density estimation is applied in 2d form

• Softwares offer Kernel density estimation function for points and

lines; you can find Kernel in R and in ArcGIS

Page 19: Descriptive methods for spatial statistics

https://www.wikiwand.com/fi/Histogrammi

Kernel density estimation is non-parametric estimation

method of distribution. Kernel density estimation can be seen

as generalization of histogram.

Page 20: Descriptive methods for spatial statistics

Kernel menetelmän

matematiikka

• Kernel tiheysmenetelmä on pehmennysmenetelmä, joka

perustuu otokseen

• Voidaan verrata histogrammimenetelmään, jossa esitetään

graafisesti aineiston jakautuminen eri arvoalueille

• Histogrammia voidaan pitää yksinkertaisena Kernel

tiheysestimaattina datan edustamasta funktiosta

• Tämän naiivi estimaattori on myös käyttämämme Kernel

tiheysmenetelmän idea, joten matemaattisesti ajateltuna se on

ei-parametrinen tiheysfunktion estimointimenetelmä

• Spatiaalisissa sovelluksissa Kernel-menetelmää käytetään 2d

muodossa, pistemäisille ja viivamaisille kohteille

• Kernel menetelmä löytyy mm. R-ohjelmistosta ja ArcGIS –

ohjelmistosta

Page 21: Descriptive methods for spatial statistics

More descriptive spatial statistic tools

Cluster analysis by using distances

• Nearest neighbor

• Distance functions

– G-function

– F-function

– K-function

Page 22: Descriptive methods for spatial statistics

Muita kuvailevia spatiotilaston työkaluja

Etäisyyksiin perustuvat klusteroinnin

analyysimenetelmät

• Lähin naapuri

• Etäisyysfunktiot

– G-funktio

– F-funktio

– K-funktio

Page 23: Descriptive methods for spatial statistics

Clustering: nearest neighbours,

G-,F- and K-functions

• analysis of the phenomenon by the

– distances between events

– 1) w = distance between a datapoint and the nearest

neighbour (another datapoint) of it, cumulative, empirical

distribution function G(w), visual analysis and

interpretation

– distances between events and random locations

– 2) x = distance between a randomly selected location and

the nearest datapoint, distribution function F(x), visual

analysis and interpretation

Page 24: Descriptive methods for spatial statistics

Lähimmät naapurit, G-, F- ja K-

funktiot

• ilmiöiden tutkiminen

– datapisteiden keskinäisten etäisyyksien avulla

– 1) w = etäisyys datapisteen ja sen lähimmän naapurin välillä, lasketaan kumulatiivinen, empiirinen tiheysfunktio G(w), visuaalinen tarkastelu ja tulkinta

– satunnaisen sijainnin ja datapisteen etäisyyksien avulla

– 2) x = etäisyys satunnaisen pisteen ja sen lähimmän naapurin (datapisteen) välillä, tiheysfunktio F(x), visuaalinen tarkastelu ja tulkinta

Page 25: Descriptive methods for spatial statistics

• by describing the distribution functions in a suitableway clustering or regular/random distribution can beanalysed visually

• if the function climbs very steeply in the early partbefore flattening out; high probability to short nearestneighbour distances that would suggest clustering

Page 26: Descriptive methods for spatial statistics

• empiirisiä tiheysfunktioita havainnollistamalla sopivalla tavalla, voidaan tulkita klusteroitumista tai tasaista jakautumista

• jos funktio nousee hyvin jyrkkänä ja sitten tasoittuu on aineistossa paljon lyhyitä etäisyyksiä naapuriin => klusteroituminen

Page 27: Descriptive methods for spatial statistics

(O´Sullivan & Unwin)

Page 28: Descriptive methods for spatial statistics

Formulas from the text book

G-function

𝐺 𝑑 = 𝑛𝑜. (𝑑𝑚𝑖𝑛 𝑠𝑖 < 𝑑)/𝑛

-distance to the nearest neighbour

F-function

𝐹 𝑑 = 𝑛𝑜. (𝑑𝑚𝑖𝑛 𝒑𝑖 , 𝑆 </𝑚

-minimum distance to a randomly selected point p in

the study region to any event in the point pattern S

Page 29: Descriptive methods for spatial statistics

Comparing G-function and F-function

• In G-function the cumulative frequency graph is calculated by

making a graph based on the empirical data

• Distances to nearest neighbour are calculated from each point and

the function gets value per each shortest distance; the value tells

for each d what fraction of all nearest neighbour distances are less

than d (see the formula on page 89; O´Sullivan&Unwin)

• In F-function the principle is the same but the nearest neighbour

distances are calculated from random points in the study area (p.

91)

• G-function tells how close together points are

• F-function tells how far from arbitrary location points are

Page 30: Descriptive methods for spatial statistics

G-funktion ja F-funktion vertailua

• G-funktio kertoo kaikille etäisyyksille d, kuinka monta sellaista

lähintä pisteparia aineistossa on, joiden etäisyys on pienempi kuin

d; määrä ilmaistaan suhteessa koko pisteparimäärään (ks. Kaava

sivulla 89, O´Sullivan&Unwin)

• F-funktio toimii samalla tavalla, mutta etäisyydet lasketaan

jokaiseen pisteeseen satunnaisista pisteistä (s. 91)

• G-funktio kertoo kuinka lähellä toisiaan pisteet ovat

• F-funktio kertoo kuinka kaukana pisteet ovat satunnaisesta

sijainnista

Page 31: Descriptive methods for spatial statistics

K-function, so-called Ripley´s K-fuction

– In nearest neighbor methods only nearest are studied

– K-function analyses the distribution in bigger area

– Principle:

• Imagine that around each point circles are created at distance d

• Count the number of points in each d and then calculate the average

• Divide the empirical average by the density of points

– 𝐾 𝑑 = σ𝑖=1𝑛 𝑛𝑜. (𝑆 ∈ 𝐶(𝑠𝑖 , 𝑑))/𝑛𝜆

• C in the formula is the area at distance d from point s

• λ is the point density

– K value can be interpreted: clustered or not

– See Fig. O´Sullivan&Unwin, s. 94

– K-function is revisited in next lecture when we look at statistical inference and hypothesis testing in more detail

Page 32: Descriptive methods for spatial statistics

(O´Sullivan & Unwin)

Page 33: Descriptive methods for spatial statistics

K-funktio – lähimmän naapurin menetelmän ongelma – tutkitaan vain lähimpiä

– K-funktio ilmaisee spatiaalisen riippuvuuden laajemmalla alueella

– Periaate:

• Ajatellaan, että jokaisen pisteen ympärille on luotu ympyränkaariasäteellä d

• Lasketaan pisteiden lukumäärä jokaisella etäisyydellä ja lasketaansiitä keskiarvo

• Jaetaan keskiarvoluku koko tarkastelualueen pistetiheydellä

• Tämä tehdään jokaisella etäisyydellä

– 𝐾 𝑑 = σ𝑖=1𝑛 𝑛𝑜. (𝑆 ∈ 𝐶(𝑠𝑖 , 𝑑))/𝑛𝜆

• C on kaavassa d-etäisyydellä oleva ympyrä keskipisteenä s

• λ on pistetiheys koko alueella

– K:n arvo kertoo klusteroituneen tai säännöllisen tapauksen

– Ks. kuva O´Sullivan&Unwin, s. 94

Page 34: Descriptive methods for spatial statistics

Comparing the distribution of two phenomena

– two point patterns(O´Sullivan, Unwin, pp. 123…)

• for example pollution and diseases

• the distances of points in two point sets are analysed by using K-function

– randomness of the distances

• the simple test:

– calculate K-function for both point patterns and interpret theresult

Page 35: Descriptive methods for spatial statistics

Kahden ilmiön – kahden pistekuvion vertailu(O´Sullivan, Unwin, pp. 123…)

• esim. sairaustapaukset ja ympäristöhaitat

• tutkitaan kahden pistejoukon pisteiden välisiä etäisyyksiä K-funktion avulla

– tutkitaan ovatko etäisyydet satunnaisia

• yksinkertaisin testi:

– lasketaan K-funktio kummallekin aineistolle ja tulkitaan

Page 36: Descriptive methods for spatial statistics

Applying G-function for spatial

dependency of two datasets

• G-function can be applied for two datasets

• The distances are calculated from each point on layer 1 to the nearest

point on layer 2

• Otherwise the methods is used as for one data set

• Spatenkova used this in her doctoral thesis work

Page 37: Descriptive methods for spatial statistics

G-funktio kahden datasetin välisen

riippuvuuden tutkimiseen

• Lasketaan etäisyydet jokaisesta tason 1 pisteestä lähimpään

naapuriin tasolla 2

• Muutoin käytetään G-funktiota kuten yhdelle aineistolle

• Spatenkova käytti tätä väitöskirjatutkimuksessaan

Page 38: Descriptive methods for spatial statistics

Reading material

• O´Sullivan & Unwin: Geographic Information Analysis, Chapters:1, 4.1-4.4

– There are newer versions of the book but references made in the slides to the 2003 edition

• Very good reading material on spatial analysis for example in

https://mgimond.github.io/Spatial/point-pattern-analysis.html

Page 39: Descriptive methods for spatial statistics

What happens in tomorrow´s exercises• Using ArcGISPro software

• You may also use for example QGIS if you want, but guidelines are

only for ArcGISPro

• Because computer classes are not available, you have to use your

own computer (detailed guidelines in exercises)

– 1)download ArcGISPro to your own computer (Windows environment, VPN on)

– 2) use ArcGISPro by remote access

• 1. Use of Moran´s I for autocorrelation identification

• 2. Use of ANN (average nearest neighbour) for identification of

clustering

• 3. Use of (Ripley´s) K-function for identifying clustering

• Note: in this lecture G-, F-, and K-functions are used by utilizing cumulative

frequency graph and visual interpretation, these methods can be used in more

exact way by using hypothesis of CSR

Page 40: Descriptive methods for spatial statistics

Average nearest neighbour –

Nearest neighbour analysis

• Distances from each point to the nearest neighbour

point is calculated and the mean of them is calculated

• The expected mean distance – in the case of random

distribution of points – is calculated

– Based on the CSR (complete spatial randomness) assumptions

• The ratio between the empirical average mean and the

expected mean is calculated

– If the ratio is <1 then the patterns is towards clustering

– If the ratio is >1 then the pattern is towards dispersion

• See for example:

http://ceadserv1.nku.edu/longa//geomed/ppa/doc/NNA/NNA.htm

Page 41: Descriptive methods for spatial statistics

Average nearest neighbour –

Lähimmän naapurin analyysi

• Lasketaan etäisyys jokaisesta pisteestä sen lähimpään

naapuriin ja niistä keskiarvo

• Lasketaan lähimmän etäisyyden odotusarvojen

keskiarvo – täydellisen satunnaisuuden tapauksessa

– perustuu CSR (complete spatial randomness) oletukseen

– pisteiden määrä ja tarkasteltava alue tunnetaan

• Empiirisen keskiarvon ja oletuskeskiarvon suhde

– jos <1 pistekuvio klusteroituva

– jos >1 pistekuvio

• Katso esimerkiksi:

http://ceadserv1.nku.edu/longa//geomed/ppa/doc/NNA/NNA.htm

Page 42: Descriptive methods for spatial statistics

Ripley´s K-function

• K-function as presented in the lecture