Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: AW: Graph


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: AW: Graph
Date   Tue, 2 Mar 2010 13:19:09 -0000

Another way to do it 

sysuse nlsw88, clear
drop if age==46
table  age married , c(mean wage)
egen mean = mean(wage), by(age married)
egen tag = tag(age married) 
twoway (line mean age if tag & married, sort) (line mean age if tag &
!married, sort)

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

Martin Weiss

sysuse nlsw88, clear
drop if age==46
table  age married , c(mean wage)
collapse (mean) wage, by(age married)
twoway (line wage age if married, sort) (line wage age if !married,
sort)

ingeborg.f.solli@uis.no

I'm sure there is an easy way to do this, but I can't find it. I hope 
somebody can help me: 

>From a large dataset I have generated a twoway table of mean income by 
gender and age: 
table gender age, c(mean income). 

What is the simple (?) command that creates a graph that corresponds to 
this table, i.e. with two lines (one for each gender) showing trends in 
income over age. 

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