Fsphere: The Empty Space Function F

View source: R/Fsphere.R

FsphereR Documentation

The Empty Space Function F

Description

Estimates the summary function F(r) for a point pattern in a window of arbitrary shape on a (subset of) a sphere.

Usage

Fsphere(X, refpoints=NULL, win = sphwin(type = "sphere"), r = NULL, ...)

Arguments

X

The observed point pattern, from which an estimate of F(r) will be computed. An object of class "sp2" or "sp3", or a 2 or 3 column matrix giving the locations of points in spherical coordinates.

refpoints

The reference points in the window used to estimate the F function. An object of class "sp2" or "sp3", or a 2 or 3 column matrix giving the locations of points in spherical coordinates. If NULL, a homogeneous Poisson process with expected number of points equal to 100 is generated inside the window.

win

The window; an object of class "sphwin". Only required if X is an object of class matrix.

r

Optional. Numeric vector. The values of the argument r at which F(r) should be evaluated. There is a sensible default, which works well the window is either the sphere or contains a significant proportion of the sphere. First-time users are strongly advised not to specify this argument.

...

Optional. Extra detail that can be passed to eroded.areas.sphwin.

Details

The empty space function (also called the "spherical contact distribution" or the "point-to-nearest-event" distribution) of a stationary point process X is the cumulative distribution function F of the distance from a fixed point in space to the nearest point of X.

An estimate of F derived from a spatial point pattern dataset can be used in exploratory data analysis and formal inference about the pattern (Cressie, 1991; Diggle, 1983; Ripley, 1988). In exploratory analyses, the estimate of F is a useful statistic summarising the sizes of gaps in the pattern. For inferential purposes, the estimate of F is usually compared to the true value of F for a completely random (Poisson) point process, which is

F(r) = 1 - exp( - 2 * pi * rho * lambda(1 - cos (r/rho) ) )

where lambda is the intensity (expected number of points per unit area) and rho is the radius of the sphere in which X is obsered. Deviations between the empirical and theoretical F curves may suggest spatial clustering or spatial regularity.

This algorithm estimates the empty space function F from the point pattern X. It assumes that X can be treated as a realisation of a stationary (spatially homogeneous) random spatial point process in the plane, observed through a bounded window. The window (which is specified in X) may have arbitrary shape.

The argument X is interpreted as a point pattern object (of class "ppp", see ppp.object) and can be supplied in any of the formats recognised by as.ppp.

The algorithm uses a discrete approximation which is controlled by the spacing of values of r. (See below for details.) First-time users are strongly advised not to specify these arguments.

The estimation of F is hampered by edge effects arising from the unobservability of points of the random pattern outside the window. An edge correction is needed to reduce bias (Baddeley, 1998; Ripley, 1988). The edge corrections implemented here are the border method or "reduced sample" estimator, the spatial Kaplan-Meier estimator (Baddeley and Gill, 1997) and the Chiu-Stoyan estimator (Chiu and Stoyan, 1998).

The argument r is the vector of values for the distance r at which F(r) should be evaluated. It is also used to determine the breakpoints (in the sense of hist) for the computation of histograms of distances. The estimators are computed from histogram counts. This introduces a discretisation error which is controlled by the fineness of the breakpoints.

First-time users would be strongly advised not to specify r. However, if it is specified, r must satisfy r[1] = 0, and max(r) must be larger than the radius of the largest disc contained in the window. Furthermore, the spacing of successive r values must be very fine.

The algorithm also returns an estimate of the hazard rate function, lambda(r), of F(r). The hazard rate is defined by

lambda(r) = - (d/dr) log(1 - F(r))

The hazard rate of F has been proposed as a useful exploratory statistic (Baddeley and Gill, 1994). The estimate of lambda(r) given here is a discrete approximation to the hazard rate of the Kaplan-Meier estimator of F. Note that F is absolutely continuous (for any stationary point process X), so the hazard function always exists (Baddeley and Gill, 1997).

The naive empirical distribution of distances from each location in the window to the nearest point of the data pattern, is a biased estimate of F. However this is also returned by the algorithm (if correction="none"), as it is sometimes useful in other contexts. Care should be taken not to use the uncorrected empirical F as if it were an unbiased estimator of F.

Value

An object of class "fv", see fv.object, which can be plotted directly using plot.fv.

Essentially a data frame containing some or all of the following columns:

r

the values of the argument r at which the function F(r) has been estimated

rs

the "reduced sample" (border correction) estimator of F(r)

km

the spatial Kaplan-Meier estimator of F(r)

hazard

the hazard rate lambda(r) of F(r) by the spatial Kaplan-Meier method

raw

the uncorrected estimate of F(r), i.e. the empirical distribution of the distance from a fixed point in the window to the nearest point of X

han

the Hanisch/Chiu-Stoyan estimator of F(r)

theo

the theoretical value of F(r) for a stationary Poisson process of the same estimated intensity.

Note

Sizeable amounts of memory may be needed during the calculation

Note

This function is the analogue for point processes on the sphere of the function Fest in spatstat, which is the corresponding function for point processes in R^2. Hence elements of the code for Fsphere and help page have been taken from Fest with the permission of A. J. Baddeley. This enables the code to be highly efficient and give corresponding output to, and for the information on this help page to be consistent with that for the function Fest. It is hoped that this will minimise or remove any confusion for users of both spatstat and spherstat.

Author(s)

Tom Lawrence <email:tjlawrence@bigpond.com> and Adrian Baddeley <email: Adrian.Baddeley@curtin.edu.au>

References

Baddeley, A.J. Spatial sampling and censoring. In O.E. Barndorff-Nielsen, W.S. Kendall and M.N.M. van Lieshout (eds) Stochastic Geometry: Likelihood and Computation. Chapman and Hall, 1998. Chapter 2, pages 37–78.

Baddeley, A.J. and Gill, R.D. The empty space hazard of a spatial pattern. Research Report 1994/3, Department of Mathematics, University of Western Australia, May 1994.

Baddeley, A.J. and Gill, R.D. Kaplan-Meier estimators of interpoint distance distributions for spatial point processes. Annals of Statistics 25 (1997) 263–292.

Borgefors, G. Distance transformations in digital images. Computer Vision, Graphics and Image Processing 34 (1986) 344–371.

Chiu, S.N. and Stoyan, D. (1998) Estimators of distance distributions for spatial patterns. Statistica Neerlandica 52, 239–246.

Cressie, N.A.C. Statistics for spatial data. John Wiley and Sons, 1991.

Diggle, P.J. Statistical analysis of spatial point patterns. Academic Press, 1983.

Lawrence, T.J. (2017) Master's Thesis, University of Western Australia.

Ripley, B.D. Statistical inference for spatial processes. Cambridge University Press, 1988.

Stoyan, D, Kendall, W.S. and Mecke, J. Stochastic geometry and its applications. 2nd edition. Springer Verlag, 1995.

See Also

Gsphere, link{Jsphere}, Ksphere, Fest

Examples

sph <- sphwin(type="sphere")
sph.pp <- rpoispp.sphwin(win=sph, lambda=10)
sph.ref <- rpoispp.sphwin(win=sph, lambda=150)
sph.Fest <- Fsphere(X=sph.pp, refpoints=sph.ref)

baddstats/spherstat documentation built on Feb. 6, 2023, 1:45 a.m.