Usage: |
{hopt, ch} = denbwcrit(crit, x, h {,K} {,d} )
|
Input: |
| crit | string, criterion for bandwidth selection:
"lscv" = Least Squares Cross Validation,
"bcv" = Biased Cross Validation,
"scv" = Smoothed Cross Validation,
"jmp" = Jones, Marron and Park Cross Validation,
"pm" = Park and Marron Plug-in,
"sj" = Sheather and Jones Plug-in
|
| x | n x 1 vector, the data.
|
| h | m x 1 vector of bandwidths.
|
| K | optional string representing the 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: |
| hopt | scalar, optimal bandwidth. (If negative in
case of "pm" or "sj", denbwcrit needs to be run
again with different range of h.) |
| ch | m x 2 vector, the criterion function for h values. |