bw.pow: Variable Bandwidths Proportional to a Power of the Data Value

View source: R/bw.pow.R

bw.powR Documentation

Variable Bandwidths Proportional to a Power of the Data Value

Description

Computes variable smoothing bandwidths intended to be proportional to the observed data values, raised to a given power.

Usage

 bw.pow(X, h0, POW = 0.75, trim = 5, ...)

Arguments

X

Data for which bandwidths should be calculated. A numeric vector of positive values.

h0

A scalar value giving the global smoothing bandwidth in the same units as X. The default is bw.nrd0(X).

POW

Numeric value. The exponent of the power transformation to be applied to X.

trim

A trimming value required to curb excessively large bandwidths. See Details. The default is sensible in most cases.

...

Ignored.

Details

This function computes adaptive smoothing bandwidths for the data values in X. Larger data values are assigned larger bandwidths.

Bandwidths are proportional to X^POW. The bandwidth at location u is

h(u) = \mbox{\texttt{h0}} * \mbox{min}[ \frac{u^{\mbox{\texttt{POW}}}}{\gamma}, \mbox{\texttt{trim}} ]

where \gamma is the geometric mean of the values u^{\mbox{\texttt{POW}}}. This allows the global bandwidth h0 to be considered on the same scale as a corresponding fixed bandwidth.

Value

A numeric vector of the same length as X.

Author(s)

\tilman

. Adapted by \adrian.

See Also

bw.abram, bw.nrd0.

Examples

  xx <- sort(rexp(10))
  bb <- bw.pow(xx)
  signif(rbind(xx, bb), 3)

spatstat.univar documentation built on June 8, 2025, 12:52 p.m.