GHAT procedure
Calculates an estimate of the G nearest-neighbour distribution function (M.A. Mugglestone, S.A. Harding, B.Y.Y. Lee, P.J. Diggle & B.S. Rowlingson).
Option
Parameters
Description
The G nearest-neighbour distribution function relates to the distribution of distances from each event of a spatial point pattern to the nearest other event in the pattern (see Diggle 1983). An estimate of G can be obtained by calculating the empirical distribution function (EDF) GHAT(s) which is defined as the proportion of events for which the nearest other event is within distance s.
The term complete spatial randomness (CSR) is used to represent the hypothesis that the overall density of events in a spatial point pattern is constant throughout the study region, and that the events are distributed independently and uniformly. Under CSR, the G nearest-neighbour distribution function is given by
G(s) = 1 - exp(-π × density × (s2)),
where density is the overall density of events per unit area. (The procedure FZERO can be used to calculate values of this function for a pattern with a given density.) The G nearest-neighbour distribution function for a clustered (regular) pattern will tend to be larger (smaller) than the corresponding function for a completely random pattern, at least for small distances.
The procedure GHAT requires the coordinates of a spatial point pattern (specified by the parameters X and Y) and a vector of distances at which to calculate the EDF of G (specified by the parameter S). The primary output of the procedure is a vector of estimates of G corresponding to the distances in S. The estimated G function can be saved using the parameter GVALUES. The nearest-neighbour distances and the unit numbers of the nearest-neighbours can be saved using the parameters NNDISTANCES and NNUNITS.
Printed output is controlled using the PRINT option. The default setting of summary prints the distances at which the G function is estimated and the estimates themselves under the headings S and GVALUES.
Option: PRINT.
Parameters: Y, X, S, GVALUES, NNDISTANCES, NNUNITS.
Method
A procedure PTCHECKXY is called to check that X and Y have identical restrictions. GHAT then calls a procedure PTPASS to call a Fortran program to calculate the G nearest-neighbour distances. No corrections are made for edge effects. The EDF of the nearest-neighbour distances relative to the distances specified by the parameter S is obtained using the CALCULATE directive.
Action with
RESTRICT
If X and Y are restricted, only the subset of values specified by the restriction will be included in the calculations. The parameter S may also be restricted.
Reference
Diggle, P.J. (1983). Statistical Analysis of Spatial Point Patterns. Academic Press, London.