We start this section with loading the required data sets and packages.

library(spatstat)
library(rasterVis)
load(url("http://www.geog.fu-berlin.de/~soga/300/30100_data_sets/ppp_data_berlin.RData"))

The interaction between two arbitrary points is measured by second order properties, which reflect any tendency of the events to appear clustered (points tend to be close together), independently (the Poisson process), or regularly spaced (points tend to avoid each other).

par(mar=c(1,1,2,2), mfrow=c(1,3))
plot(ppp.random, main='independant')
plot(ppp.regular, main='regular')
plot(ppp.locations, main='clustered')

A simple diagnostic option or dependence between points is the Fry plot. This is a scatterplot of the vector differences \(x_j - x_i\) between all pairs of distinct points in the pattern. In spatstat the Fry plot is computed by the command fryplot().

par(mar=c(1,1,2,2), mfrow=c(1,3))
fryplot(ppp.random, main='independant', pch=16, cex=0.2)
fryplot(ppp.regular, main='regular', pch=16, cex=0.2)
fryplot(ppp.locations, main='clustered', pch=16, cex=0.2)


Distance methods for point patterns

Classical techniques for investigating inter-point interaction are distance methods, based on measuring the distances between points (Baddeley 2010).

These methods are available in the spatstat package using the functions pairdist(), nndist() and distmap() respectively.

par(mar=c(2,2,2,2), mfrow=c(1,3), oma=c(0,0,2,0))
hist(pairdist(ppp.locations), 
     freq =F, 
     breaks=nrow(pairdist(ppp.locations)), 
     main='independant', 
     xlim=c(0,40000))
hist(pairdist(ppp.regular), 
     freq =F, 
     breaks=nrow(pairdist(ppp.regular)), 
     main='regular')
hist(pairdist(ppp.random), 
     freq =F, breaks=nrow(pairdist(ppp.random)), main='clustered')
mtext("Pairwise Distances Histogram", outer = TRUE, cex = 1.5)

levelplot(pairdist(ppp.random), main='Pairwise Distances: independant')

levelplot(pairdist(ppp.regular), main='Pairwise Distances: regular')

levelplot(pairdist(ppp.locations), main='Pairwise Distances: clustered')