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 on April 23, and its replacement, is already up and running.

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

st: Correct labeling in egenmore axis()?

From   "Kaulisch, Marc" <>
To   <>
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


*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index