clear all
set more off


capture import excel "C:\Users\Barbiero\Dropbox\confidence\Economic Policy\replication\dat_imf&conf_database_1970-2014_new.xlsx", sheet("Panel") firstrow clear
capture import excel "/Users/matteoparadisi/Dropbox/confidence/Economic Policy/replication/dat_imf&conf_database_1970-2014_new.xlsx", sheet("Panel") firstrow clear
rename Year year
rename Country country
keep year country IMF* imf* gdpv popt
drop if (year<2009|year>2013)
destring IMF* imf*, replace
sort country year

drop if country=="AUS"|country=="JPN"|country=="CAN"|country=="NLD"|country=="SWE"|country=="FIN"
egen idcountry=group(country)
tsset id year
keep country idcountry year imf_tot
rename imf_tot AFG
reshape wide AFG, i(idcountry) j(year)
drop idcountry

capture export excel using "C:\Users\Barbiero\Dropbox\confidence\Economic Policy\Testo\Figures\replication CAvsnarrative\Devries extension.xlsx", sheet("Sheet2") sheetreplace firstrow(variables)
