Hello. Is there a way to use the estimates from the margins command with graph bar?
**I recognize that mlogit is not the appropriate method to use here, but I am using it for illustrative purposes since I am using mlogit**
Results:

You can see that the results that the results on the graph do not match the estimates from the margins.
Thank you!
Pina
**I recognize that mlogit is not the appropriate method to use here, but I am using it for illustrative purposes since I am using mlogit**
Code:
use http://www.stata-press.com/data/r13/nhanes2f, clear svyset psuid [pweight=finalwgt], strata(stratid) qui: svy, subpop(if race==1): mlogit health i.sex margins sex Adjusted predictions Number of obs = 10,335 Model VCE : Linearized 1._predict : Pr(health==poor), predict(pr outcome(1)) 2._predict : Pr(health==fair), predict(pr outcome(2)) 3._predict : Pr(health==average), predict(pr outcome(3)) 4._predict : Pr(health==good), predict(pr outcome(4)) 5._predict : Pr(health==excellent), predict(pr outcome(5)) ------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- _predict#sex | 1#Male | .0447356 .0049345 9.07 0.000 .0346717 .0547996 1#Female | .0384132 .0047268 8.13 0.000 .0287729 .0480535 2#Male | .1026698 .0058075 17.68 0.000 .0908253 .1145143 2#Female | .1278347 .0053382 23.95 0.000 .1169474 .1387219 3#Male | .2582044 .0069776 37.00 0.000 .2439734 .2724354 3#Female | .279219 .0090939 30.70 0.000 .2606719 .2977661 4#Male | .2838719 .0086906 32.66 0.000 .2661472 .3015966 4#Female | .2859271 .0077648 36.82 0.000 .2700908 .3017635 5#Male | .3105183 .0086544 35.88 0.000 .2928675 .3281691 5#Female | .2686059 .0101683 26.42 0.000 .2478676 .2893443 ------------------------------------------------------------------------------ graph bar, over(health) over(sex) asyvar percent stack /// blabel(bar, pos(center) format(%9.0f) color(white) size(vsmall))
You can see that the results that the results on the graph do not match the estimates from the margins.
Thank you!
Pina
Comment