Hello All,
I am currently working on a Difference in Differences estimation in Stata trying to evaluate the effects of whether a company has introduced an ESG compensation policy on its ESG scores. My pre-Period is 2014 whereas my post-Period is 2017.
However, when allocating my variables to the xtdidreg command in Stata, my treatment variable is dropped due to multicollinearity. Since I am evaluating firms within the same regulatory environment (EU) it is my understanding that I must group by CompanyCode. In addition, using solely the policy variable does not take into account the effect of the switch from no ESG policy to ESG policy. Could you please advise me on what to do differently to achieve the correct results? Please find a streamlined dataset below.
The same error occurs when dropping all years except 2014 & 2017 and repeating this step.
How can I go about this? Do I have to define the command differently?
Thank You!
I am currently working on a Difference in Differences estimation in Stata trying to evaluate the effects of whether a company has introduced an ESG compensation policy on its ESG scores. My pre-Period is 2014 whereas my post-Period is 2017.
However, when allocating my variables to the xtdidreg command in Stata, my treatment variable is dropped due to multicollinearity. Since I am evaluating firms within the same regulatory environment (EU) it is my understanding that I must group by CompanyCode. In addition, using solely the policy variable does not take into account the effect of the switch from no ESG policy to ESG policy. Could you please advise me on what to do differently to achieve the correct results? Please find a streamlined dataset below.
- Treatment indicates whether the company switched from having no ESG compensation policy in place in 2014 to having one in place in 2017 (since I want to evaluate the effect of ESG compensation policy)
- PolicyExecComp indicates whether the company had an ESG Policy in place in the respective year
- lagESGCombScore is a the lagged ESG Score of the company with a three year lag
The same error occurs when dropping all years except 2014 & 2017 and repeating this step.
How can I go about this? Do I have to define the command differently?
Thank You!
Code:
* Example generated by -dataex-. For more info, type help dataex clear input byte Treatment int Year byte PolicyExecComp double ESGCombScore long(IndustryCode CountryCode CompanyCode) float ESGCombScore_3 1 2011 0 62.4069688830333 11 11 1 . 1 2012 0 62.4624719587995 11 11 1 . 1 2013 0 58.8133079593121 11 11 1 . 1 2014 0 61.0820738919903 11 11 1 62.40697 1 2015 0 59.4591000375171 11 11 1 62.46247 1 2016 1 64.5068378496325 11 11 1 58.81331 1 2017 1 49.3056392381697 11 11 1 61.08207 1 2018 1 66.6140940568271 11 11 1 59.4591 1 2019 1 81.1935801160082 11 11 1 64.506836 1 2020 1 81.0892750841588 11 11 1 49.30564 1 2021 1 73.4989516532658 11 11 1 66.6141 0 2011 0 70.1402465343189 7 16 2 . 0 2012 0 62.8208085276402 7 16 2 . 0 2013 0 57.6855912093235 7 16 2 . 0 2014 0 59.2745283973688 7 16 2 70.14024 0 2015 0 63.3290756280179 7 16 2 62.82081 0 2016 0 61.7310754497407 7 16 2 57.68559 0 2017 0 64.2386700510711 7 16 2 59.27453 0 2018 0 65.2676083610478 7 16 2 63.32907 0 2019 0 54.1960015752981 7 16 2 61.73108 0 2020 0 72.5699467669375 7 16 2 64.23867 0 2021 0 40.8971010886951 7 16 2 65.26761 1 2011 0 46.3010097021913 7 4 3 . 1 2012 0 59.8150445415166 7 4 3 . 1 2013 0 57.0835308975815 7 4 3 . 1 2014 0 51.9532918031357 7 4 3 46.30101 1 2015 1 61.1024724485255 7 4 3 59.81504 1 2016 1 42.5611589123796 7 4 3 57.08353 1 2017 1 52.3030340597252 7 4 3 51.95329 1 2018 1 61.8586213790156 7 4 3 61.10247 1 2019 1 65.4734576674699 7 4 3 42.56116 1 2020 1 62.5186516326226 7 4 3 52.30304 1 2021 1 40.9724077254589 7 4 3 61.85862 1 2011 . . 2 18 4 . 1 2012 . . 2 18 4 . 1 2013 . . 2 18 4 . 1 2014 0 41.6011043070205 2 18 4 . 1 2015 0 41.8361246710851 2 18 4 . 1 2016 1 62.6825742371833 2 18 4 . 1 2017 1 59.790808972616 2 18 4 41.6011 1 2018 1 65.6169217356717 2 18 4 41.83612 1 2019 1 58.5403600766528 2 18 4 62.68258 1 2020 1 58.1144139223606 2 18 4 59.79081 1 2021 1 58.5433217311863 2 18 4 65.61692 1 2011 0 7.45967610225398 7 13 5 . 1 2012 0 11.2140028642259 7 13 5 . 1 2013 0 11.7925981497021 7 13 5 . 1 2014 0 12.3565613544798 7 13 5 7.459676 1 2015 1 17.9640026372714 7 13 5 11.214003 1 2016 1 25.6089058025622 7 13 5 11.792598 1 2017 1 54.1041825601216 7 13 5 12.356562 1 2018 1 57.7621538427733 7 13 5 17.964003 1 2019 1 61.1655869373887 7 13 5 25.608906 1 2020 1 64.0732918961297 7 13 5 54.10418 1 2021 1 65.5291287575527 7 13 5 57.76215 0 2011 0 65.6099150134999 7 16 6 . 0 2012 0 66.4399442931081 7 16 6 . 0 2013 0 63.2276797880626 7 16 6 . 0 2014 0 67.7732057853802 7 16 6 65.60992 0 2015 0 70.8926962288317 7 16 6 66.43994 0 2016 0 72.6582504622014 7 16 6 63.22768 0 2017 0 43.8106361047462 7 16 6 67.77321 0 2018 0 43.4283965923999 7 16 6 70.89269 0 2019 0 73.2896868159528 7 16 6 72.65825 0 2020 0 62.4351071424651 7 16 6 43.81063 0 2021 0 40.0375784760175 7 16 6 43.4284 1 2011 0 85.0268621850775 11 16 7 . 1 2012 0 78.9426888141935 11 16 7 . 1 2013 0 77.4236926863074 11 16 7 . 1 2014 0 78.6814914246383 11 16 7 85.02686 1 2015 0 77.9375918659868 11 16 7 78.94269 1 2016 0 82.9990343544691 11 16 7 77.42369 1 2017 1 84.0683317621177 11 16 7 78.68149 1 2018 1 90.2028291012146 11 16 7 77.93759 1 2019 1 88.5571342074301 11 16 7 82.99903 1 2020 1 88.8228645605731 11 16 7 84.06833 1 2021 1 71.7245148231948 11 16 7 90.20283 0 2011 0 32.7415847765759 9 16 8 . 0 2012 0 44.2532698323536 9 16 8 . 0 2013 0 50.8319347542704 9 16 8 . 0 2014 0 43.8587779103804 9 16 8 32.741585 0 2015 0 37.5646581668 9 16 8 44.25327 0 2016 0 39.5202520977194 9 16 8 50.83194 0 2017 0 52.011131622474 9 16 8 43.85878 0 2018 0 55.3660961328048 9 16 8 37.56466 0 2019 0 64.3802455808724 9 16 8 39.52025 0 2020 0 64.8205654415014 9 16 8 52.01113 0 2021 0 72.8088852828311 9 16 8 55.3661 0 2011 0 17.3903271947076 7 2 9 . 0 2012 0 21.1788501610354 7 2 9 . 0 2013 0 15.603551345345 7 2 9 . 0 2014 0 27.4208538785646 7 2 9 17.390327 0 2015 0 30.9917279103325 7 2 9 21.17885 0 2016 0 38.225405750625 7 2 9 15.60355 0 2017 0 40.4168935663484 7 2 9 27.420855 0 2018 0 38.3637274393934 7 2 9 30.99173 0 2019 0 43.5223852622498 7 2 9 38.22541 0 2020 0 37.2227158988141 7 2 9 40.41689 0 2021 1 38.9589151189798 7 2 9 38.36373 0 2011 0 47.2978240148119 5 18 10 . end label values IndustryCode IndustryCode label def IndustryCode 2 "Consumer Discretionary", modify label def IndustryCode 5 "Financials", modify label def IndustryCode 7 "Industrials", modify label def IndustryCode 9 "Materials", modify label def IndustryCode 11 "Utilities", modify label values CountryCode CountryCode label def CountryCode 2 "Belgium", modify label def CountryCode 4 "Denmark", modify label def CountryCode 11 "Italy", modify label def CountryCode 13 "Netherlands", modify label def CountryCode 16 "Spain", modify label def CountryCode 18 "United Kingdom", modify label values CompanyCode CompanyCode label def CompanyCode 1 "A2A SpA", modify label def CompanyCode 2 "ACS Actividades de Construccion y Servicios SA", modify label def CompanyCode 3 "AP Moeller - Maersk A/S", modify label def CompanyCode 4 "ASOS PLC", modify label def CompanyCode 5 "Aalberts NV", modify label def CompanyCode 6 "Abengoa SA", modify label def CompanyCode 7 "Acciona SA", modify label def CompanyCode 8 "Acerinox SA", modify label def CompanyCode 9 "Ackermans & Van Haaren NV", modify label def CompanyCode 10 "Admiral Group PLC", modify
Comment