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/