Dear all
I am running a staggered DID regression for my study and would like to run a stacked regression as a robustness check for my original result. However, I am not sure how to carry out stacked regression in Stata. Reading the Stata code and other comments from this forum, I have created cohort fixed effects as follows:
egen firmxccohortFE= group( firm_id treated Year)
egen indyearxccohortFE= group( indyear treated Year)
Two concerns that I have:
1- I am unsure if I correctly created the cohort fixed effects
2-How can I run the stacked regression for my staggered DID model?
Here is an example of my data:
input float(magnitude treatedxmandate log_assets indyear firm_id firmxccohortFE indyearxccohortFE)
0 0 13.5533 324 1101 7777 593
0 0 14.067616 40 2431 16460 70
0 0 14.14755 372 297 1775 688
0 0 14.223843 371 297 1774 686
0 0 14.256618 373 297 1776 690
0 0 15.242467 151 2872 19476 273
0 0 15.244625 150 2872 19475 271
0 0 15.34352 152 2872 19477 275
0 0 15.44925 154 2872 19479 279
0 0 15.945015 411 2868 19426 766
0 0 16.184666 106 9 59 199
0 0 16.382593 107 9 60 201
0 0 18.031202 70 2530 17174 127
0 0 18.098658 71 2530 17175 129
0 0 18.865442 427 295 1764 798
0 0 19.320164 328 39 244 601
0 0 19.39407 330 39 246 605
0 0 19.43889 75 3275 22938 137
0 0 19.87062 429 295 1766 802
0 0 20.00764 486 1875 13722 901
0 0 20.136 64 919 6524 115
0 0 20.16931 485 1875 13721 899
0 0 20.225174 77 3239 22652 141
0 0 20.22693 397 3080 21261 738
Thanks in advance for your valuable input.
I am running a staggered DID regression for my study and would like to run a stacked regression as a robustness check for my original result. However, I am not sure how to carry out stacked regression in Stata. Reading the Stata code and other comments from this forum, I have created cohort fixed effects as follows:
egen firmxccohortFE= group( firm_id treated Year)
egen indyearxccohortFE= group( indyear treated Year)
Two concerns that I have:
1- I am unsure if I correctly created the cohort fixed effects
2-How can I run the stacked regression for my staggered DID model?
Here is an example of my data:
input float(magnitude treatedxmandate log_assets indyear firm_id firmxccohortFE indyearxccohortFE)
0 0 13.5533 324 1101 7777 593
0 0 14.067616 40 2431 16460 70
0 0 14.14755 372 297 1775 688
0 0 14.223843 371 297 1774 686
0 0 14.256618 373 297 1776 690
0 0 15.242467 151 2872 19476 273
0 0 15.244625 150 2872 19475 271
0 0 15.34352 152 2872 19477 275
0 0 15.44925 154 2872 19479 279
0 0 15.945015 411 2868 19426 766
0 0 16.184666 106 9 59 199
0 0 16.382593 107 9 60 201
0 0 18.031202 70 2530 17174 127
0 0 18.098658 71 2530 17175 129
0 0 18.865442 427 295 1764 798
0 0 19.320164 328 39 244 601
0 0 19.39407 330 39 246 605
0 0 19.43889 75 3275 22938 137
0 0 19.87062 429 295 1766 802
0 0 20.00764 486 1875 13722 901
0 0 20.136 64 919 6524 115
0 0 20.16931 485 1875 13721 899
0 0 20.225174 77 3239 22652 141
0 0 20.22693 397 3080 21261 738
Thanks in advance for your valuable input.