X
and a spatial object Y
,
compute estimates of Foxall's $G$ and $J$ functions.Gfox(X, Y, r = NULL, breaks = NULL, correction = c("km", "rs", "han"), ...)
Jfox(X, Y, r = NULL, breaks = NULL, correction = c("km", "rs", "han"), ...)
"ppp"
)
from which distances will be measured."ppp"
, "psp"
or "owin"
to which distances will be measured.r
.
Not normally invoked by the user."none"
, "rs"
, "km"
, "cs"
and "best"
.Gfox
, but
Jfox
passes them to Hest
to determine
the discretisation of the spatial"fv"
)
which can be printed, plotted, or converted to a data frame of values.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$:
$$G(r) = P(R \le 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 \le r)$$
which is computed by Hest
. Foxall's $J$-function is the ratio
$$J(r) = \frac{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.
Gest
,
Hest
,
Jest
,
Fest
data(copper)
X <- copper$SouthPoints
Y <- copper$SouthLines
G <- Gfox(X,Y)
J <- Jfox(X,Y, correction="km")
<testonly>J <- Jfox(X,Y, correction="km", eps=1)</testonly>
J <- Jfox(X,Y, correction="km", eps=0.25)
Run the code above in your browser using DataLab