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]

Re: st: detonator plot with three grouping variables


From   "Airey, David C" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: detonator plot with three grouping variables
Date   Thu, 9 May 2013 12:43:42 +0000

.

For simple dynamite plots, you can put the difference estimate and CI alongside your favorite ink smudge. I think sometimes when an investigator sees this side by side, it is an easier choice to move to the estimate + CI plots.

For more groups in a bar plot (more than 2-3 visual comparisons, or when bars need combining to make a comparison), I'd move to eclplot or stripplot or scatter+rcap and stick with the estimates and CIs for the comparisons you want to discuss. If you make a plot of the estimates of interest and CIs this also can save you printing and explaining a big ANOVA table.

clear
input group m mlb mub d dlb dub
0 25.4 17.88 32.92 . . .
1 15.1 11.24 19.05 . . .
2 . . . 10.26 3.69 16.83
end

label define group 0 "Control" 1 "Treated" 2 "Difference"
label values group group

graph twoway /// an "enhanced detonator plot"
	(bar m group, barwidth(0.5) bc(red)) ///
	(rcap mlb mub group, lc(black) mc(black)) ///
	(rcap dlb dub group, lc(black) mc(black)) ///
	(scatter d group, mc(red)), ///
	xline(1.5, lc(black) lp(dash)) ///
	ylabel(0(5)35, grid gmin gmax angle(h)) /// 
	ytitle("Endpoint of interest") ///
	xlabel(0 1 2, valuelabel) xtitle("") ///
	xscale(range(-0.5 2.5)) ///
	legend(off) ///
	name(plot3, replace)




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