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]

st: Correct labeling in egenmore axis()?


From   "Kaulisch, Marc" <[email protected]>
To   <[email protected]>
Subject   st: Correct labeling in egenmore axis()?
Date   Tue, 11 May 2010 16:04:46 +0200

Follow up on my earlier graphing issue.

It looks like if the label-option in egenmore (ssc) axis() is not doing
what it supposed to do or am I overlooking something again?

-----
sysuse bpwide, clear
tempfile tf1 tf2
statsby mean1=r(mean) ub1=r(ub) lb1=r(lb) N1=r(N), by(agegrp sex)
saving(`tf1'): ci bp_before
statsby mean2=r(mean) ub2=r(ub) lb2=r(lb) N2=r(N), by(agegrp sex)
saving(`tf2'): ci bp_after
dsconcat `tf1' `tf2'
sort agegrp sex mean1
egen axis = axis(mean1 agegrp sex), label(agegrp sex)
replace axis = axis[_n-1] if axis == .
egen group = group(agegrp sex), label
----

Here I get as labels in axis correctly labelled cases and incorrect
labelled cases whereas group() does the labelling correctly.

Correct labels are 30-45 Male
Incorrect labels are 46-59 or Male


Marc

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