PTINTENSITY procedure
Calculates the overall density for a spatial point pattern (M.A. Mugglestone, S.A. Harding, B.Y.Y. Lee, P.J. Diggle & B.S. Rowlingson).
Option
Parameters
Description
This procedure takes as input two variates containing the coordinates of a spatial point pattern (specified by the X and Y parameters) and the coordinates of a polygon containing the points (specified using the XPOLYGON and YPOLYGON parameters). The procedure returns the density of the spatial point pattern, which is defined to be the number of points per unit area. The density may be saved in a scalar specified by the parameter DENSITY.
Printed output is controlled by the PRINT option. The default setting of summary prints the density under the heading DENSITY.
Option: PRINT.
Parameters: Y, X, YPOLYGON, XPOLYGON, DENSITY.
Method
A procedure PTCHECKXY is called to check that X and Y have identical restrictions. A similar check is made on XPOLYGON and YPOLYGON. The area of the polygon is then calculated using PTAREAPOLYGON and then the density is calculated as the number of points divided by the area.
Action with
RESTRICT
If X and Y are restricted, only the subset of values specified by the restriction will be included in the calculations. XPOLYGON and YPOLYGON may also be restricted as long as the same restrictions apply to both parameters.