Closed wenddymacro closed 1 year ago
@wenddymacro What is
matrix list e(b)
?
@wenddymacro Can you copy/paste the output of
matrix list e(b)
mata rows(st_matrix("e(V)")), cols(st_matrix("e(V)"))
matrix l_vec=(0\0\0\0\1\0\0\0\0\0\0\0\0)
honestdid, l_vec(l_vec) pre(1/12) post(13/25) mvec(0 0.025)
mata `s(HonestEventStudy)'.CI
mata `s(HonestEventStudy)'.betahat
mata `s(HonestEventStudy)'.numPrePeriods
mata `s(HonestEventStudy)'.numPostPeriods
mata `s(HonestEventStudy)'.options.alpha
mata `s(HonestEventStudy)'.options.l_vec
mata `s(HonestEventStudy)'.options.Mvec
mata `s(HonestEventStudy)'.options.grid_lb
mata `s(HonestEventStudy)'.options.grid_ub
?
@wenddymacro That output looks correct to me; you ran
local plotopts xtitle(Mbar) ytitle(95% Robust CI)
honestdid, cached coefplot `plotopts'
after this and got the plot in your original comment?
the plot is ok, but why?
@wenddymacro I am a bit confused about what you mean by "why"? I haven't been able to reproduce the original issue. It's possible there were mis-aligned runs of honestdid
is the only thing that comes to mind, but can't say for sure.
In any case, it seems that re-running fixed whatever issue there was?
sorry to confusing u. i am interested in the reason on the difference between the rerun result and the original plot
@wenddymacro Right; I don't know the reason. In your original comment you said you ran
matrix l_vec=(0\0\0\0\1\0\0\0\0\0\0\0\0)
honestdid, l_vec(l_vec) pre(1/12) post(13/25) mvec(0 0.025)
local plotopts xtitle(Mbar) ytitle(95% Robust CI)
honestdid, cached coefplot `plotopts'
right? But right now as I was asking for debug info, you re-run that and got a different result. I don't know why running the same code twice would give you different results; it should always give you the same thing. Did you run the above code all at once to get the original plot?
@wenddymacro From a new Stata session, can you run
matrix l_vec=(0\0\0\0\1\0\0\0\0\0\0\0\0)
honestdid, l_vec(l_vec) pre(1/12) post(13/25) mvec(0(0.025)0.25)
local plotopts xtitle(Mbar) ytitle(95% Robust CI)
honestdid, cached coefplot `plotopts'
matrix l_vec=(0\0\0\0\1\0\0\0\0\0\0\0\0)
honestdid, l_vec(l_vec) pre(1/12) post(13/25) mvec(0 0.25)
local plotopts xtitle(Mbar) ytitle(95% Robust CI)
honestdid, cached coefplot `plotopts'
and report the output? All your plots look different, which doesn't really make sense, and while your latest note does look like a bug, it also seems unrelated to your original post.
PS: Please include the estimates from the first honestdid
command as well.
sorry to mislead u. i ran other code.
i reran the code in my original post to the right plot:
it seems that re-running fixed the issue. thanks very much
hi guys, we are interested in the effect for the fourth period after treatment. our twfe event study plot:
our code of honestdid :
`matrix l_vec=(0\0\0\0\1\0\0\0\0\0\0\0\0)
honestdid, l_vec(l_vec) pre(1/12) post(13/25) mvec(0(0.025)0.25)
local plotopts xtitle(Mbar) ytitle(95% Robust CI) honestdid, cached coefplot
plotopts'
the results:
why the original effect/CI(red line) is different from the effect in TWFE ?
any insights?
thanks in advanced.