Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: st: RE: RE: graphing question - how to smooth lines connecting observations
From
Zamira S <[email protected]>
To
<[email protected]>
Subject
RE: st: RE: RE: graphing question - how to smooth lines connecting observations
Date
Wed, 14 Apr 2010 09:52:03 -0400
Thank you! You guessed it right, I do not have many observations to produce smooth connecting lines but that was client's preference and twoway mspline works for what they need.
Zamira
----------------------------------------
> Subject: st: RE: RE: graphing question - how to smooth lines connecting observations
> Date: Wed, 14 Apr 2010 12:23:04 +0100
> From: [email protected]
> To: [email protected]
>
> The reference is presumably to some feature in MS Excel.
>
> Martin has a serious point. Many on this list don't have access to other
> programs which list members refer to, or don't have detailed knowledge
> of such other programs, regardless of what individuals regard as
> standard or routine in their own institution or discipline. For example,
> many people, especially among the more active answerers of questions on
> this list, have little or no acquaintance with MS Office.
>
> I think I have seen graphs produced this way in student work. I don't
> know, and don't want to know, precisely how Excel does it. The problem
> is that _connecting_ the lines with a _smooth_ curve is almost always a
> bad idea. Unless the number of points is very small the curve will
> display spurious fluctuations as a result of overfitting.
>
> For what you want, -twoway mspline- is probably your simplest option in
> Stata. More serious smoothing can be done in many different ways.
>
> Nick
> [email protected]
>
> Martin Weiss
>
> Not all Statalisters may want to speculate on what other applications
> do,
> and your misspelling their name may further discourage answers. So the
> way
> forward for you is to spell out clearly, preferably using a dataset
> shipped
> with Stata, what you want your graph to look like/which features you
> dislike
> and want to change. Take as an example this one:
>
> *******
> sysuse auto, clear
> gen byte number=_n
> tw (connected displacement number, sort)
> *******
>
> Zamira S
>
> I am trying to generate a graph with smooth-looking lines connecting the
> observations. In excell it is an option but I am trying to avoid going
> back
> and force between excell and stata. Any suggestions would be greatly
> appreciated. Here is what I have:
>
> twoway (connected growth timeline, lcolor(black) lpattern(solid)
> lwidth(medthin) msymbol(circle) mcolor(black)), ytitle(GDP per capita
> growth) yline(0 2, lwidth(vvvthin) lcolor("192 192 192")) xtitle(Time)
> xlabel(-3(1)9) xline(-0.1 1.1 5.1, lcolor("87 87 87") lpattern(dash))
> title(GDP Per Capita Growth (%)) subtitle(Constant US$) saving(growth,
> replace)
>
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
_________________________________________________________________
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/