Kernel density estimation (Gaussian weight function) [STB-16: snp6] ---------------------------------------------------- ^kerngaus^ varname halfwidth density midpt Description ----------- ^kerngaus^ estimates the density of "varname" using a Gaussian kernel as described in Fox, (1990). Following a suggestion of Chambers et. al., the density is estimated at 50 equally spaced points in the range of "varname". "halfwidth" is a constant that specifies the width of the density window around each point. "density" is a new variable that contains the density estimate on output. "midpt" is a new variable that contains the midpoints of the 50 bins within which the density is calculated. The data set is assumed to be sorted in the order of "varname". The Gaussian kernel has an efficiency of about 0.95 relative to the estimator most efficient in MISE (mean integrated squared error). Example ------- . ^kerngaus infmorat 20 gaukern midpt^ After some time (depending on the number of observations) the results are placed in the new variable ^gaukern^. . ^list midpt gaukern^ lists the values of the 50 midpoints and the estimated density at each point. . ^graph gaukern midpt if _n<=50, c(s) s(o)^ displays a graph of the density estimate. References ---------- Chambers, J.M., W.S. Cleveland, B. Kleiner and P.A. Tukey (1983) Graphical Methods for Data Analysis. Wadsworth & Brooks/Cole Chap. 2: 9-46. Silverman, B.W. (1986) Density Estimation for Statistics and Data Analysis. Chapman and Hall. Fox, J. (1990) Describing univariate distributions. In (Fox, J. & J.S. Long, Eds.) "Modern Methods of Data Analysis". Sage Chap. 2: 58-125. Authors ------- Isaias H. Salgado-Ugarte, Makoto Shimizu and Toru Taniuchi, University of Tokyo, Faculty of Agriculture, Dept. of Fisheries (Fax 81-3-3812-0529) Also see -------- STB: snp6 (STB-16) On-line: ^help^ for ^boxdetra^, ^boxdetr2^, ^cosdetra^, ^kernsim^, ^kernepa^, ^adgakern^, ^adgaker2^