Estimate the Intensity of a Spatial Point Pattern

DESCRIPTION:

Compute a smooth estimate of intensity given an object of class spp.

USAGE:

intensity(object, method = "kernel", bw, boundary = bbox(object), nx,  
          ny, edge = F, ...) 

REQUIRED ARGUMENTS:

object
a spatial point pattern object. An object of class "spp".

VALUE:

bw
bandwidth parameter for methods "kernel" and "gauss2d". This should be a numeric value. The same value is used each of the x or the y directions. This value needs to be determined by the user mostly by trial-and-error. A good starting value might be 1/4 of the diameter of the boundary region.

OPTIONAL ARGUMENTS:

method
a character string with one of four possible methods for providing an estimate of intensity for object. This must be one of "basic", "kernel", "binning", or "gauss2d". See the DETAILS section for each definition. Defaults to "kernel" which applies a quartic kernel to the two-dimensional process. Partial string matching is allowed.
boundary
points defining the boundary polygon for the spatial point pattern. This version accepts only rectangles, for which boundary should be given as a list with named components "x" and "y" denoting the corners of the rectangular region. For example, for the unit square the boundary could be given as bbox(x=c(0,1),y=c(0,1)), the bounding box of two diagonally opposed points. Defaults to a rectangle covering the range of all the points in object.
nx
integer. Number of bins in the X direction, or number of X-points in the grid used by the kernel estimators. Defaults to twice the square root of the total number of points in object.
ny
integer. Number of bins in the Y direction, or number of Y-points in the grid used by the kernel estimators. Defaults to twice the square root of the total number of points in object.
edge
logical flag: should we correct for edge effects? If TRUE, then a toroidal correction is applied. This is equivalent to reflecting the mapped pattern eight times around the one given by object so it may slow down computation. Default is FALSE.
...
Other parameters may be given to be passed on to the loess smoother. In particular:

VALUE:

span
loess smoothing parameter, used by method ="binning" to smooth the bin counts. See the loess help file for more information. Defaults to 0.75 with higher values producing smoother estimates. if method="basic" a number is returned. In all other cases the return value is a list with 4 components as follows:
x,y
numeric vectors containing the gridded values in the horizontal and vertical directions respectively.
z
estimates of intensity corresponding to x, y respectively.
bw
the input bandwidth parameter.

The returned list also has an attribute "call" describing the call that generated the resulting object.

DETAILS:

The returned value may be given to the S-PLUS function image for a graphical display of intensity over the area enclosed by boundary.

When method="binning", the points are binned into a nx by ny grid of counts and these are smoothed out using a call to the S-PLUS function loess .

When method="kernel", a quartic kernel is placed at each cross point on an overlaid nx by ny grid and a two-dimensional kernel smoothing operation performed. This kernel is computed as the product of two univariate quartic kernels, and so it is not rotationally invariant. See the SPATIALSTATS function kern2d for more information on the formulae used for these computations.

When method ="gauss2d", a gaussian kernel is used instead of the quartic of above.

WARNING:

When edge is set to TRUE, a lot more memory will be required. Increasing options("object.size") might be necessary.

REFERENCES:

Diggle, Peter J. (1983). Statistical Analysis of Spatial Point Patterns. Academic Press, London.

Venables, W. N. and Ripley, B. D. (1994). Modern Applied Statistics with S-Plus. Springer-Verlag, New York.

SEE ALSO:

, .

EXAMPLES:

image(intensity(lansing, "binning", nx=50, ny=50, span=.1)) 
image(intensity(lansing, bw=.3))