# propensity score matching with difference-in-differences for panel data

Research design utilizes companies that switched auditors (TREATMENT) and propensity score matched (PSM) companies that did not change their auditor (CONTROL). To obtain the propensity score for each company, I want to use a Probit model where the dependent variable, AUDITOR_SWITCH_PSM, is an indicator variable defined as 1 for the switch company in a given year, and 0 otherwise:

$$AUDITOR-SWITCH-PSM(1\;or\;0)_i= \delta_0 + \delta_1GCO -PSM_i + \delta_2RESTATEMENT -PSM_i + \delta_3BIG 4- PSM_i+ \delta_4LNASSET- PSM_i + \delta_5LEVERAGE -PSM_i + \delta_6LOSS -PSM_i + e_i$$

Then, I want to utilize a difference-in-differences (DID) research design that compares differences in loan spreads between the treatment (switch) companies and control (non-switch) companies before and after the auditor change so, using the above matched sample of treatment and control companies, the main model takes the following form:

$$LNSPREAD_{ijt} =\beta_0 + \beta_1TREATMENT_j + \beta_2POST-SWITCH_{it} + \beta_3TREATMENT_j * POST-SWITCH_{it} + \beta_4X_{ijt}+ e_{ijt}$$

I read this post and this one but I couldn't understand how to do PSM with DID for panel data.

Could you please let me know how to do it in Stata? It should be noted that my data set is in balanced panel data format with id represents companies and time shows years.

• What problem are you trying to solve by doing both PSM and DD? – Dimitriy V. Masterov Sep 4 '18 at 21:36
• Also, please clarify what is confusing about the second linked DiD with weights approach. – Dimitriy V. Masterov Sep 4 '18 at 22:39
• @DimitriyV.Masterov Thanks a lot. Really, it is based on this article: aaapubs.org/doi/abs/10.2308/accr-51553?code=aaan-site – ebrahimi Sep 5 '18 at 2:13
• Unfortunately I don't have access to that journal and there are no ungated working paper versions. Can you state what is the econometric issue that requires BOTH PSM and DiD to remedy? From the abstract, it sounds they are "using propensity-score matching and difference-in-differences research designs," rather than a PSM-DiD hybrid. Designs is plural there, rather than singular. – Dimitriy V. Masterov Sep 5 '18 at 3:30
• Masterov, I should be able to help with the implementation of the specified model using STATA. I think you solved it already? – Kingsley Feb 23 at 15:38

I know nothing of the institutional setting and don't recall seeing something like this done in any papers, so take this with a grain of salt. I will edit this once you clarify what you hope to accomplish by doing PSM and DiD simultaneously. Until then, epistemic status is very speculative. It can be done, but it is not clear whether it will fix anything.

I think the most straightforward way would be to:

1. Estimate the propensity score model and predict the probability of switching auditors. It might make sense to reshape your data into a cross section from the typical panel format, so that you are matching on multiple periods' Xs. That is what I do in the second link in your post.
2. Group the firms into deciles based on the scores. For examples, firms with PSM in [0,.1) might go in the lowest decile, and those with [.9,1] would be assigned to the highest decile. Maybe try a coarser binning scheme if you don't have enough data. Make sure you have both treated and untreated observations in each bin (check common support).
3. Define a PSM decile variables that is 1 (lowest decile) to 10 (highest decile).
4. Do a 10 treatment groups version of DiD. This is sort of like interval matching or "stratification", where you do DiD in each interval.
• Sorry, an implementation similar to your answer is provided here. Could you please let me know what difference is between pscore and psmatch2? Thanks. – ebrahimi Sep 17 '18 at 16:56
• They are both user-written commands that do PSM. I am not really familiar with pscore. – Dimitriy V. Masterov Sep 17 '18 at 17:06
• Hi. If I reshape my data into wide format, I would encounter the issues discussed (here)[statalist.org/forums/forum/general-stata-discussion/general/… Therefore, I decided to implement a year-by-year PSM as suggested here – ebrahimi Nov 9 '18 at 20:31
• However, since the exact structure of dataset is not provided, I couldn’t understand how the related codes work. For example, what is “matched” or “treatment”? Thanks a lot. – ebrahimi Nov 9 '18 at 20:31
• Why is propensity analysis needed here? – Frank Harrell Jan 3 '19 at 13:56