Gaussian-kernel KDE on a uniform grid. Bandwidth defaults to
Silverman's 1.06 * sd(x) * n^{-1/5}.
Usage
morie_dsp_parzen_pdf(x, bandwidth = NULL, n_points = 100L)
Arguments
- x
Numeric vector.
- bandwidth
Optional kernel bandwidth.
- n_points
Grid size. Default 100.
Value
List with grid and density.
References
Rangayyan & Krishnan (2015), Ch. 5, sec. 5.6;
Parzen (1962); Silverman (1986).
Examples
set.seed(1)
str(morie_dsp_parzen_pdf(rnorm(200)), max.level = 1)
#> List of 2
#> $ grid : num [1:100] -3.24 -3.17 -3.1 -3.04 -2.97 ...
#> $ density: num [1:100] 7.65e-05 1.39e-04 2.44e-04 4.14e-04 6.79e-04 ...