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]

Re: st: detonator plot with three grouping variables

From   "Airey, David C" <>
To   "" <>
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.

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

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:

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