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
[email protected]
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/