67
Copyright © 2016 by Luc Anselin, All Rights Reserved Luc Anselin Point Pattern Analysis Nearest Neighbor Statistics http://spatial.uchicago.edu

Point Pattern Analysis - Spatial@UChicago

  • Upload
    others

  • View
    26

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

Luc Anselin

Point Pattern AnalysisNearest Neighbor Statistics

http://spatial.uchicago.edu

Page 2: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• principle

• G function

• F function

• J function

Page 3: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

Principle

Page 4: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• Terminology

• events and points

• event: observed location of an event

• point: reference point (e.g., point on a grid)

• distances

• event-to-event distance

• point-to-event distance

Page 5: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• Nearest Neighbor Statistic

• principle

• under CSR the nearest neighbor distance between points has known mathematical properties

• testing strategy = detect deviations from these properties

Page 6: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• Nearest Neighbor Statistic (2)

• implementation

• event to nearest event

• point to nearest event

• characterize this distribution relative to CSR

• many nearest neighbor statistics

Page 7: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

G function

Page 8: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• Event-to-Event Distribution

• cumulative distribution of nearest neighbor distances

• G(r) = n-1 #(ri ≤ r)

• proportion of nearest neighbor distances that are less than r

• plot estimated G(r) against r

• implementation: many types of edge corrections

Page 9: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• G under CSR

• nearest neighbor at distance r implies that no other points are within a circle with radius r

• P[y=0] is exp(-λπr2) under Poisson distribution

• the probability of finding a nearest neighbor is then the complement of this

• P[ri < r] = 1 - exp(-λπr2)

• reference function, plot 1 - exp(-λπr2) against r

Page 10: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

G function with reference curve for CSR

Page 11: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• Inference

• analytical results intractable or only under unrealistic assumptions

• mimic CSR by random simulation

• random pattern for same n

• compute G(r) for each random pattern

• create a simulation envelope

Page 12: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

G function with randomization envelopeusing min and max for each r

Page 13: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• Interpretation

• clustering

• G(r) function above randomization envelope

• inhibition

• G(r) function below randomization envelope

Page 14: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

● ●●

●●

●●

0.00 0.02 0.04 0.06 0.08

0.0

0.2

0.4

0.6

0.8

1.0

distance

G(d)

G for CSR

Page 15: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

●●

● ●

●●

0.00 0.02 0.04 0.06

0.0

0.2

0.4

0.6

0.8

distance

G(d)

G for Poisson Clustered Process

Page 16: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

●●

0.00 0.05 0.10 0.15

0.0

0.2

0.4

0.6

0.8

1.0

distance

G(d)

G for Matern II Inhibition Process

Page 17: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

F function

Page 18: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• Point-to-Event Distribution

• cumulative distribution of nearest neighbor distances from reference points to events

• F(r) = m-1 #(ri ≤ r)

• proportion of nearest neighbor distances that are less than r

• also referred to as empty space function

• plot estimated F(r) against r

• implementation: many types of edge corrections

Page 19: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• F under CSR

• same approach as for G function

• under CSR

• P(ri < r) = 1 - exp(-λπr2)

• reference function, plot 1 - exp(-λπr2) against r

Page 20: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

F function with reference curve for CSR

Page 21: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• Inference

• same logic as for G function

• randomization envelope

• interpretation is opposite from G

• F(r) below envelope implies clustering

• F(r) above envelope implies inhibition

Page 22: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

F function with randomization envelopeusing min and max for each r

Page 23: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

● ●●

●●

●●

F for CSR

0.00 0.02 0.04 0.06 0.08

0.0

0.2

0.4

0.6

0.8

distance

F(d)

Page 24: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

●●

● ●

●●

F for Poisson Clustered Process

0.00 0.05 0.10 0.15 0.20

0.0

0.2

0.4

0.6

0.8

1.0

distance

F(d)

Page 25: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

●●

F for Matern II Inhibition Process

0.00 0.02 0.04 0.06 0.08 0.10

0.0

0.2

0.4

0.6

0.8

distance

F(d)

Page 26: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

J function

Page 27: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• J is Combination of G and F Functions

• connect to models for spatial processes

• specific form for different processes

• Van Lieshout and Baddeley (1996)

• J(r) = [1 - G(r)] / [1 - F(r)]

• various edge corrections

Page 28: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• Inference and Interpretation

• for CSR J(r) = 1

• inference based on randomization envelope

• J(r) < 1, or below envelope implies clustering

• J(r) > 1, or above envelope implies inhibition

Page 29: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

J function with reference line for CSR

Page 30: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

J function with randomization envelopeusing min and max for each r

Page 31: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

● ●●

●●

●●

J for CSR

0.00 0.02 0.04 0.06 0.08

02

46

8

distance

J(d)

Page 32: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

●●

● ●

●●

J for Poisson Clustered Process

0.00 0.05 0.10 0.15 0.20

01

23

45

6

distance

J(d)

Page 33: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

●●

J for Matern II Inhibition Process

0.00 0.02 0.04 0.06 0.08 0.10

01

23

45

67

distance

J(d)

Page 34: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

Luc Anselin

Point Pattern AnalysisAdvanced Distance Statistics

http://spatial.uchicago.edu

Page 35: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• principles

• pair correlation function

• K function

• L function

• Kd function

Page 36: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

Principles

Page 37: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• Beyond Nearest Neighbor Statistics

• nearest neighbor distances do not fully capture the complexity of point processes

• instead, take into account all the pair-wise distances

• as a density function or as a cumulative density function

Page 38: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• First Order Intensity Function

• first order moment of a point process is the intensity λ(x), similar to the notion of mean

• the number of points over a given area dx as the area gets infinitesimally small is λdx

• for a stationary process, the intensity is constant

• λ(x) = λ

Page 39: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• Second Order Intensity Function

• similar to the notion of covariance

• with reference areas dx and dy becoming infinitely small, it is the expected cross product of the number of points in dx and dy over the product of the (very small) areas

• λ2(x,y) = [E(N(dx)N(dy)]/|dx||dy| as |dx|,|dy|→0

• for a stationary and isotropic process λ2(x,y) only depends on the distance between x and y

Page 40: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• Second Order Statistics

• second order statistics exploit the notion of covariance

• based on the number of other points within a given radius of a point

• pair correlation function, or g-function

• Ripley’s K and Besag’s L function

Page 41: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

Pair Correlation Function

Page 42: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• g Function

• correlation-like function

• g = λ2(x,y) / λ(x).λ(y)

• complex estimation procedure

Page 43: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• Inference and Interpretation

• for CSR g = 1

• g(r) > 1 implies a cluster process

• g(r) can take large values, especially for small r, decreases as r increases

• g(r) < 1 implies a regular process (inhibition)

• g(r) = 0 for ri < r implies a hard core (no point pairs within this distance)

• randomization envelope for inference

Page 44: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

g function with reference line for CSR

Page 45: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

g function with randomization envelopeusing min and max for each r

Page 46: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

K function

Page 47: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• Ripley’s K Function

• best known second order statistic

• so-called reduced second order moment

• λK(r) = E[N0(r)]

• E[N0(r)] is the expected number of events within a distance r from an arbitrary event

• K(r) = λ-1 E[N0(r)] is the K function

Page 48: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• Estimating the K Function

• expected events within distance r

• E[N0(r)] = n-1 ∑i ∑j≠i Ih(rij < r)

• for each event, sum over all other events within the given distance band, for increasing distances

• cumulative function

• edge corrections

Page 49: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• Inference and Interpretation

• for CSR, K(r) = πr2

• K(r) > πr2 implies clustering

• K(r) < πr2 implies inhibition (regular process)

• use randomization envelope for inference

Page 50: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

K function with reference line for CSR

Page 51: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

K function with randomization envelopeusing min and max for each r

Page 52: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

● ●●

●●

●●

K for CSR

0.00 0.05 0.10 0.15 0.20 0.25

0.00

0.05

0.10

0.15

0.20

distance

K(d)

Page 53: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

●●

● ●

●●

K for Poisson Cluster Process

0.00 0.05 0.10 0.15 0.20 0.25

0.0

0.1

0.2

0.3

distance

K(d)

Page 54: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

●●

K for Matern II Inhibition Process

0.00 0.05 0.10 0.15 0.20 0.25

0.00

0.05

0.10

0.15

0.20

0.25

distance

K(d)

Page 55: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• Cross-K Function

• extension to bivariate (multi-type) point patterns

• count events of type j within a distance band r form every event i

• cumulative function

Page 56: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• Interpretation and Inference

• absence of correlation

• K11 = K22 = K12 = πr2 (CSR)

• clustering of two patterns

• K12 > CSR

• inhibition between two patterns

• K12 < CSR

• inference based on randomization envelope

Page 57: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

Cross K function with randomization envelopeusing min and max for each r

Page 58: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

L function

Page 59: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• Besag’s L Function

• variance of K(r) increases with r

• variance-stabilizing transformation

• L(r) = √[ K(r) / π ]

• plot L(r) against r (diagonal)

• plot L(r) - r against r

Page 60: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• Interpretation and Inference

• L(r) > r implies clustering

• L(r) < r implies inhibition (regular process)

• inference based on randomization envelope

Page 61: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

L function with reference line for CSR

Page 62: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

L - r function with randomization envelopeusing min and max for each r

Page 63: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

Kd function

Page 64: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• Density instead of Cumulative Distances

• Kd function of Duranton and Overman (2005)

• density function of all pairwise distances

• computed using a kernel smoothing procedure

Page 65: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

• Inference and Interpretation

• randomization envelope

• local and global

• reference distribution other than CSR

• density above envelope suggests clustering

• density below envelope suggests inhibition

Page 66: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

Kd density function

Page 67: Point Pattern Analysis - Spatial@UChicago

Copyright © 2016 by Luc Anselin, All Rights Reserved

Kd density function with randomization envelope