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

st: Re: RE: "msp-values"


From   "Michael Blasnik" <[email protected]>
To   <[email protected]>
Subject   st: Re: RE: "msp-values"
Date   Thu, 29 Jan 2004 12:42:12 -0500

I guess that the first approach for getting a "snappy" graph would be to
experiment with the bands() and n() options of twoway mspline.  If you do
want to directly access the data for the mspline line,  there is a way -- 
through the serset command.  You can -serset dir-  and then look for the one
which doesn't have the same # points as your dataset.  I tried this and
found it was serset 2.  So, then you would go:

serset set 2
serset use , clear

Now you would have the datapoints that are plotted.  Since these will not
align with your original data, it's not clear what you would do with them,
but they are available....It may be better to follow Nick's advice and use
other smoothing commands in Stata.  You may also want to check out -help
serset- and look at the commands serset create_xmedians and serset
create_cspline.

Michael Blasnik
[email protected]


----- Original Message ----- 
From: "Nick Cox" <[email protected]>
To: <[email protected]>
Sent: Thursday, January 29, 2004 11:43 AM
Subject: st: RE: "msp-values"


> I don't think there is a handle to save
> the smoothed or fitted values from -twoway
> mspline-. Strictly, I think, they're just y
> medians in vertical bands; the graph code then
> does one kind of spline interpolation.
>
> In any case, although it may often
> produce reasonable-looking graphs, it's
> arguable that there are other smoothing or local
> fitting methods in Stata that are much better, or at
> least much easier to work with. -locpoly-
> is one such.
>
> Nick
> [email protected]
>
> > -----Original Message-----
> > From: [email protected]
> > [mailto:[email protected]]On Behalf Of Andreas
> > Aschbacher
> > Sent: 29 January 2004 16:05
> > To: [email protected]
> > Subject: st: "msp-values"
> >
> >
> > dear fellows !
> > I have a very snappy curve y(x):
> > x y
> > 1.3 1
> > 1.4 .845098
> > 1.5 1.041393
> > 1.6 1.342423
> > 1.7 1.20412
> > 1.8 1.518514
> > 1.9 1.579784
> > 2 1.70757
> > 2.1 1.832509
> > 2.2 1.863323
> > 2.3 2.033424
> > 2.4 2.285557
> > 2.5 2.30103
> > 2.6 2.451787
> > ...    and so on
> > -> with  > twoway mspline y x <  I get a rather plain
> > curve,I'd like to know
> > the msp-values ??? how to get ascii-sheet ??
> > any help will be appreciated very much
> > andreas
> >
> > -- 


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