mcaceresb / stata-honestdid

Robust inference in difference-in-differences and event study designs (Stata version of the R package of the same name)
70 stars 18 forks source link

Issue running honestdid #10

Closed gijordan closed 1 year ago

gijordan commented 1 year ago

I am getting the following message when I try to use honestdid. Any suggestions?

honestdid, pre(1 2) post(4 5 6 7) mvec(0.5(0.5)2) ECOS failed with status: 2, Certificate of dual infeasibility found ECOS_obj(): 198 Stata returned error _honestARPLeastFavorableCV(): - function returned error _honestARPComputeCI(): - function returned error _honestRMConditionalCSFixedS(): - function returned error _honestRMConditionalCS(): - function returned error HonestSensitivityHelper(): - function returned error HonestSensitivityResults(): - function returned error HonestDiD(): - function returned error

: - function returned error r(198);
mcaceresb commented 1 year ago

@gijordan One of the internal routines failed; it's hard to know if the issue is with honestdid or with the data it was provided without the inputs. However, if you post the coefficient vector and vcov matrix I can investigate.

gijordan commented 1 year ago

@mcaceresb, thank you! I think the problem was with my data and I solved it with the omit option. I had lots of omitted regressors due to my fixed effect structure.

   matrix list e(b)

e(b)[1,39]
               6o.            7o.            8o.            9b.           10o.           11o.           12o.
       event_year     event_year     event_year     event_year     event_year     event_year     event_year
y1              0              0              0              0              0              0              0

              13o.           14o.            0b.            1o.  6o.event_y~r#  6.event_year#  7o.event_y~r#
       event_year     event_year   treat_2yin~4   treat_2yin~4   0b.treat_2~4   1.treat_2y~4   0b.treat_2~4
y1              0              0              0              0              0     -.01366437              0

     7.event_year#  8o.event_y~r#  8.event_year#  9b.event_y~r#  9b.event_y~r#  10o.event_~r#  10.event_y~r#
     1.treat_2y~4   0b.treat_2~4   1.treat_2y~4   0b.treat_2~4   1o.treat_2~4   0b.treat_2~4   1.treat_2y~4
y1     -.02011752              0     -.03619773              0              0              0      .04294516

     11o.event_~r#  11.event_y~r#  12o.event_~r#  12.event_y~r#  13o.event_~r#  13.event_y~r#  14o.event_~r#
     0b.treat_2~4   1.treat_2y~4   0b.treat_2~4   1.treat_2y~4   0b.treat_2~4   1.treat_2y~4   0b.treat_2~4
y1              0       .0598074              0      .06299697              0      .07458195              0

     14.event_y~r#                                                                                          
     1.treat_2y~4     lag_ln_mve   lag_bus_disp   lag_geo_disp    lag_for_ops   lag_rd_sales   lag_rd_mis~g
y1      .11154203      .00262427     -.06344654      .03465767      .23702005      .44840264      .10742619

     lag_ln_std~t   lag_acq_sa~s         retire          _cons
y1     -.37332431      .01680947     -.00032807     -.00196963
mcaceresb commented 1 year ago

@gijordan Good to hear; thanks!