Library: | smoother |
See also: | denest denci dencb denbwcrit denrot canker |
Quantlet: | denbwsel | |
Description: | interactive tool for bandwidth selection in univariate kernel density estimation. |
Usage: | {hcrit,crit}= denbwsel(x {,h {,K} {,d} }) | |
Input: | ||
x | n x 1 vector, the data. | |
h | opional m x 1 vector, vector of bandwidths. | |
K | optional string, kernel function on [-1,1], default = "gau" | |
d | optional scalar, discretization binwidth. d must be smaller than h. If not given, the minimum of min(h)/3 and (max(x)-min(x))/200 is used. | |
Output: | ||
hcrit | p x 1 vector, selected bandwidths by the different criteria. | |
crit | p x 1 string vector, criteria considered for bandwidth selection. |
library("smoother") x=normal(500) tmp=denbwsel(x)
You may interactively choose the bandwidth selector. The parameters (range of bandwidths, kernel K, binwidth d) can be changed as well.