*------------------------------------------* * Measuring light deflator *------------------------------------------* clear clear matrix set more off cd E:\Cambodia\Informality\data_program insheet using light_deflator_dataset.csv, clear *Data cleaning replace light=. if light==0 replace gdpr_us_2005="" if gdpr_us_2005=="NA" replace stat_cap="" if stat_cap=="NA" destring gdpr_us_2005 stat_cap, replace gen lgt = ln(light) gen lgdp = ln(gdpr_us_2005) *OECD members gen oecd=0 replace oecd=1 if cty=="Australia" replace oecd=1 if cty=="Austria" replace oecd=1 if cty=="Belgium" replace oecd=1 if cty=="Canada" replace oecd=1 if cty=="Chile" replace oecd=1 if cty=="Czech Republic" replace oecd=1 if cty=="Denmark" replace oecd=1 if cty=="Estonia" replace oecd=1 if cty=="Finland" replace oecd=1 if cty=="France" replace oecd=1 if cty=="Germany" replace oecd=1 if cty=="Greece" replace oecd=1 if cty=="Hungary" replace oecd=1 if cty=="Iceland" replace oecd=1 if cty=="Ireland" replace oecd=1 if cty=="Israel" replace oecd=1 if cty=="Italy" replace oecd=1 if cty=="Japan" replace oecd=1 if cty=="Korea, Dem. Rep." replace oecd=1 if cty=="Luxembourg" replace oecd=1 if cty=="Mexico" replace oecd=1 if cty=="Netherlands" replace oecd=1 if cty=="New Zealand" replace oecd=1 if cty=="Norway" replace oecd=1 if cty=="Poland" replace oecd=1 if cty=="Portugal" replace oecd=1 if cty=="Slovak Republic" replace oecd=1 if cty=="Slovenia" replace oecd=1 if cty=="Spain" replace oecd=1 if cty=="Sweden" replace oecd=1 if cty=="Switzerland" replace oecd=1 if cty=="Turkey" replace oecd=1 if cty=="United Kingdom" replace oecd=1 if cty=="United States" *Statistical capacity: keep only high replace stat_cap = 100 if oecd==1 egen stat = mean(stat_cap), by(cty) gen up80 = 0 replace up80=1 if stat!=. & stat>=80 *countries close to northern Pole to exclude auroral effects gen north = 0 replace north = 1 if cty=="Estonia"|cty=="Iceland"|cty=="Norway"|cty=="Finland"|cty=="Sweden"|cty=="Canada"|cty=="Russia" *Summary statistics qui xi: reg lgt lgdp i.year if oecd==1 | up80==1, noconstant cluster(cty) tab cty if e(sample) su lgt lgdp year if e(sample) *Regression xi: reg lgt lgdp i.year if oecd==1 | up80==1, noconstant cluster(cty) est store r1 xi: reg lgt lgdp i.year i.cty if oecd==1 | up80==1, noconstant cluster(cty) est store r2 xi: reg lgt lgdp i.year if (oecd==1 | up80==1) & north==0, noconstant cluster(cty) est store r3 xi: reg lgt lgdp i.year i.cty if (oecd==1 | up80==1) & north==0, noconstant cluster(cty) est store r4 #delimit ; esttab r1 r2 r3 r4 using light_deflator.csv, replace b(a2) se(a2) star(+ 0.10 * 0.05 ** 0.01) scalar("r2 R-squared" "N No. of obs.") ; #delimit cr