bandwidth_normal {IVDML}R Documentation

Compute Bandwidth Using the Normal Reference Rule

Description

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.

Usage

bandwidth_normal(A)

Arguments

A

Numeric vector. The data for which the bandwidth is to be computed.

Value

A numeric value representing the computed bandwidth.

References

Silverman, B. W. (1986). Density Estimation for Statistics and Data Analysis. Chapman & Hall/CRC monographs on statistics and applied probability. Chapman & Hall.

Examples

set.seed(1)
A <- rnorm(100)
bandwidth_normal(A)


[Package IVDML version 1.0.0 Index]