Hello Community,


in the recent days I was able to read a lot of questions and helpful ansewrs in statalist.

However, I was not able to completly solve my problem, which I briefly want ot introduce in the following:

I want to replicate an event study, which shows effects of a specific event (regulation) on a business key figure "days sales outstanding" (DSO). Therefore I want to analyze yearly panel data providing the DSO of several businesses over a period of time and by detect abnormal performance between the control group and the sample group.

I want test the hypotheses by examining whether a firm affected by the treatment (regulation) had abnormal performance in terms of account receivable days.

I already managed created a sample group and a control group with the respective treatment variable by using a matching technique with the help of code snippets provided by Clyde Schechter

Now I am trying to calculate the abnormal performance between the every single time period. e.g. 2000-2001; 2000-2002, ..., 2008-2009 and perform t-tests and WSR-tests on whether the change was significant.

The abnormal performance AP(t+j) = PS(t+j) - EP(t+j)
The expected performance EP(t+j) = PS(t+i) + Avg(PCk(t+j)-PCk(t+i))

AP is the abnormal performance,
EP is the expected performance,
PS is the performance of the sample (treated) group
PC is ther performance of the control (untreated) group

t=year of regulation (2008)
i= starting year of comparison (-8,-7,...,+6)
j= ending year of comparison (-7, -6,...,+7)
k is the number of control firms


I want to create a table in the following format

Period (e.g. 2000-2001) | AP Mean | p-Value (t-test) | p-value (WSR test)


Would be awesome if some of you could spend some time to help me. I appreciate any form of comment, code, or further support. Please contact me in case you have further questions!

Thanks a lot in advance!