Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: optimal bandwidth in Stata 8


From   "Austin Nichols" <austinnichols@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: optimal bandwidth in Stata 8
Date   Mon, 15 Sep 2008 12:53:05 -0400

Benjamin Villena Roldan <bvillena@troi.cc.rochester.edu> :
The Methods and Formulas section of the manual entry [R] kdensity is
quite clear: the default bandwidth is .9*N^(-1/5)*min(sd(x),
IQR(x)/1.349) which is not globally optimal in any sense. The Methods
and Formulas section of the manual entry [R] lpoly shows the formula
for the "asymptotically optimal constant bandwidth" used there (also
not globally optimal). You mention kernreg and kernreg1 which are not
official Stata, so you would have to read their help files, read the
ado code, or contact their authors for more detail.  The -locpoly-
command on SSC enjoys a special status; it is not official Stata but
is written by Stata staff (way before -lpoly- was introduced). If you
 view "http://www.stata-journal.com/software/sj6-4/st0053_3/locpoly.hlp";
in Stata, you will find the hilarious throwaway line:

If width() is not specified, then the "default" width is used; see [R]
kdensity.  This default is entirely inappropriate for local polynomial
smoothing.  Roll your own.


On Mon, Sep 15, 2008 at 12:01 PM, Benjamin Villena Roldan
<bvillena@troi.cc.rochester.edu> wrote:
> Hi Stata list,
> I'm running some kernel density estimation in Stata 8.
> The help file asserts that the "optimal" width is used (bandwidth) to do the
> kernel estimation. I searched in the internet, but I haven't found a clear
> description of the procedure used. Does anyone know the precise meaning of
> "optimal" width? (Cross-validation perhaps?).
> Does anyone know if the same choice is used for kernreg and kernreg1?
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index