KSTHAT procedure

Calculates an estimate of the K function in space, time and space-time (D.A. Murray, P.J. Diggle & B.S. Rowlingson).


Option

PRINT = string
Controls printed output (summary); default summ


Parameters

Y = variates
Vertical coordinates of the spatial point patterns; no default - this parameter must be set

X = variates
Horizontal coordinates of the spatial point patterns; no default - this parameter must be set

TIMES = variates
Times for each event

YPOLYGON = variates
Vertical coordinates of the polygons; no default - this parameter must be set

XPOLYGON = variates
Horizontal coordinates of the polygons; no default - this parameter must be set

S = variates
Vectors of distances to use; no default - this parameter must be set

TVALUES = variates
Time scales for the analysis

TLOWER = variates
Lower temporal domain

TUPPER = variates
Upper temporal domain

KS = variates
Saves the spatial K function estimates

KT = variates
Saves the spatial K function estimates

KST = variates
Saves the space-time K function estimates


Description

For data that consist of locations and times of events within a specified spatial region and time-period, it is often of interest to examine whether events that are relatively close in space are also relatively close in time. Data that have events both close in space and time are said to exhibit space-time clustering. KSTHAT provides a method for describing this space-time interaction using an extension of the second-order methods for purely spatial point patterns to the spatial-temporal setting. KSTHAT calculates an estimate of the second-order reduced moment measure, or K function, in space, time and space-time. The K function, or reduced second-order moment function, relates to the distribution of the inter-event distances between all ordered pairs of events in a spatial point pattern (see Diggle 1983). The function is formally defined as the expected number of further events within distance s of an arbitrary event, divided by the overall density of events per unit area. The space-time K function is defined as the number of further events occurring within distance s and time t of an arbitary event, divided by the expected number of events per unit space per unit time (see Diggle et al 1995). The K function for a spatial-temporal homogeneous Poisson process, in which the spatial and temporal components are independent homogeneous Poisson processes is given by

K(s,t) = 2π × s2 t.

This represents the volumne of a cylinder with base radius s and height 2t. Assuming that the spatial and temporal component processes are independent the space-time K function factorizes as follows

K(s,t) = K1(s) × K2(t)

where K1(s) is the spatial K function and K2(t) is the temporal K function.

   The procedure KSTHAT calculates space-time K given the coordinates of a spatial point pattern (specified by the parameters X and Y), and the times for each of the events (specified by TIMES). The coordinates of a polygon containing the spatial points are specified by the parameters XPOLYGON and YPOLYGON, and the parameter S is used to supply the vector of distances at which to calculate the spatial K function. The TLOWER and TUPPER parameters specify the start and finish of the temporal range. The TVALUES parameter is used to supply the vector of times at which to calculate the temporal K function. The outputs of the procedure are vectors of estimates of the spatial and temporal K function corresponding to the distances in S and times in TIMES. The estimated spatial and temporal K functions can be saved using the parameters KS and KT respectively. The KST parameter can be used to save a matrix of the space-time K function.

   Printed output is controlled using the PRINT option. The default setting of summary prints the distances at which the spatial K function is estimated along with the estimates, the times at which the temporal K function is estimated along with the estimates and the space-time K function estimates.

 

Option: PRINT.

Parameters: Y, X, TIMES, YPOLYGON, XPOLYGON, S, TVALUES, TLOWER, TUPPER, KS, KT, KST.


Method

A procedure PTCHECKXY is called to check that X, Y and TIMES have identical restrictions. A similar check is made on XPOLYGON and YPOLYGON. The procedure then calls PTCLOSEPOLYGON to close the polygon specified by XPOLYGON and YPOLYGON. The SORT function is then used to create variates containing the distances in S and time in TVALUES arranged into ascending order. (The original variates are left unchanged.) The procedure then calls a procedure PTPASS to call a Fortran program to calculate an estimate of the space-time K function.


References

Diggle, P,J. (1983). Statistical Analysis of Spatial Point Patterns. Academic press, London.

Diggle, P.J., Chetwynd, A.G., Haggkvist, R. & Morris, S.E. (1995). Second-order analysis of space-time clustering. Statistical Methods in Medical Research, 4, 124-136.