bw.bdh {spatstat.explore}R Documentation

Adjust Bandwidth Selection Rule to Account for Inhomogeneity

Description

Calculate a bandwidth for kernel estimation of the inhomogeneous pair correlation function. Given a bandwidth selection rule or bandwidth value which would be appropriate for a homogeneous point pattern, this function adjusts the bandwidth to account for inhomogeneity.

Usage

bw.bdh(X, lambda=NULL, ..., base=bw.stoyan, k=2)

Arguments

X

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

lambda

Optional. Values of the estimated intensity function of X. 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", "kppm" or "dppm") or a function(x,y) which can be evaluated to give the intensity value at any location. If lambda is missing or NULL, the intensity will be estimated from X using density.ppp.

...

Arguments passed to density.ppp to control the estimation of intensity (if lambda=NULL), or arguments passed to base if it is a function.

base

Bandwidth selection rule, or bandwidth value, that will be adjusted. Either a single numeric value, or a function that will be applied to the pattern X to obtain a bandwidth value, or a character string giving the name of such a function.

k

Integer exponent for calculating the adjustment factor.

Details

This function calculates a bandwidth value for kernel estimation of the inhomogeneous pair correlation function using pcfinhom.

It takes a bandwidth value or bandwidth selection rule that would be appropriate if the point process were homogeneous, adjusts the bandwidth to account for inhomogeneity, and returns the adjusted bandwidth value.

The adjusted (inhomogeneous) bandwidth is the original (homogeneous) bandwidth multiplied by the Baddeley, Davies and Hazelton (2025) variance controlling adjustment factor.

First a numerical bandwidth value, appropriate for a homogeneous process, is calculated. The default is to apply the extrapolated Stoyan rule-of-thumb bw.stoyan to the point pattern X. If base is specified, it may be either a numeric value for the bandwidth, or another function that will be applied to X to calculate a bandwidth value.

Next the intensity value at each point of X is evaluated. The argument lambda may be:

Finally the bandwidth is adjusted by multiplying it by the Baddeley, Davies and Hazelton (2025) variance-controlling factor

a = (n^{-1} \sum_i \lambda_i ) \, (n^{-1} \sum_i \lambda_i^{-k} )^{1/k}

where \lambda_i is the value of lambda for the ith data point X[i].

When k=2 (the default), the adjustment factor is

a = (n^{-1} \sum_i \lambda_i ) \, \sqrt{n^{-1} \sum_i \lambda_i^{-2}} )

Value

A finite positive numerical value giving the selected bandwidth (the standard deviation of the smoothing kernel). The result has an attribute "adjust" giving the adjustment factor a.

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Tilman Davies Tilman.Davies@otago.ac.nz and Martin Hazelton Martin.Hazelton@otago.ac.nz.

References

Baddeley, A., Davies, T.M. and Hazelton, M.L. (2025) An improved estimator of the pair correlation function of a spatial point process. Biometrika, to appear.

See Also

bw.stoyan, bw.pcf, pcfinhom

Examples

  if(require(spatstat.model)) {
    fit <- ppm(japanesepines ~ x)
    (b <- bw.bdh(japanesepines, fit))
    attr(b, "adjust")
  }

[Package spatstat.explore version 3.5-2 Index]