Statalist The Stata Listserver


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

st: RE: lowes generate


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: lowes generate
Date   Sun, 15 Oct 2006 17:27:17 +0100

You are correct. This was mentioned briefly in 
the Stata Journal in SJ 5(4): 574-593 (2005). 

It can indeed be a surprise, but the alternative of 
insisting that the same x values have the same 
smoothed values really doesn't sit well with 
the lowess algorithm's way of defining windows. 

I don't know if other implementations of lowess
(or loess, or locfit) have the same way of 
dealing with ties, but I think that Stata implementations
have consistently done this. 

Nick 
[email protected] 

Maarten buis
 
> I came across the following puzzle while looking into bootstrapping
> -lowess- curves: If the variable on the x-axis has ties, than I would
> expect all observations with the same x value to have the 
> same smoothed
> y value. However if I generate smoothed values of y using 
> -lowess- with
> the generate option, observations with the same x value sometimes get
> different smoothed y s, and this already occurs in the second 
> digit, so
> it seems too big for just rounding error. An example of this behavior
> is given below.
> 
> *---------- begin example -----
> sysuse auto, clear
> lowess price rep78, gen(sm)
> table rep78, c(min sm max sm)
> *------------ end example -----

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



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