Dear All,
I am using a difference-in-difference setup to evaluate a treatment effect. Unfortunately it is not so clear, when the treatment started. I am working on a qualitative solution by reading through relevant documents, but I also want to work on a quantitative solution. I do know that the treatment started between 18745 and 378 days later. To this end I use the following for loop:
My log reports contain the regression tables and I can see how the p value of the did variable starts to decrease after a while. Now I want to try different specifications and ideally save the p value of the did regressor in a vector where I can relate it to the step i, I am at. Later I would want to export that vector (for example to excel or csv).
Seems like not a standard-Stata-task.
I am aware that this is the kind of data-mining excercise that should not be encouraged, but at this point I am really just trying to understand my data better.
Any advice is appreciated!
Best,
I am using a difference-in-difference setup to evaluate a treatment effect. Unfortunately it is not so clear, when the treatment started. I am working on a qualitative solution by reading through relevant documents, but I also want to work on a quantitative solution. I do know that the treatment started between 18745 and 378 days later. To this end I use the following for loop:
Code:
log on forvalues i =1(3)378 { di "We are at i = " `i' gen treattime = 0 replace treattime = 1 if date >18745+ `i' gen did = treated*treattime reg ret did treated treattime, robust //reg ret did treated treattime i.bankid, cluster(bankid) drop treattime did } log off
Seems like not a standard-Stata-task.
I am aware that this is the kind of data-mining excercise that should not be encouraged, but at this point I am really just trying to understand my data better.
Any advice is appreciated!
Best,
Comment