Statalist The Stata Listserver


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

st: RE: graphing time series data - can i graph only one point in the distribution?


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: graphing time series data - can i graph only one point in the distribution?
Date   Wed, 23 Aug 2006 18:10:36 +0100

I don't know what the precise question is here as I am not clear 
how you determine the median state (just one?) given rates for state X 
year X age X race X sex. But in Stata terms cutting the dataset
down to the minimum required for the graph can often repay 
dividends in terms of speed, graph size and logic issues. (Sometimes 
even given an -if- condition Stata looks at the rest of the data 
to determine various graph properties.) 

See for example 

SJ-5-2  gr0013  . . . . . . . . . Stata tip 19: A way to leaner, faster graphs
        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P. Royston
        Q2/05   SJ 5(2):279                                      (no commands)
        tip for using preserve and drop to clean data before
        graphing

(also in "33 Stata Tips") 

Nick 
n.j.cox@durham.ac.uk 

Scott Cunningham
 
> I have data on gonorrhea rates from 1983-2000 by age cohort (5-year  
> brackets), state, race and sex.  I want to graph the trend of the  
> median state over all those years using twoway tsline.  I am having  
> trouble seeing if that is possible.  Should I pull the median state  
> out manually, drop the others, and just graph it that way?  Or is  
> there an easier way?

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