EDF of Origin-to-Point Nearest Neighbor Distances

DESCRIPTION:

Computes and plots the empirical distribution function (EDF) of the origin-to-point nearest neighbor distances for a spatial point pattern.

USAGE:

Fhat(obj1, obj2, nx=sqrt(n), ny=sqrt(n), dist.fhat=all.dists, 
     plot.it=T) 

REQUIRED ARGUMENTS:

obj1
an object of class "spp" representing a spatial point pattern, or a data frame or matrix with first two columns containing locations of a point pattern.

OPTIONAL ARGUMENTS:

obj2
an object of class "spp" representing a spatial point pattern, or a data frame or matrix with first two columns containing the origins from which the distances to the points in obj1 are to be computed. See DETAILS for computation of Fhat.
nx,ny
if obj2 is missing, a grid of size ( nx by ny) is computed to be used as set of origins. Defaults to the square root of the total number of points in obj1.
dist.fhat
distances at which Fhat values are desired. See DETAILS. By default, all distances between obj1 and obj2 will be used.
plot.it
logical flag: should the result be plotted? Defaults to TRUE.

VALUE:

a matrix with two columns. The first column contains the distances at which Fhat was computed. The second column contains the corresponding Fhat values.

SIDE EFFECTS:

If plot.it=TRUE, a plot of Fhat versus distance is produced.

DETAILS:

Fhat provides an estimate of F(y), the proportion of points on a grid ( obj2) within distance y of the nearest point in the original pattern ( obj1). For a completely spatially random process without edge effects, the theoretical distribution of F(y) is:

F(y) = 1 - exp(-pi * intensity * y^2)

where the intensity is the number of points per unit area.

If obj2 is not supplied, an origin grid with dimension ( nx x ny) is created on the same area as the original data. The distances between each origin in obj2 and its nearest neighbor in obj1 are computed using find.neighbor .

REFERENCES:

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

SEE ALSO:

, .

EXAMPLES:

lans.fhat <- Fhat(lansing)