local_k_cross_inhom: Inhomogeneous multitype (cross-type) neighbourhood density...

View source: R/localk_multi.R

local_k_cross_inhomR Documentation

Inhomogeneous multitype (cross-type) neighbourhood density function

Description

Computes spatially-weighted versions of the local K-function or L-function, defined by Getis and Franklin (1987).

Usage

local_k_cross_inhom(X, i, j, lambdaI = NULL, lambdaJ = NULL, ...,
  correction = "Ripley", verbose = TRUE, rvalue = NULL, lambdaIJ = NULL,
  sigma = NULL, varcov = NULL)

Arguments

X

Multitype point pattern (ppp object). It must be a multitype point pattern (or marked point pattern).

i

The type (mark value) of the points in X from which distances are measured. A character string (or something that will be converted to a character string). Defaults to the first level of marks(X).

j

The type (marks value) of the points in X to which distances are measured. A character string (or something that will be converted to a character string'). Defaults to the second level of marks(X).

lambdaI

Optional. Values of the estimated intensity of the sub-process of points of type i. Either a pixel image (object of class "im"), a numeric vector containing the intensity values at each of the type i points in X, or a function(x,y) which can be evaluated to give the intensity value at any location.

lambdaJ

Optional. Values of the estimated intensity of the sub-process of points of type j. Either a pixel image (object of class "im"), a numeric vector containing the intensity values at each of the type j points in X, or a function(x,y) which can be evaluated to give the intensity value at any location.

...

Ignored.

correction

String sprecifying the edge correction to be applied. Option are "none", "translate", "translation", "Ripley", "isotropic" or "best". Only one correction may be given.

verbose

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

rvalue

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

lambdaIJ

Optional. A matrix containing estimates of the product of the intensities lambdaI and lambdaJ for each pair of points of types i and j respectively.

sigma

Optional argument passed to density.ppp to control the kernel smoothing procedure for estimating lambda, if lambda is missing.

varcov

Optional argument passed to density.ppp to control the kernel smoothing procedure for estimating lambda, if lambda is missing.

Details

The command local_l_cross_inhom computes the neighbourhood density function, a local version of the L-function (Besag's transformation of Ripley's K-function) proposed by Getis and Franklin (1987), for 2 types in a multitype spatial point pattern. The command local_k_cross computes the corresponding local analogue of the cross-type K-function.

Given a multitype spatial point pattern X with types i and j, the neighbourhood density function L[ij](r) associated with the ith point in X is computed by

L[ij](r) = sqrt( (a/((n[j])* pi)) * sum[j] e[i,j])

where the sum is over all points j that lie within a distance r of the ith point, λ[j] is the estimated intensity of type j of the point pattern at the point j, and e[i,j] is an edge correction term (as described in Kest). The value of L[ij](r) can also be interpreted as one of the summands that contributes to the global estimate of the cross-type L- function.

By default, the function L[ij](r) or K[ij](r) is computed for a range of r values for each point i. 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 i of the pattern X.

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

Computation can be done in parallel by registering a parallel backend for the foreach package.

Value

If rvalue is given, the result is a numeric vector of equal length to the number of points in X_i.

If the codervalue 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 r at which the function K has been estimated

theo

the theoretical value K(r) = pi * r^2 or L(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. The last two columns contain the r and theo values.

References

Getis, A. and Franklin, J. (1987) Second-order neighbourhood analysis of mapped point patterns. Ecology 68, 473–477.

See Also

localLinhom localKinhom Lcross.inhom Kcross.inhom


keithschulze/supr documentation built on Nov. 26, 2022, 7:09 a.m.