Library: | cafpe |
See also: | tp/cafpe/hoptest |
Quantlet: | hsilv | |
Description: | Quantlet to compute Silverman's rule-of-thumb bandwidth for density estimation using either the gaussian or uniform kernel |
Usage: | h = hsilv(sigy,d,ntotal,kerntype) | |
Input: | ||
sigy | scalar, standard deviation of regressors | |
d | number of continuous regressors | |
ntotal | number of observations for estimation | |
kerntype | type of kernel used: "gaussian" or "quartic" | |
Output: | ||
h | Silverman's rule-of-thumb bandwidth |
pathcafpe = "tp/cafpe/" ; path of CAFPE quantlets func(pathcafpe + "hsilv.xpl") ; load required XploRe files of CAFPE d = 2 ntotal = 100 kerntype = "gaussian" y = normal(ntotal,d) sigy = prod(var(y)')^(1/d) h = hsilv(sigy,d,ntotal,kerntype) "h" h
returns Silverman's rule-of-thumb bandwidth
Library: | cafpe |
See also: | tp/cafpe/hoptest |