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: bar graphs of margins and lincom output


From   "Hussein, Mustafa (Mustafa Hussien)" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: bar graphs of margins and lincom output
Date   Mon, 4 Nov 2013 02:53:48 +0000

Dear Statalisters,

I am estimating predictive margins after a number of multivariable models, and then using lincom to calculate differences across adjusted predictions. I would like to produce bar graphs of the margins output as well as of the differences estimated using lincom. It would also be great to have confidence intervals and significance stars displayed on the bars as well (I currently make these graphs using Excel but it is quite labor-intensive and not readily of publication-quality). A sample of my margins code is below.

Any advice is greatly appreciated.

Thanks,
Mustafa     

margins, subpop(blktxpost) at (black=(0 1) txgroup=(1 0) post=(1 0)) vce(unconditional) post
	lincom _b[1bn._at]-_b[2._at] //Wh-Bl Tx Post
	lincom _b[3._at]-_b[4._at] // Wh-Bl Tx Pre
	lincom (_b[1bn._at]-_b[2._at])-(_b[3._at]-_b[4._at]) //Wh-Blk Tx Pre-Post
	lincom _b[5._at]-_b[6._at] //Wh-Bl Ctrl Post
	lincom _b[7._at]-_b[8._at] //Wh-Bl Ctrl Pre
	lincom (_b[5._at]-_b[6._at])-(_b[7._at]-_b[8._at]) //Wh-Bl Ctrl Pre-Post
	lincom ((_b[1bn._at]-_b[2._at])-(_b[3._at]-_b[4._at]))-((_b[5._at]-_b[6._at])-(_b[7._at]-_b[8._at])) //Wh-Blk Post-Pre Tx-Ctrl, DDD

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index