.- help for ^warpreg^ [STB-30: snp9] .- WARP kernel regression (Nadaraya-Watson estimator) -------------------------------------------------- ^warpreg^ yvar xvar [^if^ exp] [^in^ range], ^b^width^(^#^)^ ^k^ercode^(^#^)^ ^m^val^(^#^)^ ^so^rt [ ^g^en^(^mhvar midvar^)^ ^nog^raph graph_options ] Description ----------- ^warpreg^ calculates the WARP approximation to the Nadaraya-Watson estimate using ado and executable Turbo Pascal files for WARP univariate kernel density estimation. By default, ^warpreg^ draws the graph of the estimated conditional mean over the midpoints used for calculation connected by a line without any symbol. Options ------- ^b^width^(^#^)^ specifies the smoothing parameter (bandwidth or halfwidth) of the kernel density estimation for ^xvar^. ^k^ercode^(^#^)^ specifies the weight function (kernel) to calculate the required univariate densities according to the following numerical codes: 1 = Uniform 2 = Triangle 3 = Epanechnikov 4 = Quartic (Biweight) 5 = Triweight 6 = Gaussian ^m^val^(^#^)^ is a nuisance parameter equivalent to the number of averaged shifted histograms used to calculate the required density estimations. ^so^rt is used to indicate that the data have been sorted by x and y (to save time in repeated estimations). ^g^en^(^mhvar midvar^)^ creates two variables containing the estimated regression (conditional mean) values and the corresponding midpoints, respectively. ^nog^raph suppresses the graph. graph_options are any of the options allowed with ^graph, twoway^. Remarks ------- ^b^width, ^m^val, and ^k^ercode, are not optional. If the user does not provide them, the program halts and displays an error message on screen. ^warpreg^ uses modified versions of the ado and Turbo Pascal executable files for kernel density estimation presented in Salgado-Ugarte, et al. (1993). These programs are based on the algorithms and programs provided by Haerdle (1991) and Scott (1992). The smoothness of the resulting estimate can be regulated by changing the bandwidth: wide intervals produce smooth results; narrow intervals give noiser results. Except for the Gaussian kernel all the functions are supported on [-1,1]. As ^m^val increases, the approximation is closer to the true kernel estimate, but the quantity of calculation increases too. A good compromise is to use an ^m^val around 10 (Haerdle, 1991). This procedure can be regarded as a descriptive smoother of scatterplots as well as a nonparametric regression estimator (Nadaraya-Watson). Examples -------- . ^warpreg wait dura, bwidth(0.65) mval(10) kercode(4)^ . ^warpreg accel time, b(2.4) m(10) k(4) gen(m2p4 mid2p4) nog^ References ---------- Haerdle, W. 1991. Smoothing techniques with implementation in S. Springer-Verlag. Salgado-Ugarte, I. H., M. Shimizu, and T. Taniuchi 1993. snp6: Exploring the shape of univariate data using kernel density estimators. Stata Technical Bulletin 16: 8-19. Salgado-Ugarte, I. H., M. Shimizu, and T. Taniuchi 1995. snp6.1: ASH, WARPing, and kernel density estimation for univariate data. Stata Technical Bulletin 26: 23-31. Salgado-Ugarte, I. H., M. Shimizu, and T. Taniuchi 1995. snp6.2: Practical rules for bandwidth selection in univariate density estimation. Stata Technical Bulletin 27: 5-19. Scott, D. W. 1992. Multivariate density estimation: Theory, practice, and visualization. John Wiley & Sons. Silverman, B. W. 1986. Density estimation for statistics and data analysis. Chapman and Hall. Authors ------- Isaias H. Salgado-Ugarte, Makoto Shimizu and Toru Taniuchi University of Tokyo, Faculty of Agriculture, Department of Fisheries, Yayoi 1-1-1, Bunkyo-ku Tokyo 113, Japan. fes01@@tzetzal.dcaa.unam.mx Also see -------- STB: STB-30 snp9, STB-27 snp6.2, STB-26 snp6.1, STB-16 snp6 On-line: ^help^ for @kerneld@, @warpden@, @warpdens@, @warpreg@, @kernreg@