Learn R Programming

FiSh (version 1.1)

nsrk: Normal scale rule for kernel density estimation

Description

Bandwidth selector for non-parametric estimation. Estimates the optimal AMISE bandwidth using the Normal Scale Rule with Gaussian kernel.

Usage

nsrk(x, log_trsf=FALSE)

Arguments

x

Univariate data.

log_trsf

Logical flag: if TRUE the data are log-transformed (usually used for skewed positive data). By default log_trsf = FALSE.

Value

The bandwidth value.

References

M. P. Wand and M. C. Jones, (1995). Kernel Smoothing. Chapman and Hall, London.

Examples

Run this code
# NOT RUN {
x <- rnorm(1000)
h <- nsrk(x)

# }

Run the code above in your browser using DataLab