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

bw.frac

Bandwidth Selection Based on Window Geometry


Description

Select a smoothing bandwidth for smoothing a point pattern, based only on the geometry of the spatial window. The bandwidth is a specified quantile of the distance between two independent random points in the window.

Usage

bw.frac(X, ..., f=1/4)

Arguments

X

A window (object of class "owin") or point pattern (object of class "ppp") or other data which can be converted to a window using as.owin.

...

Arguments passed to distcdf.

f

Probability value (between 0 and 1) determining the quantile of the distribution.

Details

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

The bandwidth σ is computed as a quantile of the distance between two independent random points in the window. The default is the lower quartile of this distribution.

If F(r) is the cumulative distribution function of the distance between two independent random points uniformly distributed in the window, then the value returned is the quantile with probability f. That is, the bandwidth is the value r such that F(r) = f.

The cumulative distribution function F(r) is computed using distcdf. We then we compute the smallest number r such that F(r) >= f.

Value

A numerical value giving the selected bandwidth. The result also belongs to the class "bw.frac" which can be plotted to show the cumulative distribution function and the selected quantile.

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk.

See Also

For estimating point process intensity, see density.ppp, bw.diggle, bw.ppl, bw.scott, bw.CvL.

For other smoothing purposes, see bw.stoyan, bw.smoothppp, bw.relrisk.

Examples

h <- bw.frac(letterR)
  h
  plot(h, main="bw.frac(letterR)")

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.