View source: R/methods_IVDML.R
bandwidth_normal | R Documentation |
This function calculates the bandwidth for kernel smoothing using the Normal Reference Rule. The rule is based on Silverman's rule of thumb, which selects the bandwidth as a function of the standard deviation and interquartile range (IQR) of the data. The bandwidth is computed as: h = 1.06 \times \min(\mathrm{sd}(A), \mathrm{IQR}(A) / 1.34) / N^{0.2}
, where \mathrm{sd}(A)
is the standard deviation of A
, \mathrm{IQR}(A)
is the interquartile range and N
is the length of A
.
bandwidth_normal(A)
A |
Numeric vector. The data for which the bandwidth is to be computed. |
A numeric value representing the computed bandwidth.
Silverman, B. W. (1986). Density Estimation for Statistics and Data Analysis. Chapman & Hall/CRC monographs on statistics and applied probability. Chapman & Hall.
set.seed(1)
A <- rnorm(100)
bandwidth_normal(A)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.