Help!
I am applying a DID in multiple treatment groups and multiple time periods. I examine the before-after effect of certain policy changes (liberalization and prohibition) on sexual crime in treatment countries compared to controls. I look at 2 subsamples – one consists of the countries that liberalized and the controls; the other one includes the countries that implemented a ban and the controls.
There are 8 liberalizing and 18 control countries in the 1st subsample (6 prohibiting and 18 controls in the 2nd subsample). For the sake of simplicity, I’ll focus on the “liberalizing” sample. The key independent variable “Liberalization” is an indicator variable, which takes the value of one beginning in the year when a country liberalizes its policy, and zero otherwise. The dependent variable, “Rape Rate” measures the number of rape cases per 100,000 population recorded at the national level. Country and years fixed effects are included and standard errors are clustered by country. The baseline regression is:
Code:
reg rape_rate policy_liberalization controls i.year i.country, robust cluster (country)
I checked Prof. Cameron’s website (Colin Cameron Papers (ucdavis.edu)) and I tried to go through the publications on cluster-robust inference. Theoretically, I understand that default standard errors can overestimate estimator precision and that failure to control for within-cluster error correlation can lead to misleadingly small SEs, narrow confidence intervals, large t-statistics and low p-values. However, in practice I have no idea how to address the referee’s concern. Please, help with the code!
Here is a simple data example:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long country int year double raperate_2 byte prostitution_liberalization double(ln_population unemploymentrate) 5 2009 0 0 13.588521957397461 5.417 5 2010 3.3 0 13.616010665893555 6.292 5 2011 3.4 0 13.640860557556152 7.908 5 2012 2.2 0 13.667023658752441 11.883 5 2013 1.6 0 13.671499252319336 15.917 5 2014 1.2 0 13.662359237670898 16.17 5 2015 1.7 0 13.649465560913086 14.9 5 2016 2.59 0 13.651012420654297 12.7 5 2017 2.3399999141693115 0 13.658625602722168 10.4 6 1990 8.6 0 16.15366554260254 2.3 6 1991 7.4 0 16.148101806640625 2.3 6 1992 6.9 0 16.14887237548828 3.3 6 1993 7.4 0 16.150146484375 4.3 6 1994 7.1 0 16.150951385498047 4.3 6 1995 7.03 0 16.150869369506836 4 6 1996 6.57 0 16.14972496032715 3.9 6 1997 6.36 0 16.148540496826172 4.8 6 1998 6.553398058252427 0 16.14756965637207 6.479 6 1999 6.155339805825243 0 16.14664649963379 8.756 6 2000 4.8543689320388355 0 16.145524978637695 8.824 6 2001 5.496870109546166 0 16.141033172607422 8.166 6 2002 6.401333202627194 0 16.13801383972168 7.313 6 2003 6.333751237 0 16.137176513671875 7.812 6 2004 6.734194859 0 16.137441635131836 8.321 6 2005 5.831338513 0 16.137786865234375 7.927 6 2006 5.166298267 0 16.140207290649414 7.148 6 2007 6.176355805 0 16.14320182800293 5.32 6 2008 5.097636113 0 16.1518611907959 4.392 6 2009 4.597817856 0 16.159791946411133 6.662 6 2010 5.3 0 16.16326904296875 7.279 6 2011 6.09 0 16.165620803833008 6.711 6 2012 6.06 0 16.167404174804687 6.978 6 2013 5.67 0 16.168420791625977 6.953 6 2014 6.43 0 16.168067932128906 6.1 6 2015 5.56 0 16.17052459716797 5 6 2016 6.15 0 16.1716365814209 3.5 6 2017 5.650000095367432 0 16.174476623535156 2.4 7 1990 9.5 0 15.451669692993164 7.167 7 1991 10.3 0 15.453821182250977 7.867 7 1992 10.8 0 15.45685863494873 8.608 7 1993 9.6 0 15.460433959960938 9.533 7 1994 9.2 0 15.463522911071777 7.733 7 1995 8.42 0 15.46718692779541 6.758 7 1996 7.37 0 15.473934173583984 6.317 7 1997 8.23 0 15.478511810302734 5.242 7 1998 7.885304659498208 0 15.482247352600098 4.883 7 1999 8.967851099830796 1 15.4857759475708 5.108 7 2000 9.31409295352324 1 15.488865852355957 4.317 7 2001 9.199477514461654 1 15.492460250854492 4.508 7 2002 9.304056568663938 1 15.496031761169434 4.642 7 2003 8.76592329 1 15.49885082244873 5.433 end label values country country label def country 5 "Cyprus", modify label def country 6 "CzechRepublic", modify label def country 7 "Denmark", modify
0 Response to Cluster-robust standard errors - a small number of clusters?
Post a Comment