# Re: st: RE: confidence intervals for lowess plot

 From Maarten buis To Jacki Buros , enzo.coviello@alice.it, statalist@hsphsun2.harvard.edu Subject Re: st: RE: confidence intervals for lowess plot Date Tue, 17 Oct 2006 17:59:25 +0100 (BST)

```Jacki and Enzo:

Jacki: I don't have -lowess2-, so I can't verify that for myself, but
given your description it seemst that you are right.

I was thinking along the same line as Jacki:
create a bootstrap sample of the data, compute the lowess curve, for
each value of x store the smoothed y s, create the next bootstrap
sample, compute the lowess curve, for each value of x store the
smoothed y s, etc.

The pointwise confidence interval for a value of x would be the 5 th
and 95 th percentile of the smoothed y s for that value of x (or use a
BC or BCA confidence interval)

Problem is that lowess makes multiple different smoothed y s if there
are multiple observation with the same value of x (as I noted in recent
post on statalist), so which one do you choose?

Also the number of bootstrap samples for each value of x is likely to
be somewhat different, which is probably not very desirable. One
solution would be to compute a lowess on the real sample and draw
bootstrap samples from the residuals, and the new sample would be the
lowess estimate + drawn residuals.

Anyhow I am a bit stuck on this one.

I have "bootstraped" lowess curves in the past, but in that case had no
ties in x and I knew the sampling distribution of each "observation",
since the "observations" were actually regression estimates. So I drew
a bootstrap sample from the sampling distributions and computed a
lowess curve through that sample. You can get the working paper from:
http://home.fsw.vu.nl/m.buis/wp/locfit.html

Maarten

--- Jacki Buros <jburos@gmail.com> wrote:
> I think the bstrap CIs in the lowess2.ado encounter the same problem
> as the CIs based on the regression SEs -- the program runs the bstrap
> for each regression estimate, and does not run the bstrap across the
> regression estimates. This may not be apparent to the list members
> but I know it to be true.
>
> Consider that restricting the lowess analysis to a subsample of the
> estimates has an enormous effect on the estimates at the tails of the
> x-var distribution while it has little effect on the estimates in the
> middle - this variance is not reflected by the bstrap since it runs a
> separate (and equivalent) bstrap for each observation.
>
> My sense is that the bstrap should be implemented at the top-level --
> so that the lowess is bstrapped and not the individual linear
> regressions.
>
> On 10/14/06, Enzo Coviello <enzo.coviello@alice.it> wrote:
> > Anyway I computed bootstrap confidence interval.
> > Andersen says they are appropriate (in private
> > mail I am sending the graph file to Maarten and Jacki).
> > It looks a bit strange since I expect a plot with
> > a large interval in the tails and narrow in the
> > mid as it appears using running.
> > Bootstrap confidence intervals are instead
> > narrowest at the left tail and progressively
> > larger toward the right tail of the graph.

-----------------------------------------
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/
-----------------------------------------

___________________________________________________________
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.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/
```