# Re: st: grid point

 From Maarten buis <[email protected]> To [email protected] Subject Re: st: grid point Date Wed, 23 Jan 2008 09:22:10 +0000 (GMT)

```--- xinzheng shi <[email protected]> wrote:
>   I would like to know how to identify the number of
> grid point in the nonparametric graph. I know the
> usual way to identify the bandwidth is
> 0.9*sd*N^(-0.2). But is there any formular to link
> bandwidth with number of grid points given that
> observation number is N.

You don't tell us what nonparametric graph you are
talking about (there are many, e.g. -twoway fpfit-,
-twoway mband-) but given your reference to
bandwidth I assume you are talking about -lowess-.

There are many different ways of finding an optimal
bandwidth, apperently your formula is one of them.
Stata however doesn't use it, it just sets the
bandwidth by default to .8 and allows you to choose
whatever rule you feel comfortable with. I would
warn against taking such a formula too seriously,
such formulas are best viewed as a rules of thumb
to be changed whenever you feel the graph looks
funny. Bandwidth selection is still more an art
than a science.

The number of gridpoints is even less an issue. In
Stata the gridpoints are set equal to the actual
observation, which is why -twoway lowess- can be
quite slow in large datasets. I vaguely remember
that in the original work there was also a lot of
discussion about the gridpoints, but that is more
a computational efficiency problem. One of the
nice features of it is that makes the graph rather
angular in areas where the data is sparse. To me
that functions as an automatic warning sign not
to take the graph too seriously in those areas.

Hope this helps,
Maarten

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------

__________________________________________________________
Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```