Twoway Scatter

Index | Categories

make a simple two way graph

note: we will discuss this command, and making graphs in general, in detail in lab4. You do not need to memorize this command until lab4.

see help scatter

examples:

scatter x y

scatter wage_re fem [w=n], ti("Occupational Wages by Proportion Female") note("Source:CPS 2005") saving(l1, replace)

twoway (scatter wage_re fem [w=n]) (line hat fem), ti("Occupational Wages by Proportion Female") note("Source:CPS 2005") saving(l1, replace)

* twoway (scatter wage_re fem [w=n]) (lowess wage_re fem), ti("Occupational Wages by Proportion Female") note("Source:CPS 2005") saving(l1, replace)

in lab2:

scatter twoway c a, c(m) by(b) saving(graph-name, replace)

** explain the c() and by() options

in lab5:

twoway (scatter wage fem, msymbol(oh)) (lfit wage fem) (lowess wage fem,    /// bwidth(.4)),  saving(lab4c, replace)

twoway (scatter wage edyrs, msymbol(oh)) (lfit wage edyrs) (lowess wage edyrs,    /// bwidth(.4)),  saving(lab4d, replace)

twoway (scatter wage union, msymbol(oh)) (lfit wage union) (lowess wage union,    /// bwidth(.4)),  saving(lab4e, replace)

graph combine lab4c.gph lab4d.gph lab4e.gph, saving(lab4f, replace) ///

ti("descriptive analysis of occupational wages") note("source: CPS 2005")


Thursday, January 03, 2008 (12)