/** SANIRef 2018 **/ clear /**** FIRST PART ***/ import excel "C:\Users\Salerno\Desktop\DATASETSANIRef_1.xlsx", sheet("DATASET") firstrow encode REGIO, gen(Regio) xtset Regio YEAR reg pcRealHExpRGS demo* DOUBLEDIP i.Regio i.YEAR, robust noconst predict Prediction, xb xtline pcRealHExpRGS Prediction estimates table, star(.05 .01 .001) /* export excel OUTPUTSANIRef_1, firstrow(variables) */ /**** SECOND PART ***/ clear import excel "C:\Users\Salerno\Desktop\OUTPUTSANIRef_1.xls", sheet("DATASET_output") firstrow drop if YEAR != 2016 graph bar FIXEDEFFrescaled, by(REGIO) graph bar PercentLastExp PercentAvExp, by(REGIO) graph bar PercentLastExp PercentAvExp if SIG == 1, by(REGIO) graph bar INEFF if SIG == 1, by(REGIO)