I'm trying to substitute ylabels with mlabels, but can't get the mlabels to sort in the same way as the ylabels.
I know how to do this "manually" using
Code:
margins, saving()
A small example that replicates my problem:
Code:
ssc install coefplot
sysuse lifeexp, clear
encode country, gen(c)
keep if c<20
reg lexp i.c if c<10 //my data consist of two categories
margins c, post
est store m1
reg lexp i.c if c>9
margins c, post
est store m2
coefplot m1 m2, sort mlab(c) nooffset //ylabs are correct, mlabels incorrect (se image below)
coefplot m1 m2, sort mlab(c) nooffset ylab("") //this is my preferred outcome, but I need the mlabels to be correctArray
I would very much appreciate your help.
0 Response to Coefplot - how to get mlabels similar to sorted ylabels?
Post a Comment