R: Likelihood Cross Validation Bandwidth Selection for Kernel...

bw.lppl {spatstat.linnet} | R Documentation

## Likelihood Cross Validation Bandwidth Selection for Kernel Density on a Linear Network

### Description

Uses likelihood cross-validation to select a smoothing bandwidth for the kernel estimation of point process intensity on a linear network.

### Usage

       bw.lppl(X, ..., srange=NULL, ns=16, sigma=NULL, weights=NULL,
               distance=c("euclidean", "path"), shortcut=TRUE, warn=TRUE)

### Arguments

`X` | A point pattern on a linear network (object of class `"lpp"`).
`srange` | Optional numeric vector of length 2 giving the range of values of bandwidth to be searched.
`ns` | Optional integer giving the number of values of bandwidth to search.
`sigma` | Optional. Vector of values of the bandwidth to be searched. Overrides the values of `ns` and `srange`.
`weights` | Optional. Numeric vector of weights for the points of `X`. Argument passed to `density.lpp`.
`distance` | Argument passed to `density.lpp` controlling the type of kernel estimator.
`...` | Additional arguments passed to `density.lpp`.
`shortcut` | Logical value indicating whether to speed up the calculation by omitting the integral term in the cross-validation criterion.
`warn` | Logical. If `TRUE`, issue a warning if the maximum of the cross-validation criterion occurs at one of the ends of the search interval.

### Details

This function selects an appropriate bandwidth `sigma` for the kernel estimator of point process intensity computed by `density.lpp`.

The argument `X` should be a point pattern on a linear network (class `"lpp"`).

The bandwidth σ is chosen to maximise the point process likelihood cross-validation criterion

LCV(σ) = sum[i] log(λ[-i](x[i])) - integral[L] λ(u) du

where the sum is taken over all the data points x[i], where λ[-i](x_i) is the leave-one-out kernel-smoothing estimate of the intensity at x[i] with smoothing bandwidth σ, and λ(u) is the kernel-smoothing estimate of the intensity at a spatial location u with smoothing bandwidth σ. See Loader(1999, Section 5.3).

The value of LCV(σ) is computed directly, using `density.lpp`, for `ns` different values of σ between `srange[1]` and `srange[2]`.

The result is a numerical value giving the selected bandwidth. The result also belongs to the class `"bw.optim"` which can be plotted to show the (rescaled) mean-square error as a function of `sigma`.

If `shortcut=TRUE`, the computation is accelerated by omitting the integral term in the equation above. This is valid because the integral is approximately constant.

### Value

A numerical value giving the selected bandwidth. The result also belongs to the class `"bw.optim"` which can be plotted.

### Author(s)

Greg McSwiggan, Suman Rakshit and Adrian Baddeley Adrian.Baddeley@curtin.edu.au.

### References

Loader, C. (1999) Local Regression and Likelihood. Springer, New York.

McSwiggan, G., Baddeley, A. and Nair, G. (2019) Estimation of relative risk for events on a linear network. Statistics and Computing 30 (2) 469–484.

### See Also

`density.lpp`, `bw.scott`.

For point patterns in two-dimensional space, use `bw.ppl`.

### Examples

      if(interactive()) {
        b <- bw.lppl(spiders)
        plot(b, main="Likelihood cross validation for spiders")
        plot(density(spiders, b, distance="e"))
      } else {
        b1 <- bw.lppl(spiders, ns=2)
        b2 <- bw.lppl(spiders, ns=2, shortcut=TRUE)
      }

[Package spatstat.linnet version 2.0-0 Index]