Bookmark and Share

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: Twoway by option


From   Steven Archambault <[email protected]>
To   [email protected]
Subject   Re: st: RE: Twoway by option
Date   Mon, 21 Mar 2011 12:58:14 -0600

This worked exactly as I needed it to. Thanks for all replies.

-Steve


On Mar 21, 2011, at 10:30 AM, Nick Cox wrote:

> One way to do it is with the -egen- function -axis()- from -egenmore- on SSC. 
> 
> . sysuse auto
> (1978 Automobile Data)
> 
> . egen mean = mean(mpg) , by(rep78)
> 
> . egen axis = axis(mean rep78), label(rep78) reverse
> (5 missing values generated)
> 
> . scatter mpg weight , by(axis)
> 
> In your case, I think you need 
> 
> egen axis = axis(adv_avg school_name),  reverse label(school_name) 
> 
> Nick 
> [email protected] 
> 
> Steven Archambault
> 
> I have been using the below command to generate graphs for  different schools. The graphs appear in alphabetical order of school_name, where I'd rather them be in order of their adv_avg value (highest to lowest). Is there a way to do this?
> 
> twoway (connected adv  year if group=="All Students", sort) (line adv_avg year if group=="All Students", sort), ytitle(% Proficient and Above) ///
> xtitle(Years)  by(, title(All Students)) by(school_name, style(compact)) 
> 
> *
> *   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/


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


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index