lsun20 / EventStudyInteract

MIT License
34 stars 12 forks source link

Joint F test of the pretrend #5

Closed daisukeadachi closed 2 years ago

daisukeadachi commented 2 years ago

Hello,

I hope all is well. Thanks for the program; I have been enjoying using it so much. I am writing to ask a question about the joint F-testing of the pretrend. I am not an econometrician but an applied person, so perhaps I am asking an off-the-point question. So please correct me if I am wrong.

I am interested in performing a joint F-test of pretrends in the sense of testing if all of the coefficients on pre-event variables are jointly zero. Currently, it looks that stata postestimation commands are not allowed after eventstudyinteract. Specifically, when I run test (g_5=0) (g_4=0) (g_3=0) (g_2=0) after eventstudyinteract of 5 lead terms, it returns an error saying g_5 not found. Can we do this kind of test now? If not, are you planning to develop a program for performing this test?

I am not sure if this is a standard approach in the literature. So if you know a better way or best practice for detecting the pretrend formally, that would be also much appreciated.

Best regards, Daisuke Adachi

lsun20 commented 2 years ago

Hi Daisuke,

Thanks a lot for your interest in our package! Since test looks for coefficients and variance covariance matrix stored in e(b) and e(V), but our package returns the estimates in different matrices, I think a workaround is the following:

 matrix b = e(b_iw)
 matrix V = e(V_iw)
 ereturn post b V
 test (g_5=0) (g_4=0) (g_3=0) (g_2=0)

Hope the above helps, Liyang

daisukeadachi commented 2 years ago

This is great; thanks so much! But do you think my approach is standard in the event-study literature? Or can you come up with an alternative approach for formally detecting the existence of the pretrend?

lsun20 commented 2 years ago

Glad to know the code runs! Evaluating the joint significance of the pre-treatment coefficients is still a standard practice. Recent literature has discussed that such test may have lower power at detecting pre-trends, so you can check the power of your test if that is a concern (and the linked paper provide software to do so).

daisukeadachi commented 2 years ago

Perfect, this makes sense. Thanks so much for helping me :)