bw.pow {spatstat.univar} | R 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 |
POW |
Numeric value. The exponent of the power transformation to
be applied to |
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 Davies Tilman.Davies@otago.ac.nz. Adapted by Adrian Baddeley Adrian.Baddeley@curtin.edu.au.
See Also
Examples
xx <- sort(rexp(10))
bb <- bw.pow(xx)
signif(rbind(xx, bb), 3)