insongkim / PanelMatch

111 stars 34 forks source link

Negative values in lead window: placebo tests #59

Open adamrauh opened 4 years ago

adamrauh commented 4 years ago

The lead argument could support negative values. For instance, if users provide lead = -2:-1, then the package could calculate the differences in outcomes between t-2 and t-1, t-3 and t-1, etc. Originally raised here

LuMesserschmidt commented 2 years ago

@adamrauh any news on this enhancement? I feel that it would make working with your package much easier as reviewers are especially interested in the pre-treatment period in contrast to the post-treatment period.

KathrynBaragwanath commented 1 year ago

Hello, I was also wondering about this. It would be great to be able to create an event plot including pre-treatment periods. I haven't been able to figure out how to do this using this package. @adamrauh

adamrauh commented 1 year ago

@LuMesserschmidt @KathrynBaragwanath Check out the placebo_test function in the se_comparison branch (which is the most up to date branch). Is this what you had in mind?

KathrynBaragwanath commented 1 year ago

Hi Adam, Thanks for your swift reply. I guess this is similar to what I had in mind but it would be great if we could get the pre-treatment periods and post-treatment periods into one plot, kind of like what CSDID have done. This makes it easy to look at the validity of the pre-trends assumption while also comparing pre-trends to post-treatment outcomes. The plot would look something like this:

[image: image.png]

On Mon, 8 May 2023 at 12:38, Adam Rauh @.***> wrote:

@LuMesserschmidt https://github.com/LuMesserschmidt @KathrynBaragwanath https://github.com/KathrynBaragwanath Check out the placebo_test function https://github.com/insongkim/PanelMatch/blob/se_comparison/R/placebo_test.R in the se_comparison branch (which is the most up to date branch). Is this what you had in mind?

— Reply to this email directly, view it on GitHub https://github.com/insongkim/PanelMatch/issues/59#issuecomment-1537656820, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7T655TIR2TBAW4A4RI53UTXFBMBJANCNFSM4NGSKMYQ . You are receiving this because you were mentioned.Message ID: @.***>

prestevez commented 1 year ago

My understanding is that the placebo_test function compares the values of t-2 to t-L with the value of t-1, so it cannot be used to test the parallel trends assumption (unless I'm mistaken?).

Hi Adam, Thanks for your swift reply. I guess this is similar to what I had in mind but it would be great if we could get the pre-treatment periods and post-treatment periods into one plot, kind of like what CSDID have done. This makes it easy to look at the validity of the pre-trends assumption while also comparing pre-trends to post-treatment outcomes. The plot would look something like this: [image: image.png]

I'm also looking forward to the enhancement proposed, whereby the PanelEstimate function accepts negative leads so that we are able to obtain estimates (and standard errors) for t-lag to t+lead.

I tried to implement something similar with a new function based on get_covariate_balance. The goal was to return non-standardised differences for the outcome variable during the pre-treatment periods, but I stumbled trying getting the correct standard error of the differences. Ideally, this could be done using the same bootstrapping procedure as in PanelEstimate, but couldn't figure out how to do it.

Happy to contribute in some way to achieve this!