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

Re: st: A special graph in Stata


From   Nick Winter <nw53@cornell.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: A special graph in Stata
Date   Wed, 06 Apr 2005 08:28:39 -0400

My program (on SSC) -catgraph- does this, but uses Stata 7 graphics.

In general you can do this yourself with something like this:

. sysuse auto
. collapse mpg , by(rep78)
. graph twoway line mpg rep78

Or for separately for domestic and foreign:

. sysuse auto
. collapse mpg , by(rep78 foreign)
. graph twoway (line mpg rep78 if foreign) (line mpg rep78 if !foreign) , legend( order(1 "Foreign" 2 "Domestic") )

--Nick Winter



At 09:46 PM 4/5/2005 +0100, you wrote:

Dear all,

I would like to ask you whether I can make a graph of a means of one
variable ( y axis) per the  bins of another varible ( x axis).

Kind Regards,

Vangelis
*
*   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/
--------------------------------------------------------
Nicholas Winter                           607.255.8819 t
Assistant Professor                       607.255.4530 f
Department of Government              nw53@cornell.edu e
308 White Hall            falcon.arts.cornell.edu/nw53 w
Cornell University
Ithaca, NY 14853-4601


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