# PairCorrelationG

PairCorrelationG[pdata,r]

estimates the pair correlation function for point data pdata at radius r.

PairCorrelationG[pproc,r]

computes for the point process pproc.

PairCorrelationG[bdata,r]

computes for binned data bdata.

PairCorrelationG[pspec]

generates the function that can be applied repeatedly to different radii r.

# Details and Options    • The product where is the mean density is the probability density of finding two points a distance apart.
• • PairCorrelationG is not a correlation in a usual sense with values varying between and 1. The range is from 0 to , with 1 corresponding to complete spatial randomness.
• PairCorrelationG measures spatial homogeneity of a point collection at distance . In comparing with a Poisson point process:
• more dispersed than Poisson like Poisson, i.e. complete spatial randomness more clustered than Poisson
• • For an isotropic stationary point process in , the pair correlation function is the derivative of Ripley's function normalized by the measure of a unit sphere , where is Ripley's function and is the measure of a unit sphere in .
• The radius r can be a single value or a list of values. With no radius r specified, PairCorrelationG returns a PointStatisticFunction that can be used to evaluate the function repeatedly.
• The points pdata can have the following forms:
•  {p1,p2,…} points pi GeoPosition[…],GeoPositionXYZ[…],… geographic points SpatialPointData[…] spatial point collection {pts,reg} point collection pts and observation region reg
• If the observation region reg is not given, a region is automatically computed using RipleyRassonRegion.
• The point process pproc can have the following forms:
•  proc a point process proc {proc,reg} a point process proc and observation region reg
• The observation region reg should be parameter free and SpatialObservationRegionQ.
• The binned data bdata is from SpatialBinnedPointData and is treated as an InhomogeneousPoissonPointProcess with a piecewise constant density function.
• For pdata, is computed using kernel smoothing , where additional edge correction is applied. Here is the smoothing kernel and is the number of points.
• • For pproc, is computed by using exact formulas or by simulation to generate point data.
• The following options can be given:
•  Method Automatic what methods to use SpatialBoundaryCorrection Automatic what boundary correction to use
• The following settings can be used for SpatialBoundaryCorrection:
•  Automatic automatically determined boundary correction "BorderMargin" use interior margin for observation region None no boundary correction "Ripley" uses weights depending on the point distance to boundary
• The setting Method{"Kernel"->kern,"Bandwidth"->bw} allows for choosing the smoothing kernel kern and bandwidth bw in the estimation. Here kern can be any built-in one-dimensional kernel supported by KernelMixtureDistribution, and the bandwidth bw can be Automatic or any positive number.
• By default, "Epanechnikov" kernel is used and the bandwidth is chosen to be .
• PairCorrelationG allows estimating the pair correlation function from PointStatisticFunction generated by RipleyK or BesagL. The estimation is done by smoothing splines. In this situation, the argument pdata has the following forms and interpretations:
•  {PointStatisticFunction[…],{r1,r2,dr}} estimate the pair correlation function based on values sampled at distances Range[r1,r2,dr] {PointStatisticFunction[…],{{r1,r2,…}}} estimate the pair correlation function based on values sampled at distance {r1,r2,...} {PointStatisticFunction[…],rspec,type} same as above with smoothing specified by type
• The supported smoothing types are:
•  1 apply smoothing spline to ; this is used by default 2 apply smoothing spline to with constraint 3 apply smoothing spline to with constraint 4 apply smoothing spline to # Examples

open allclose all

## Basic Examples(3)

Estimate the pair correlation function at a given radius:

Estimate the pair correlation function within a range of distances:

Visualize the result with ListPlot:

Pair correlation function of a cluster point process:

Visualize the function with given parameter values:

## Scope(9)

### Point Data(6)

Estimate the pair correlation function at distance 0.03:

Obtain empirical estimates of the pair correlation function from a list of given distances:

Use PairCorrelation with SpatialPointData:

Create a PointStatisticFunction for future use:

Compute a value at a given radius:

Estimate the pair correlation function without explicitly providing the observation region:

Observation region generated by RipleyRasson estimator:

Estimate the pair correlation function at distance 0.05:

Use PairCorrelation with GeoPosition:

Plot the point statistics function:

Estimate the pair correlation function from function with different smoothing methods:

Compute Ripley's :

Estimate pair correlation for given radius range using all four smoothing methods:

Visualize the estimated values under different smoothing methods:

### Point Processes(3)

The pair correlation for PoissonPointProcess is constant:

The pair correlation for a cluster process ThomasPointProcess:

Visualize for fixed process parameters but varying dimension:

The pair correlation for a cluster process MaternPointProcess:

Visualize for fixed process parameters but varying dimension:

## Options(2)

### Method(1)

The kernel-smoothing setting can be provided under Method as a suboption:

Estimate the pair correlation function at the same radius with different kernel functions:

Use different bandwidths to estimate the pair correlation function at the same radius:

### SpatialBoundaryCorrection(1)

The PairCorrelationG estimator without boundary correction is biased and should not be used unless with a large point set:

The default method "BorderMargin" only considers the points that are distance from the boundary:

Boundary correction method "Ripley" weights each pair of points to make the estimator unbiased:

## Applications(3)

The pair correlation function under complete spatial randomness:

Estimate the values of the pair correlation function with given data:

Visualize the results:

Compare different edge correction methods:

Estimate the values of the pair correlation function with three different methods:

Visualize the results:

Compare the pair correlation function estimate of Matérn point processes with different cluster radius:

Estimate the values of the pair correlation function with given data:

Visualize the results:

## Properties & Relations(1)

Estimate the pair correlation function from Ripley's function:

Pair correlation from data:

Compute Ripley function:

Estimate pair correlation:

Compare the estimate with the pair correlation computed from the data:

The same estimation can be obtained using Besag's function: