/* REGRESSION DISCONTINUITY DESIGN Uni Bicocca, 6 - 13 Maggio 2022 */ ** open DTA file ** use "C:\Users\Mara\Dropbox\DIDATTICA\Bicocca 2022\esercizio stata_imprese.dta", clear ** centered forcing variable gen forc= (punteggio -107.30) **************** graphical analysis ************************** cmogram y forc, cutright histopts(bin(180))lfit scatter cutpoint(0) cmogram y forc, cutright histopts(bin(180))lfitci scatter cutpoint(0) cmogram y forc, cutright histopts(bin(180))qfit scatter cutpoint(0) cmogram y forc, cutright histopts(bin(180))qfitci scatter cutpoint(0) cmogram y forc, cutright histopts(bin(180))lowess scatter cutpoint(0) /****************************************** Point estimates ******************************************* parametric estimation whole sample of observations balanced by the polynomial functional form: choose the right polynomial degree: Akaike Informative Criteria polynomial forcing variable Angrist 6.1.4 */ gen forc_2=forc^2 gen forc_3=forc^3 /* interaction polynomial forcing variable * treatment dummy Angrist 6.1.6 */ gen tf=treat*forc gen tf_2=treat*forc_2 gen tf_3=treat*forc_3 *different polynomial degree above and below the cutoff *** treat varying, no treat == 1 reg y treat forc, cluster (forc) *poly 1 1 reg y treat tf forc, cluster (forc) estimates store model1_1 *poly 2 1 reg y treat tf forc tf_2 , cluster (forc) estimates store model2_1 *poly 3 1 reg y treat tf forc tf_2 tf_3 , cluster (forc) estimates store model3_1 *** treat varying, no treat == 2 *poly 0 2 reg y treat forc forc_2, cluster (forc) *poly 1 2 reg y treat tf forc forc_2, cluster (forc) estimates store model1_2 *poly 2 2 reg y treat tf forc tf_2 forc_2, cluster (forc) estimates store model2_2 *poly 3 2 reg y treat tf forc tf_2 forc_2 tf_3 , cluster (forc) estimates store model3_2 *** treat varying, no treat == 3 *poly 0 3 reg y treat forc forc_2 forc_3, cluster (forc) *poly 1 3 reg y treat tf forc forc_2 forc_3, cluster (forc) estimates store model1_3 *poly 2 3 reg y treat tf forc tf_2 forc_2 forc_3, cluster (forc) estimates store model2_3 *poly 3 3 reg y treat tf forc tf_2 forc_2 tf_3 forc_3, cluster (forc) estimates store model3_3 estimates table model1_1 model2_1 model3_1 model1_2 model2_2 model3_2 model1_3 model2_3 model3_3, stats(r2 r2_a aic bic N) b(%7.3g) se(%6.3g) t(%6.3g) p(%4.3f) *poly 1 1 is the best specification according to AIC * we use this specification for the different test /* ATHEY E IMBENS 2016 restricted samples of observations within different bandwidths selection of the optimal bandwidth and polynomio */ rdrobust y forc * restrict sample and no significant coefficient /****************************************** Balancing properties ******************************************* observables in a pre treatment year (2010) (treatment year 2011) all the observables that can be tested (Black 1999, unobservables) we want no significant coefficients here: no relation between treatment and pre treatment observables treated an not treated should be similar in everything except for the treatment */ reg observable_1 treat tf forc, cluster (forc) reg observable_2 treat tf forc, cluster (forc) reg observable_3 treat tf forc, cluster (forc) /****************************************** Threshold Manipulation ******************************************* * verifying no manipulation of the forcing variable (McCrary 2008)*/ kdensity forc histogram forc, bin(10) * is the result supportive? /****************************************** Robustness and Placebo ******************************************* * robusteness checks -- sensitivity analysis * different placebo test: we want no significant coefficients! * different time period in which there was no policy * y_pre: variable constructed as same as "y" but with respect to the pretreatment year 2010*/ reg y_pre treat tf forc, cluster (forc) * is the result supportive? * different threshold that are not real discontinuity * shift of the threshold within control observations * not treated observations score between 97.30 and 107.3) are taken as treated gen punt_mock_giu= (punteggio -97.30) gen treat_mock_giu= 1 replace treat_mock_giu=0 if punt_mock_giu<=0 gen p2mock_giu=punt_mock_giu^2 gen p3mock_giu=punt_mock_giu^3 gen tmock_giu=treat_mock_giu*punt_mock_giu gen t2mock_giu=treat_mock_giu*p2mock_giu gen t3mock_giu=treat_mock_giu*p3mock_giu ** in order to provide additional stata routines here we are not allowing the policynomio to change above and below the cut off *poly 0 reg y treat_mock_giu, cluster (punt_mock_giu) estimates store model0 *poly 1 reg y treat_mock_giu tmock_giu punt_mock_giu, cluster (punt_mock_giu) estimates store model1 *poly 2 reg y treat_mock_giu tmock_giu punt_mock_giu t2mock_giu p2mock_giu, cluster (punt_mock_giu) estimates store model2 *poly 3 reg y treat_mock_giu tmock_giu punt_mock_giu t2mock_giu p2mock_giu t3mock_giu p3mock_giu, cluster (punt_mock_giu) estimates store model3 estimates table model0 model1 model2 model3, stats(r2 r2_a aic bic N) b(%7.3g) se(%6.3g) t(%6.3g) p(%4.3f) * is the result supportive? * different outcome variables (no intended outcome for the policy)*/ reg y_placebo treat tf forc, cluster (forc) * is the result supportive? /****************************************** H - ATE ******************************************* Heterogeneous effect Becker et al, 2013; Bronzini and Iachini, 2014; Accetturo et al, 2015; Crescenzi, de Blasio and Giua, 2019 */ tab nord *gen treat_nord=treat*nord tab treat_nord reg y treat tf forc nord treat_nord, cluster (forc) test treat nord treat_nord