Dear all
I would like to do a placebo test to ensure the result of my main staggered DID results. I have a country-level mandate that goes into effect in different years during my sample period, and in some countries, there was no mandate. I examine the effect of this mandate on firms' outcomes in an international sample from 2005 to 2020. Now I would like to do:
input float(magnitude treatedxmandate) into Year float(country_id firm_id policy_in_effect)
0 0 2009 15 1101 0
0 0 2014 32 2431 0
0 0 2009 45 297 0
0 0 2008 45 297 0
0 0 2010 45 297 0
0 0 2016 50 2872 0
0 0 2015 50 2872 0
0 0 2017 50 2872 0
0 0 2019 50 2872 0
0 0 2016 50 2868 0
0 0 2016 2 9 0
0 0 2017 2 9 0
0 0 2012 37 2530 0
0 0 2013 37 2530 0
0 0 2016 45 295 0
0 0 2013 3 39 0
0 0 2015 3 39 0
0 0 2017 50 3275 0
0 0 2018 45 295 0
0 0 2011 42 1875 0
0 0 2006 49 919 0
0 0 2010 42 1875 0
0 0 2019 50 3239 0
0 0 2018 50 3080 0
0 0 2018 50 3249 0
0 0 2006 49 864 0
0 0 2020 31 2490 0
0 0 2007 49 864 0
0 0 2005 50 3324 0
0 0 2016 50 3239 0
0 0 2016 50 2834 0
0 0 2017 50 3147 0
0 0 2017 23 2204 0
0 0 2012 50 2921 0
0 0 2013 50 2921 0
I would like to do a placebo test to ensure the result of my main staggered DID results. I have a country-level mandate that goes into effect in different years during my sample period, and in some countries, there was no mandate. I examine the effect of this mandate on firms' outcomes in an international sample from 2005 to 2020. Now I would like to do:
- Placebo test by creating an indicator variable randomly by sorting firms randomly and assigning the first X # of firms to treatment based on how many actual X # firms are treated that year
- after the placebo indicator is created, I would like to run it in regression using reghdfe?
input float(magnitude treatedxmandate) into Year float(country_id firm_id policy_in_effect)
0 0 2009 15 1101 0
0 0 2014 32 2431 0
0 0 2009 45 297 0
0 0 2008 45 297 0
0 0 2010 45 297 0
0 0 2016 50 2872 0
0 0 2015 50 2872 0
0 0 2017 50 2872 0
0 0 2019 50 2872 0
0 0 2016 50 2868 0
0 0 2016 2 9 0
0 0 2017 2 9 0
0 0 2012 37 2530 0
0 0 2013 37 2530 0
0 0 2016 45 295 0
0 0 2013 3 39 0
0 0 2015 3 39 0
0 0 2017 50 3275 0
0 0 2018 45 295 0
0 0 2011 42 1875 0
0 0 2006 49 919 0
0 0 2010 42 1875 0
0 0 2019 50 3239 0
0 0 2018 50 3080 0
0 0 2018 50 3249 0
0 0 2006 49 864 0
0 0 2020 31 2490 0
0 0 2007 49 864 0
0 0 2005 50 3324 0
0 0 2016 50 3239 0
0 0 2016 50 2834 0
0 0 2017 50 3147 0
0 0 2017 23 2204 0
0 0 2012 50 2921 0
0 0 2013 50 2921 0
Comment