Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: smoother
See also: regxbwsel regbwsel regxest

Quantlet: regxbwcrit
Description: determines the optimal from a range of bandwidths by one using the resubstitution estimator with one of the following penalty functions: Shibata's penalty function (shi), Generalized Cross Validation (gcv), Akaike's Information Criterion (aic), Finite Prediction Error (fpe), Rice's T function (rice).

Reference(s):

Usage: {hopt, ch} = regxbwcrit(crit, x {,h {,K} {,d} })
Input:
crit string, criterion for bandwidth selection: "shi", "gcv", "aic", "fpe", "rice".
x n x 2 vector, the data.
h m x 1 vector, vector of bandwidths.
K string, kernel function on [-1,1] or Gaussian kernel "gau". If not given, "qua" is used.
Output:
hopt scalar, optimal bandwidth.
ch m x 2 vector, the criterion function for h values.

Example:
library("smoother")
x=read("nicfoo")
h=grid(0.05,0.1,10)
{hopt,ch}=regxbwcrit("gcv",x,h)
hopt
library("plot")
ch=setmask(ch,"line","blue")
plot(ch)
setgopt(plotdisplay,1,1,"title",string("hopt=%1.6g",hopt))

Result:
hopt is the LSCV optimal bandwidth for these data.
The resulting curve for the LSCV criterion is plotted.



Author: M. Mueller, 19990413
(C) MD*TECH Method and Data Technologies, 05.02.2006