local_k_inhom: Inhomogeneous Neighbourhood density function

View source: R/localk.R

local_k_inhomR Documentation

Inhomogeneous Neighbourhood density function

Description

Computes spatially-weighted versions of the local K-function or L-function. Note: Equivalent to localKinhom and localLinhom except that they can take advantage of parallel computation K-function or L-function via foreach package.

Usage

local_k_inhom(X, lambda = NULL, ..., correction = "Ripley",
  verbose = TRUE, rvalue = NULL, sigma = NULL, varcov = NULL)

Arguments

X

A point pattern (object of class "ppp").

lambda

Optional. Values of the estimated intensity function. Either a vector giving the intensity values at the points of the pattern X, a pixel image (object of class "im") giving the intensity values at all locations, a fitted point process model (object of class "ppm") or a function(x,y) which can be evaluated to give the intensity value at any location.

...

ignored.

correction

tring 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 r at which the function L or K should be computed.

sigma

Optional arguments passed to density.ppp to control the kernel smoothing procedure for estimating lambda, if lambda is missing. @param varcov Optional arguments passed to density.ppp to control the kernel smoothing procedure for estimating lambda, if lambda is missing.

Details

The functions local_k_inhom and local_l_inhom are inhomogeneous or weighted versions of the neighbourhood density function implemented in local_k and local_l.

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

L[i](r) = sqrt( (1/pi) * sum[j] e[i,j]/lambda[j])

where the sum is over all points j != i that lie within a distance r of the ith point, λ[j] is the estimated intensity 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[i](r) can also be interpreted as one of the summands that contributes to the global estimate of the inhomogeneous L function (see Linhom).

By default, the function L[i](r) or K[i](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 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 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 length equal to the number of points in the point pattern.

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 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

Kinhom Linhom localKinhom localLinhom local_k local_l


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