| bw.F.SBC.rt | R Documentation |
This function computes the bandwidth selector for \insertCitebose2022;textualWData kernel distribution estimator using the rule of thumb.
bw.F.SBC.rt(
y,
w = function(y) {
ifelse(y >= 0, y, NA)
},
kernel = c("gaussian", "epanechnikov", "rectangular", "triangular", "biweight",
"cosine", "optcosine")
)
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 |
kernel |
A character string specifying the kernel function. Available options: |
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]}.
The optimal bandwidth value for \insertCitebose2022;textualWData kernel distribution estimator based on the rule of thumb.
cdf.bd
bw.F.SBC.rt(shrub.data$Width)
bw.F.SBC.rt(shrub.data$Width, kernel = "epanechnikov")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.