I'm using the command
available via ssc install and trying to follow the discussion here: Bacon decomposition | DiD (asjadnaqvi.github.io).
However, the command seems to have changed in a way that I either don't understand or is incorrect. Consider the following setup:
which gives the following graph:

Running the command
gives the following figure:

and the following table:
I (think) I understand the points themselves, but the labeling confuses me.
Code:
bacondecomp
However, the command seems to have changed in a way that I either don't understand or is incorrect. Consider the following setup:
Code:
clear
local units = 3
local start = 1
local end = 10
local time = `end' - `start' + 1
local obsv = `units' * `time'
set obs `obsv'
egen id = seq(), b(`time')
egen t = seq(), f(`start') t(`end')
sort id t
xtset id t
lab var id "Panel variable"
lab var t "Time variable"
gen D = 0
replace D = 1 if id==2 & t>=5
replace D = 1 if id==3 & t>=8
lab var D "Treated"
gen Y = 0
replace Y = D * 2 if id==2 & t>=5
replace Y = D * 4 if id==3 & t>=8
lab var Y "Outcome variable"
gsort id t
twoway ///
(connected Y t if id==1) ///
(connected Y t if id==2) ///
(connected Y t if id==3) ///
, ///
xline(4.5 7.5) ///
xlabel(1(1)10) ///
legend(pos(6) order(1 "id=1 (never treated)" 2 "id=2 (early treated)" ///
3 "id=3 (late treated)")) name(raw, replace)
Running the command
Code:
bacondecomp Y D, ddetail gropt(title("Detail") name(detail, replace) legend(pos(6)))
and the following table:
HTML Code:
+---------------------------------------------------+ Beta TotalWeight ----------------------+---------------------------- Early_v_Late 2 .1818181841 Late_v_Early 4 .1363636317 Never_v_timing 2.933333323 .6818181841 +---------------------------------------------------+
I (think) I understand the points themselves, but the labeling confuses me.
- The top left circle is the 2X2 estimate from the late treated v. early control (point estimate: 4, weight: .136)
- The bottom left triangle is the 2X2 estimate from the early treated v. late control (point estimate: 2, weight: .18)
- The top right x is the 2X2 estimate from the late treated v. never treated (point estimate: 4)
- The bottom right x is the early treated v. never treated (point estimate: 2)
- The combined weight of (3) and (4) is .68.
- Is the above interpretation correct?
- If so, the legend doesn't seem to correspond to what is shown in the figure. I.e., I would think the bottom left triangle should be a circle and the two x's should be triangles.
- What is "within" supposed to represent?

Comment