bw.F.BD: \insertCitebose2022;textualWData local bandwidth selector for...

View source: R/bw.F.BD.R

bw.F.BDR Documentation

\insertCitebose2022;textualWData local bandwidth selector for \insertCitebose2022;textualWData kernel distribution estimator

Description

This function implements the local bandwidth selector proposed by \insertCitebose2022;textualWData for their own kernel distribution estimator.

Usage

bw.F.BD(
  y,
  w = function(y) {
     ifelse(y >= 0, y, NA)
 },
  y.seq,
  cy.seq
)

Arguments

y

A numeric vector containing the biased sample.

w

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

y.seq

A numeric vector containing the points on which the local bandwidth is estimated.

cy.seq

A numeric vector representing the constants to be used in the bandwidth estimation for each point of y.seq. Alternatively, a single numeric value can be provided, which will be used for all points in the y.seq vector.

Details

Local bandwidths selectors are estimated using the formula:

\widehat{h}_{F, \mathrm{BD}, C(y)} (y) = \frac{C(y) \widehat{\sigma}_{w}}{(n w(y))^{1/3}},

where C(y) is a positive parameter that depends on the point y and \widehat{\sigma}_{w} 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]}.

The parameter C(y) is provided to the function by using the argument cy.seq, which is a vector of positive values that is used to compute the bandwidth for each point in y.seq. Alternatively, a single numeric value can be provided, which will be used for all points in the y.seq vector. The simulations carried out by \insertCitebose2022;textualWData suggest that choosing C(y)=0.25 or C(y)=0.5 provides good results in the tail region of the distribution, with tails defined as points below the 5th percentile or above the 95th percentile. On the other hand, C(y)=1.3 provides good results for the remaining points. If some bandwidths are not positive, they are replaced by the mean of the neighbors.

Value

A numeric vector containing the bandwidths for each point in y.seq.

References

\insertAllCited

See Also

cdf.bd

Examples

bw.F.BD(shrub.data$Width, y.seq = seq(0, 1, length.out = 512), cy.seq = rep(1, 512))

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