I was trying to study the effect from the withdraw of America from Paris agreement, which is officially announced in 2017. I have attached the data I collected from world bank, and here is the screenshot of it for the sake if you don't want to download it.
And I'm using STATA 17, I use the drop down menu and here is what I select:

And there is the code generated by STATA:
didregress (CO2) (Leave), group(TreatmentGroup CountryCode) time(Year) nointeract
And the result from STATA are as below:

And I have three questions:
1. Did I set up the data correct?
2. Did I set up the DID model correct?
3. Why countrycode is having a collinearity?
Thank you all.
And hope to hear from you soon.
Your sincerely,
Jinxiang Zhou
Year | Leave | CO2 | Treatment Group | Leave and Treatment Group 1 | Country | CountryCode |
2007 | 0 | 6797860 | 1 | 0 | US | 1 |
2008 | 0 | 6619980 | 1 | 0 | US | 1 |
2009 | 0 | 6194450 | 1 | 0 | US | 1 |
2010 | 0 | 6442580 | 1 | 0 | US | 1 |
2011 | 0 | 6214430 | 1 | 0 | US | 1 |
2012 | 0 | 5968740 | 1 | 0 | US | 1 |
2013 | 0 | 6108670 | 1 | 0 | US | 1 |
2014 | 0 | 6129040 | 1 | 0 | US | 1 |
2015 | 0 | 6003650 | 1 | 0 | US | 1 |
2016 | 0 | 5907270 | 1 | 0 | US | 1 |
2017 | 1 | 5842800 | 1 | 1 | US | 1 |
2018 | 1 | 6023620 | 1 | 1 | US | 1 |
2007 | 0 | 2456090 | 0 | 0 | Russia | 2 |
2008 | 0 | 2484910 | 0 | 0 | Russia | 2 |
2009 | 0 | 2339900 | 0 | 0 | Russia | 2 |
2010 | 0 | 2454000 | 0 | 0 | Russia | 2 |
2011 | 0 | 2546200 | 0 | 0 | Russia | 2 |
2012 | 0 | 2566170 | 0 | 0 | Russia | 2 |
2013 | 0 | 2529020 | 0 | 0 | Russia | 2 |
2014 | 0 | 2521740 | 0 | 0 | Russia | 2 |
2015 | 0 | 2475690 | 0 | 0 | Russia | 2 |
2016 | 0 | 2470100 | 0 | 0 | Russia | 2 |
2017 | 0 | 2494150 | 0 | 0 | Russia | 2 |
2018 | 0 | 2543400 | 0 | 0 | Russia | 2 |
2007 | 0 | 4247200 | 0 | 0 | EU | 3 |
2008 | 0 | 4155670 | 0 | 0 | EU | 3 |
2009 | 0 | 3881360 | 0 | 0 | EU | 3 |
2010 | 0 | 3960810 | 0 | 0 | EU | 3 |
2011 | 0 | 3849510 | 0 | 0 | EU | 3 |
2012 | 0 | 3788200 | 0 | 0 | EU | 3 |
2013 | 0 | 3711450 | 0 | 0 | EU | 3 |
2014 | 0 | 3565620 | 0 | 0 | EU | 3 |
2015 | 0 | 3621560 | 0 | 0 | EU | 3 |
2016 | 0 | 3622340 | 0 | 0 | EU | 3 |
2017 | 0 | 3635650 | 0 | 0 | EU | 3 |
2018 | 0 | 3567090 | 0 | 0 | EU | 3 |
And there is the code generated by STATA:
didregress (CO2) (Leave), group(TreatmentGroup CountryCode) time(Year) nointeract
And the result from STATA are as below:
And I have three questions:
1. Did I set up the data correct?
2. Did I set up the DID model correct?
3. Why countrycode is having a collinearity?
Thank you all.
And hope to hear from you soon.
Your sincerely,
Jinxiang Zhou