Hi!
I'm using the "fuzzydid" command and save results:
matrix b = J(1, 13, .)
matrix v = J(1, 13, .)
forvalues t = -6/6 {
drop D_t
gen D_t = (K == `t')
fuzzydid Y D_t Gf month_complaint_date department_num, did breps(10) cluster(department_num)
matrix b_LATE = e(b_LATE)
matrix list b_LATE
matrix se_LATE = e(se_LATE)
matrix list se_LATE
matrix ci_LATE = e(ci_LATE)
local idx = `t' + 7
replace fuzzydid_b = b_LATE[1,1] in `idx'
replace fuzzydid_v = se_LATE[1,1]^2 in `idx'
replace time = `t' in `idx'
matrix b[1, `idx'] = b_LATE[1,1]
matrix v[1, `idx'] = se_LATE[1,1]^2
}
I wanted to plot the results using "event_plot" command along with the other event studies:
event_plot bjs sa_b#sa_v, ///
stub_lag(tau# L#event) stub_lead(pre# F#event) plottype(scatter) ciplottype(rcap) ///
together perturb(-0.325(0.13)0.325) trimlead(3) trimlag(3)
I'm using the "fuzzydid" command and save results:
matrix b = J(1, 13, .)
matrix v = J(1, 13, .)
forvalues t = -6/6 {
drop D_t
gen D_t = (K == `t')
fuzzydid Y D_t Gf month_complaint_date department_num, did breps(10) cluster(department_num)
matrix b_LATE = e(b_LATE)
matrix list b_LATE
matrix se_LATE = e(se_LATE)
matrix list se_LATE
matrix ci_LATE = e(ci_LATE)
local idx = `t' + 7
replace fuzzydid_b = b_LATE[1,1] in `idx'
replace fuzzydid_v = se_LATE[1,1]^2 in `idx'
replace time = `t' in `idx'
matrix b[1, `idx'] = b_LATE[1,1]
matrix v[1, `idx'] = se_LATE[1,1]^2
}
I wanted to plot the results using "event_plot" command along with the other event studies:
event_plot bjs sa_b#sa_v, ///
stub_lag(tau# L#event) stub_lead(pre# F#event) plottype(scatter) ciplottype(rcap) ///
together perturb(-0.325(0.13)0.325) trimlead(3) trimlag(3)