Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

bw.pplHeat

Bandwidth Selection for Diffusion Smoother by Likelihood Cross-Validation


Description

Selects an optimal bandwidth for diffusion smoothing by point process likelihood cross-validation.

Usage

bw.pplHeat(X, ..., srange=NULL, ns=16, sigma=NULL,
         leaveoneout=TRUE, verbose = TRUE)

Arguments

X

Point pattern (object of class "ppp").

...

Arguments passed to densityHeat.ppp.

srange

Numeric vector of length 2 specifying a range of bandwidths to be considered.

ns

Integer. Number of candidate bandwidths to be considered.

sigma

Maximum smoothing bandwidth. A numeric value, or a pixel image, or a function(x,y). Alternatively a numeric vector containing a sequence of candidate bandwidths.

leaveoneout

Logical value specifying whether intensity values at data points should be estimated using the leave-one-out rule.

verbose

Logical value specifying whether to print progress reports.

Details

This algorithm selects the optimal global bandwidth for kernel estimation of intensity for the dataset X using diffusion smoothing densityHeat.ppp.

If sigma is a numeric value, the algorithm finds the optimal bandwidth tau <= sigma.

If sigma is a pixel image or function, the algorithm finds the optimal fraction 0 < f <= 1 such that smoothing with f * sigma would be optimal.

Value

A numerical value giving the selected bandwidth (if sigma was a numeric value) or the selected fraction of the maximum bandwidth (if sigma was a pixel image or function). The result also belongs to the class "bw.optim" which can be plotted.

Author(s)

Adrian Baddeley and Tilman Davies.

See Also

bw.CvLHeat for an alternative method.

Examples

online <- interactive()
  if(!online) op <- spatstat.options(npixel=32)
  f <- function(x,y) { dnorm(x, 2.3, 0.1) * dnorm(y, 2.0, 0.2) }
  X <- rpoint(15, f, win=letterR)
  plot(X)
  b <- bw.pplHeat(X, sigma=0.25)
  b
  plot(b)
  if(!online) spatstat.options(op)

spatstat.core

Core Functionality of the 'spatstat' Family

v2.1-2
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Kasper Klitgaard Berthelsen [ctb], Achmad Choiruddin [ctb], Jean-Francois Coeurjolly [ctb], Ottmar Cronie [ctb], Tilman Davies [ctb], Julian Gilbey [ctb], Yongtao Guan [ctb], Ute Hahn [ctb], Kassel Hingee [ctb], Abdollah Jalilian [ctb], Marie-Colette van Lieshout [ctb], Greg McSwiggan [ctb], Tuomas Rajala [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Plenge Waagepetersen [ctb], Hangsheng Wang [ctb]
Initial release
2021-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.