Another important goal is to detect stochastic dependence between points in a point pattern.
The terms inhibited and clustered are analogous, respectively, to “negatively correlated” and “positively correlated”. They do not imply any particular kind of stochastic dependence and they do not explain how the pattern was generated.
Dependence between points is sometimes called “interaction”, but this term is dangerous because it suggests a particular mechanism for the dependence.
The (Ripley) \(K\)-function assumes the point process has constant intensity \(\lambda\). It is defined so that, for a typical random point in the point process, the number of other random points lying closer than a distance \(r\) has expected value \(\lambda \, K(r)\).
For a completely random (homogeneous Poisson) process, \(K(r) = \pi r^2\). An inhibited process will usually have \(K(r) < \pi r^2\), while a clustered process will have \(K(r) > \pi r^2\), for appropriate values of \(r\).
An estimate of the \(K\) function
can be computed for a point pattern dataset X
by typing
K <- Kest(X)
.
The pair correlation function \(g(r)\) can be defined as \(g(r) = K^\prime(r)/(2\pi r)\) where \(K^\prime(r)\) is the derivative of the \(K\) function. The pair correlation function can be interpreted as the probability that two points in the point process will be separated by a distance equal to \(r\), normalised by the corresponding probability for a completely random (Poisson) process.
For a completely random (homogeneous Poisson) process, \(g(r) = 1\). An inhibited process will usually have \(g(r) < 1\), while a clustered process will have \(g(r) > 1\), for appropriate values of \(r\).
An estimate of the pair correlation function can be computed for a
point pattern dataset X
by typing
g <- pcf(X)
.
plot(redwood)
A cluster process is generated in two stages.
In a Thomas cluster process,
Here are simulated realisations of a Thomas process:
plot(rThomas(kappa=10, sigma=0.2, mu=5, nsim=12),
main="", main.panel="")
Maximum likelihood fitting of cluster processes is difficult because
the likelihood is quite complicated. However, the \(K\)-function of such cluster processes is
known analytically, so the model can be fitted by the method of moments
(matching the model’s theoretical \(K\)-function to the empirical \(K\)-function of the data). This is
performed by the spatstat
function kppm
.
fitT <- kppm(redwood ~ 1, "Thomas")
fitT
## Stationary cluster point process model
## Fitted to point pattern dataset 'redwood'
## Fitted by minimum contrast
## Summary statistic: K-function
##
## Uniform intensity: 62
##
## Cluster model: Thomas process
## Fitted cluster parameters:
## kappa scale
## 23.54856848 0.04705148
## Mean cluster size: 2.632856 points
plot(simulate(fitT, nsim=12))
## Generating 12 simulations... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12.
## Done.