Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Gfox

Foxall's Distance Functions


Description

Given a point pattern X and a spatial object Y, compute estimates of Foxall's G and J functions.

Usage

Gfox(X, Y, r=NULL, breaks=NULL, correction=c("km", "rs", "han"), W, ...)
Jfox(X, Y, r=NULL, breaks=NULL, correction=c("km", "rs", "han"), W, ...,
     warn.trim=TRUE)

Arguments

X

A point pattern (object of class "ppp") from which distances will be measured.

Y

An object of class "ppp", "psp" or "owin" to which distances will be measured. Alternatively a pixel image (class "im") with logical values.

r

Optional. Numeric vector. The values of the argument r at which Gfox(r) or Jfox(r) should be evaluated. There is a sensible default. First-time users are strongly advised not to specify this argument. See below for important conditions on r.

breaks

This argument is for internal use only.

correction

Optional. The edge correction(s) to be used to estimate Gfox(r) or Jfox(r). A vector of character strings selected from "none", "rs", "km", "cs" and "best". Alternatively correction="all" selects all options.

W

Optional. A window (object of class "owin") to be taken as the window of observation. The distribution function will be estimated from data inside W. The default is W=Frame(Y) when Y is a window, and W=Window(Y) otherwise.

...

Extra arguments affecting the discretisation of distances. These arguments are ignored by Gfox, but Jfox passes them to Hest to determine the discretisation of the spatial domain.

warn.trim

Logical value indicating whether a warning should be issued by Jfox when the window of X had to be trimmed in order to be a subset of the frame of Y.

Details

Given a point pattern X and another spatial object Y, these functions compute two nonparametric measures of association between X and Y, introduced by Foxall (Foxall and Baddeley, 2002).

Let the random variable R be the distance from a typical point of X to the object Y. Foxall's G-function is the cumulative distribution function of R:

P(R <= r)

Let the random variable S be the distance from a fixed point in space to the object Y. The cumulative distribution function of S is the (unconditional) spherical contact distribution function

H(r) = P(S <= r)

which is computed by Hest.

Foxall's J-function is the ratio

J(r) = (1-G(r))/(1-H(r))

For further interpretation, see Foxall and Baddeley (2002).

Accuracy of Jfox depends on the pixel resolution, which is controlled by the arguments eps, dimyx and xy passed to as.mask. For example, use eps=0.1 to specify square pixels of side 0.1 units, and dimyx=256 to specify a 256 by 256 grid of pixels.

Value

A function value table (object of class "fv") which can be printed, plotted, or converted to a data frame of values.

Author(s)

Rob Foxall and Adrian Baddeley Adrian.Baddeley@curtin.edu.au

References

Foxall, R. and Baddeley, A. (2002) Nonparametric measures of association between a spatial point process and a random set, with geological applications. Applied Statistics 51, 165–182.

See Also

Examples

data(copper)
  X <- copper$SouthPoints
  Y <- copper$SouthLines
  G <- Gfox(X,Y)
  J <- Jfox(X,Y, correction="km")

spatstat.core

Core Functionality of the 'spatstat' Family

v2.1-2
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Kasper Klitgaard Berthelsen [ctb], Achmad Choiruddin [ctb], Jean-Francois Coeurjolly [ctb], Ottmar Cronie [ctb], Tilman Davies [ctb], Julian Gilbey [ctb], Yongtao Guan [ctb], Ute Hahn [ctb], Kassel Hingee [ctb], Abdollah Jalilian [ctb], Marie-Colette van Lieshout [ctb], Greg McSwiggan [ctb], Tuomas Rajala [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Plenge Waagepetersen [ctb], Hangsheng Wang [ctb]
Initial release
2021-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.