bw.F.SBC.rt: Rule of thumb bandwidth selector for...

View source: R/bw.F.SBC.rt.R

bw.F.SBC.rtR Documentation

Rule of thumb bandwidth selector for \insertCitebose2022;textualWData kernel distribution estimator

Description

This function computes the bandwidth selector for \insertCitebose2022;textualWData kernel distribution estimator using the rule of thumb.

Usage

bw.F.SBC.rt(
  y,
  w = function(y) {
     ifelse(y >= 0, y, NA)
 },
  kernel = c("gaussian", "epanechnikov", "rectangular", "triangular", "biweight",
    "cosine", "optcosine")
)

Arguments

y

A numeric vector containing the biased sample.

w

A function representing the bias function applied to the data points. It must be evaluable and positive in each point of the sample y. By default, it is set to the length-biased function.

kernel

A character string specifying the kernel function. Available options: "gaussian", "epanechnikov", "rectangular", "triangular", "biweight", "cosine" and "optcosine".

Details

The bandwidth is computed as follows:

\widehat{h}_{F, \mathrm{RT}} = \left(\frac{4 \sqrt{\pi} \widehat{\mu}_{w} \widehat{\bar{\mu}}_{w}\kappa(K)}{n \eta(K)^{2} }\right)^{1/3} \widehat{\sigma},

where both \kappa(K) and \eta(K) depend only on the kernel and are defined as

\kappa(K) = \int_{-\infty}^{+\infty} 2 u W (u) K(u) du \quad \text{and} \quad \eta(K) = \int_{-\infty}^{+\infty} u^2 K(u) du,

where W is the kernel distribution function associated with the kernel density function K. The estimators \widehat{\mu}_w and \widehat{\bar{\mu}}_w are given by

\widehat{\mu}_w = n \left(\sum_{i=1}^{n} \frac{1}{w(Y_i)} \right)^{-1} \quad \text{and} \quad \widehat{\bar{\mu}}_w = \frac{\widehat{\mu}_w}{n} \sum_{i=1}^{n} \frac{1}{w(Y_i)^2}.

\widehat{\sigma} is an estimation of the standard deviation of the distribution given by

\widehat{\sigma}_w=\sqrt{\left(\frac{1}{n} \sum_{i=1}^n \frac{1}{w(Y_i)}\right)^{-1} \left[\left(\frac{1}{n} \sum_{i=1}^n w(Y_i)\right)-\left(\frac{1}{n} \sum_{i=1}^n \frac{1}{w(Y_i)}\right)^{-1}\right]}.

Value

The optimal bandwidth value for \insertCitebose2022;textualWData kernel distribution estimator based on the rule of thumb.

References

\insertAllCited

See Also

cdf.bd

Examples

bw.F.SBC.rt(shrub.data$Width)
bw.F.SBC.rt(shrub.data$Width, kernel = "epanechnikov")


WData documentation built on Nov. 2, 2026, 1:10 a.m.