edge.Trans(X, Y = X, W = Window(X), exact = FALSE, paired = FALSE, ..., trim = spatstat.options("maxedgewt"), dx=NULL, dy=NULL, give.rmax=FALSE, gW=NULL)
rmax.Trans(W, g=setcov(W))"ppp").
TRUE, a slow algorithm will be used
to compute the exact value. If FALSE, a fast algorithm
will be used to compute the approximate value.
X and Y
are paired. If TRUE, compute
the edge correction for corresponding points
X[i], Y[i] for all i.
If FALSE, compute the edge correction for
each possible pair of points X[i], Y[j]
for all i and j.
X and Y. See Details.
TRUE, also compute the value of
rmax.Trans(W) and return it as an attribute
of the result.
W, if it has already been
computed. Not required if W is a rectangle.
edge.Trans
computes Ohser and Stoyan's translation edge correction
weight, which is used in estimating the $K$ function and in many
other contexts. The function rmax.Trans computes the maximum value of
distance $r$ for which the translation edge correction
estimate of $K(r)$ is valid.
For a pair of points $x$ and $y$ in a window $W$,
the translation edge correction weight
is
$$
e(u, r) = \frac{\mbox{area}(W)}{\mbox{area}(W \cap (W + y - x))}
$$
where $W + y - x$ is the result of shifting the window $W$
by the vector $y - x$. The denominator is the area of the overlap between
this shifted window and the original window.
The function edge.Trans computes this edge correction weight.
If paired=TRUE, then X and Y should contain the
same number of points. The result is a vector containing the
edge correction weights e(X[i], Y[i]) for each i.
If paired=FALSE,
then the result is a matrix whose i,j entry gives the
edge correction weight e(X[i], Y[j]).
Computation is exact if the window is a rectangle. Otherwise,
exact=TRUE, the edge
correction weights are computed exactly using
overlap.owin, which can be quite slow.
exact=FALSE (the default),
the weights are computed rapidly by evaluating the
set covariance function setcov
using the Fast Fourier Transform.
If any value of the edge correction weight exceeds trim,
it is set to trim.
The arguments dx and dy can be provided as
an alternative to X and Y.
If paired=TRUE then dx,dy should be vectors of equal length
such that the vector difference of the $i$th pair is
c(dx[i], dy[i]). If paired=FALSE then
dx,dy should be matrices of the same dimensions,
such that the vector difference between X[i] and Y[j] is
c(dx[i,j], dy[i,j]). The argument W is needed.
The value of rmax.Trans is the shortest distance from the
origin $(0,0)$ to the boundary of the support of
the set covariance function of W. It is computed by pixel
approximation using setcov, unless W is a
rectangle, when rmax.Trans(W) is the length of the
shortest side of the rectangle.
rmax.Trans,
edge.Ripley,
setcov,
Kest
v <- edge.Trans(cells)
rmax.Trans(Window(cells))
Run the code above in your browser using DataLab