localKcross {spatstat.explore}R Documentation

Local Multitype K Function (Cross-Type)

Description

for a multitype point pattern, computes the cross-type version of the local K function.

Usage

  localKcross(X, from, to, ..., rmax = NULL,
              correction = "Ripley", verbose = TRUE, rvalue=NULL)
  localLcross(X, from, to, ..., rmax = NULL, correction = "Ripley")

Arguments

X

A multitype point pattern (object of class "ppp" with marks which are a factor).

...

Further arguments passed from localLcross to localKcross.

rmax

Optional. Maximum desired value of the argument rr.

from

Type of points from which distances should be measured. A single value; one of the possible levels of marks(X), or an integer indicating which level.

to

Type of points to which distances should be measured. A single value; one of the possible levels of marks(X), or an integer indicating which level.

correction

String specifying the edge correction to be applied. Options are "none", "translate", "translation", "Ripley", "isotropic" or "best". Only one correction may be specified.

verbose

Logical flag indicating whether to print progress reports during the calculation.

rvalue

Optional. A single value of the distance argument rr at which the function L or K should be computed.

Details

Given a multitype spatial point pattern X, the local cross-type KK function localKcross is the local version of the multitype KK function Kcross. Recall that Kcross(X, from, to) is a sum of contributions from all pairs of points in X where the first point belongs to from and the second point belongs to type to. The local cross-type KK function is defined for each point X[i] that belongs to type from, and it consists of all the contributions to the cross-type KK function that originate from point X[i]:

Ki,from,to(r)=a(n1)πjeij K_{i,from,to}(r) = \sqrt{\frac a {(n-1) \pi} \sum_j e_{ij}}

where the sum is over all points jij \neq i belonging to type to, that lie within a distance rr of the iith point, aa is the area of the observation window, nn is the number of points in X, and eije_{ij} is an edge correction term (as described in Kest). The value of Ki,from,to(r)K_{i,from,to}(r) can also be interpreted as one of the summands that contributes to the global estimate of the Kcross function.

By default, the function Ki,from,to(r)K_{i,from,to}(r) is computed for a range of rr values for each point ii belonging to type from. The results are stored as a function value table (object of class "fv") with a column of the table containing the function estimates for each point of the pattern X belonging to type from.

Alternatively, if the argument rvalue is given, and it is a single number, then the function will only be computed for this value of rr, and the results will be returned as a numeric vector, with one entry of the vector for each point of the pattern X belonging to type from.

The local cross-type LL function localLcross is computed by applying the transformation L(r)=K(r)/(2π)L(r) = \sqrt{K(r)/(2\pi)}.

Value

If rvalue is given, the result is a numeric vector of length equal to the number of points in the point pattern that belong to type from.

If rvalue is absent, the result is an object of class "fv", see fv.object, which can be plotted directly using plot.fv. Essentially a data frame containing columns

r

the vector of values of the argument rr at which the function KK has been estimated

theo

the theoretical value K(r)=πr2K(r) = \pi r^2 or L(r)=rL(r)=r for a stationary Poisson process

together with columns containing the values of the neighbourhood density function for each point in the pattern. Column i corresponds to the ith point of type from. The last two columns contain the r and theo values.

Author(s)

Ege Rubak rubak@math.aau.dk and Adrian Baddeley Adrian.Baddeley@curtin.edu.au.

See Also

Kcross, Lcross, localK, localL.

Inhomogeneous counterparts of localK and localL are computed by localKcross.inhom and localLinhom.

Examples

  X <- amacrine

  # compute all the local Lcross functions
  L <- localLcross(X)

  # plot all the local Lcross functions against r
  plot(L, main="local Lcross functions for amacrine", legend=FALSE)

  # plot only the local L function for point number 7
  plot(L, iso007 ~ r)
  
  # compute the values of L(r) for r = 0.1 metres
  L12 <- localLcross(X, rvalue=0.1)

[Package spatstat.explore version 3.3-1 Index]