Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: RE: RE: Re: How Do I Plot a Serset?


From   "German Rodriguez" <grodri@princeton.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: RE: RE: Re: How Do I Plot a Serset?
Date   Mon, 8 Sep 2003 15:15:02 -0400

Thanks to Nick Cox for additional comments on c(s) and mspline that have
made me see the light. He was absolutely right when he said

> > . -c(s)- has not been removed, but has a new identity
> > as -twoway mspline-.

I got so used to thinking of c(s) as a connect style that I completely
forgot that it did cross medians, until Nick pointed out that

> However, -c(s) since first introduction in
> Stata was based on a preliminary computation
> of cross-medians, as was documented, and there was the same
> -bands()- option to tune its operation.

He is right again. I went back to my copy of the version 2 manual (which
I keep in a glass case just for situations like this) and there it was.
Nick is a walking encyclopedia, but you all knew that.

> If there is a distinction between what -twoway mspline- does
> and what -c(s)- did, then it is pretty subtle.

I agree; they are the same thing. The only subtle difference I could
find (after RTFM) is in the defaults. The c(s) default of 200 bands is
such that in many cases it behaves more as a connect style than a
smoother. The mspline default, max(10, round(10*log10(n)) for n obs,
will generally result in more smoothing.

But back to sersets:
 
The command that motivated my original post was serset create_cspline,
which appears to do just the spline interpolation part.  There's a
separate serset create_xmedians that does the cross medians (with 200
bands by default!), so clearly these two steps are now separated in the
plumbing, which is a good thing. It seems likely that

Stata 8's mspline =uses= serset create_xmedians + serset create_cspline

I believe that serset create_cspline has more general applicability; it
could provide the basis for a general "curvy" connect style, a feature
that would be useful quite apart from the problem of scatterplot
smoothing, connecting things other than cross medians. The tool is
there. If only we could plot sersets.

Germán Rodríguez


*
*   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–2021 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index