bw.taylor | R Documentation |
Use Taylor's non-random bootstrap technique to select the bandwidth for kernel density estimation on the real line.
bw.taylor(x, ..., srange = NULL, useC = TRUE)
x |
Numeric vector. |
... |
Ignored. |
srange |
Range of bandwidths to be considered. A numeric vector of length 2. |
useC |
Logical value specifying whether to use faster C code. |
This function selects a bandwidth for kernel density estimation
of a probability density on the real line,
using the numeric data x
and assuming a Gaussian kernel. The result
is the numeric value of the standard deviation of the Gaussian kernel.
The function uses the method of Taylor (1989) who showed that, when using the Gaussian kernel, the optimisation criterion can be computed rapidly from the data without any randomised resampling.
The domain of the probability density is assumed to be the entire real line. Boundary correction is not currently implemented.
The result of bw.taylor
is a single numeric value
giving the selected bandwidth.
A single numeric value.
and \adrian.
Taylor, C.C. (1989) Choice of the Smoothing Parameter in Kernel Density Estimation, Biometrika 76 4, 705–712.
bw.nrd
in the stats package
for standard bandwidth selectors.
x <- rnorm(30)
bw.taylor(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.