clear all set more off set mem 500m cd "C:\Users\bsw471\Dropbox\Policy_paper" *cd "E:\Dropbox\Policy_paper" cap log close log using analysis_1.log, replace use Host.dta replace Host_dummy=0 if Host_dummy==1 replace Host_dummy=1 if countryname=="Brazil" & year==1992 replace Host_dummy=1 if countryname=="Germany" & year==1995 replace Host_dummy=1 if countryname=="Switzerland" & year==1996 replace Host_dummy=1 if countryname=="Japan" & year==1997 replace Host_dummy=1 if countryname=="Argentina" & year==1998 replace Host_dummy=1 if countryname=="Germany" & year==1999 replace Host_dummy=1 if countryname=="Netherlands" & year==2000 replace Host_dummy=1 if countryname=="Germany" & year==2001 replace Host_dummy=1 if countryname=="Morocco" & year==2001 replace Host_dummy=1 if countryname=="India" & year==2002 replace Host_dummy=1 if countryname=="Italy" & year==2003 replace Host_dummy=1 if countryname=="Argentina" & year==2004 replace Host_dummy=1 if countryname=="Canada" & year==2005 replace Host_dummy=1 if countryname=="Kenya" & year==2006 replace Host_dummy=1 if countryname=="Indonesia" & year==2007 replace Host_dummy=1 if countryname=="Poland" & year==2008 replace Host_dummy=1 if countryname=="Denmark" & year==2009 replace Host_dummy=1 if countryname=="Mexico" & year==2010 replace Host_dummy=1 if countryname=="South Africa" & year==2011 replace Host_dummy=1 if countryname=="Poland" & year==2013 sort countryname year saveold "Host.dta",replace use "Environ_Policy.dta" , clear ***drop double obs sort country year bysort country year: keep if _n==1 rename Annex1 Annex_I ***Annex 1 dummy""" replace Annex_I=0 if Annex_I==. *preserve rename InstitutionsAdministrativear Institutions rename REDDandLULUCF REDD rename Researchanddevelopment RandD rename EnergySupply Energy_Supply rename EnergyDemand Energy_Demand rename CarbonPricing Carbon_Pricing destring Institutions REDD RandD Energy_Supply Energy_Demand Carbon_Pricing Adaptation Transportation, replace rename yrcurnt yrsleft ***recoding freedom of the press and use status since there are more obs****** replace status = "PF" if countryname=="Colombia" & year==1993 replace status = "PF" if countryname=="El Salvador" & year==2003 sort countryname year drop _merge merge countryname year using Host.dta drop if year==2013 drop if country=="EU" /* ****add data for Mozambique*** replace Institutions=1 if countryname=="Mozambique" & (year==1995|year==1997|year==1999|year==2009) replace RandD=1 if countryname=="Mozambique" & year==1995 replace Adaptation=1 if countryname=="Mozambique" & year==1995 replace REDD=1 if countryname=="Mozambique" & (year==1997|year==1999) replace Energy_Supply=1 if countryname=="Mozambique" & year==2009 */ ***redefine democracy: 0/1***** *replace polity2 logGDP=0 if polity2 logGDP<=0 *replace polity2 logGDP=1 if polity2 logGDP>0 *******adjust polity4 variables***** replace xconst=0 if xconst==-77 replace xconst=. if xconst==-88|xconst==-66 * ****log real gross GDP**** gen logGDP=ln(GDP_real) ***log CO2**** gen logCO2=ln(CO2) ***gen lag natural disasters vars**** sort countryname year foreach vvv of varlist dir_loss_tot ins_loss_tot deaths_tot number_tot{ gen l`vvv'=l.`vvv' } ************************************************************ *Create dummy for EU27 country ************************************************************ gen EU = 0 label var EU "Dummy: EU27" replace EU=1 if countryname =="France" replace EU=1 if countryname =="Italy" replace EU=1 if countryname=="Germany" replace EU=1 if countryname =="Denmark" replace EU=1 if countryname =="Czech Republic" replace EU=1 if countryname =="Netherlands" replace EU=1 if countryname =="Sweden" replace EU=1 if countryname =="UK" replace EU=1 if countryname =="Poland" ***replacing missing for -999 na (i.e. not applicable definitions) or blank for the political variables**** foreach vvv of varlist execrlc system finittrm multpl yrsleft allhouse legelec exelec oppfrac govfrac checks polariz checks liec eiec{ replace `vvv'=. if `vvv'==-999 } foreach vvv of varlist Institutions REDD Energy_Supply Carbon_Pricing Energy_Demand Adaptation Transportation RandD{ replace `vvv'=0 if `vvv'==. } gen Env_Pol_num=Institutions+ REDD +Energy_Supply +Carbon_Pricing+ Energy_Demand +Adaptation+ Transportation+ RandD ****generate a dummy 1/0 for the presence of a policy****** foreach vvv of varlist Institutions REDD Energy_Supply Carbon_Pricing Energy_Demand Adaptation Transportation RandD{ generate `vvv'_du=0 replace `vvv'_du=1 if `vvv'>=1 } gen Env_Pol1=Institutions_du+REDD_du+Energy_Supply_du +Carbon_Pricing_du+ Energy_Demand_du +Adaptation_du+ Transportation_du+ RandD_du gen Env_Pol_du=0 replace Env_Pol_du=1 if Env_Pol1>0 drop Env_Pol1 sort countryname year by countryname: egen tot=sum(Env_Pol_du) drop if tot==0 | countryname=="EU" *****generate Polecon variables******* *****Construct the var flag to detect the lagged Effect of flagship legislation***** gen flag=0 replace flag=1 if countryname=="Argentina" & year>=2007 ****inst, demand, supply, transportr***** replace flag=1 if countryname=="Australia" & year>=2012 ***carbon, supply, demand, trasnport, instit replace flag=1 if countryname=="Bangladesh" & year>=2009 **adapt, instit replace flag=1 if countryname=="Bolivia" & year>=2012 ***red, adapt,randD, Instit**** replace flag=1 if countryname=="Brazil" & year>=2009 ***red, adapt,randD, Instit**** replace flag=1 if countryname=="Chile" & year>=2008 ***demand, supply, reed, adapt, instit replace flag=1 if countryname=="China" & year>=2011 ***all except adapt*** replace flag=1 if countryname=="Colombia" & year>=2011 ***all except adapt and carbon replace flag=1 if countryname=="Costa Rica" & year>=2008 ***all except adapt*** replace flag=1 if countryname=="Czech Republic" & year>=2004 ***all except adapt*** replace flag=1 if countryname=="DRC" & year>=2011 ***all except adapt*** replace flag=1 if countryname=="Denmark" & year>=2012 ***all except adapt*** replace flag=1 if countryname=="Dominican Republic" & year>=2012 ***all except adapt*** replace flag=1 if countryname=="Ecuador" & year>=2009 ***all except adapt*** replace flag=1 if countryname=="El Salvador" & year>=2012 *****supply, demand, adapt, randD, instit replace flag=1 if countryname=="Ethiopia" & year>=2011 **all except for carbon, randD replace flag=1 if countryname=="France" & year>=2009 ***all except for reed and adapt replace flag=1 if countryname=="France" & year>=2010 **as above**** replace flag=1 if countryname=="Micronesia" & year>=2013 **as above**** replace flag=1 if countryname=="Gabon" & year>=2012 **as above**** replace flag=1 if countryname=="Germany" & year>=2007 ****supply demand instit rnadD transport replace flag=1 if countryname=="Ghana" & year>=2011 ****supply demand instit rnadD transport replace flag=1 if countryname=="Guatemala" & year>=2013 ****supply demand instit rnadD transport replace flag=1 if countryname=="Guyana" & year>=2009 ****supply demand instit rnadD transport replace flag=1 if countryname=="India" & year>=2008 *****all replace flag=1 if countryname=="Indonesia" & year>=2011 ***instit replace flag=1 if countryname=="Italy" & year>=2007 ****carbon, supply, demand, transport, replace flag=1 if countryname=="Jamaica" & year>=2009 ***supply, demand, afdapt, randD, Instit replace flag=1 if countryname=="Japan" & year>=1998 ***supply, demand, transport, randD, instit replace flag=1 if countryname=="Jordan" & year>=2012 ***supply, demand, transport, randD, instit replace flag=1 if countryname=="Kazakhstan" & year>=2006 ***supply, demand, transport, randD, instit replace flag=1 if countryname=="Kenya" & year>=2013 ***supply, demand, transport, randD, instit replace flag=1 if countryname=="Malaysia" & year>=2011 ***all replace flag=1 if countryname=="Maldives" & year>=2006 ***all replace flag=1 if countryname=="Mexico" & year>=2012 ***all replace flag=1 if countryname=="Mongolia" & year>=2011 ***all replace flag=1 if countryname=="Morocco" & year>=2009 ***all replace flag=1 if countryname=="Mozambique" & year>=2013 ***all replace flag=1 if countryname=="Nepal" & year>=2011 ***adapt, randD, Instit replace flag=1 if countryname=="Netherlands" & year>=2007 ***all replace flag=1 if countryname=="New Zealand" & year>=2002 ***all replace flag=1 if countryname=="Nigeria" & year>=2013 ***all replace flag=1 if countryname=="Norway" & year>=2012 ***all replace flag=1 if countryname=="Pakistan" & year>=2012 ****all except carbon replace flag=1 if countryname=="Peru" & year>=2003 ****demand, adapt, randD, instit replace flag=1 if countryname=="Philippines" & year>=2009 ***all except carbon replace flag=1 if countryname=="Poland" & year>=2003 **all except carnon adn adapt replace flag=1 if countryname=="Russia" & year>=2009 ****instit replace flag=1 if countryname=="Rwanda" & year>=2011 ***all except carbon replace flag=1 if countryname=="Senegal" & year>=2003 ***all except demand replace flag=1 if countryname=="South Africa" & year>=2011 ***all except demand replace flag=1 if countryname=="South Korea" & year>=2010 ****alll replace flag=1 if countryname=="Sweden" & year>=2009 ***all except demand replace flag=1 if countryname=="Switzerland" & year>=2013 ***all except demand replace flag=1 if countryname=="Tanzania" & year>=2012 ***all except demand *replace flag=1 if countryname=="Thailand" & year>=1992 ***all except demand replace flag=1 if countryname=="Thailand" & year>=2008 ***all except demand replace flag=1 if countryname=="Turkey" & year>=2005 ***all except demand *replace flag=1 if countryname=="USA" & year>=1963 ***all except demand replace flag=1 if countryname=="Ukraine" & year>=2005 ***all except demand replace flag=1 if countryname=="Vietnam" & year>=2011 **all execpt carbon replace flag=1 if countryname=="UK" & year>=2008 ***all /* ******placebo flagship**** gen flag=0 replace flag=1 if countryname=="Argentina" & year>=2005 ****inst, demand, supply, transportr***** replace flag=1 if countryname=="Australia" & year>=2012 ***carbon, supply, demand, trasnport, instit replace flag=1 if countryname=="Bangladesh" & year>=1995 **adapt, instit replace flag=1 if countryname=="Bolivia" & year>=1996 ***red, adapt,randD, Instit**** replace flag=1 if countryname=="Brazil" & year>=2011 ***red, adapt,randD, Instit**** replace flag=1 if countryname=="Chile" & year>=2000 ***demand, supply, reed, adapt, instit replace flag=1 if countryname=="China" & year>=1997 ***all except adapt*** replace flag=1 if countryname=="Colombia" & year>=2003 ***all except adapt and carbon replace flag=1 if countryname=="Costa Rica" & year>=1994 ***all except adapt*** replace flag=1 if countryname=="Czech Republic" & year>=2011 ***all except adapt*** replace flag=1 if countryname=="DRC" & year>=2011 ***all except adapt*** replace flag=1 if countryname=="Denmark" & year>=2009 ***all except adapt*** replace flag=1 if countryname=="Dominican Republic" & year>=2007 ***all except adapt*** replace flag=1 if countryname=="Ecuador" & year>=2010 ***all except adapt*** replace flag=1 if countryname=="El Salvador" & year>=2002 *****supply, demand, adapt, randD, insti replace flag=1 if countryname=="Ethiopia" & year>=1997 **all except for carbon, randD replace flag=1 if countryname=="France" & year>=2007 **as above**** replace flag=1 if countryname=="Gabon" & year>=2007 **as above**** replace flag=1 if countryname=="Germany" & year>=2012 ****supply demand instit rnadD transport replace flag=1 if countryname=="Ghana" & year>=2006 ****supply demand instit rnadD transport *replace flag=1 if countryname=="Guatemala" & year>= ****supply demand instit rnadD transport replace flag=1 if countryname=="Guyana" & year>=2011 ****supply demand instit rnadD transport replace flag=1 if countryname=="India" & year>=2005 *****all replace flag=1 if countryname=="Indonesia" & year>=2012 ***instit replace flag=1 if countryname=="Italy" & year>=2004 ****carbon, supply, demand, transport, replace flag=1 if countryname=="Jamaica" & year>=2002 ***supply, demand, afdapt, randD, Instit replace flag=1 if countryname=="Japan" & year>=1997 ***supply, demand, transport, randD, instit replace flag=1 if countryname=="Jordan" & year>=2003 ***supply, demand, transport, randD, instit replace flag=1 if countryname=="Kazakhstan" & year>=2011 ***supply, demand, transport, randD, instit *replace flag=1 if countryname=="Kenya" & year>= ***supply, demand, transport, randD, instit replace flag=1 if countryname=="Malaysia" & year>=2011 ***all *replace flag=1 if countryname=="Maldives" & year>= ***all replace flag=1 if countryname=="Mexico" & year>=2002 ***all replace flag=1 if countryname=="Mongolia" & year>=2005 ***all replace flag=1 if countryname=="Morocco" & year>=2010 ***all *replace flag=1 if countryname=="Mozambique" & year>= ***all replace flag=1 if countryname=="Nepal" & year>=2010 ***adapt, randD, Instit replace flag=1 if countryname=="Netherlands" & year>=1997 ***all replace flag=1 if countryname=="New Zealand" & year>=2004 ***all *replace flag=1 if countryname=="Nigeria" & year>= ***all replace flag=1 if countryname=="Norway" & year>=2004 ***all replace flag=1 if countryname=="Pakistan" & year>=2006 ****all except carbon replace flag=1 if countryname=="Peru" & year>=2000 ****demand, adapt, randD, instit replace flag=1 if countryname=="Philippines" & year>=2008 ***all except carbon replace flag=1 if countryname=="Poland" & year>=2009 **all except carnon adn adapt replace flag=1 if countryname=="Russia" & year>=2009 ****instit replace flag=1 if countryname=="Rwanda" & year>=2012 ***all except carbon replace flag=1 if countryname=="Senegal" & year>=2010 ***all except demand replace flag=1 if countryname=="South Africa" & year>=2010 ***all except demand replace flag=1 if countryname=="South Korea" & year>=2012 ****alll replace flag=1 if countryname=="Sweden" & year>=2009 ***all except demand *replace flag=1 if countryname=="Switzerland" & year>= ***all except demand replace flag=1 if countryname=="Tanzania" & year>=2005 ***all except demand replace flag=1 if countryname=="Thailand" & year>=2008 ***all except demand replace flag=1 if countryname=="Turkey" & year>=2012 ***all except deman *replace flag=1 if countryname=="USA" & year>= ***all except demand replace flag=1 if countryname=="Ukraine" & year>=1994 ***all except demand replace flag=1 if countryname=="Vietnam" & year>=2007 **all execpt carbon replace flag=1 if countryname=="UK" & year>=2001 ***all /* ******legislative-most stringent definition***** gen flag=0 replace flag=1 if countryname=="Australia" & year>=2012 ***carbon, supply, demand, trasnport, instit replace flag=1 if countryname=="Bangladesh" & year>=2009 **adapt, instit replace flag=1 if countryname=="Bolivia" & year>=2012 replace flag=1 if countryname=="Colombia" & year>=2011 ***all except adapt and carbon replace flag=1 if countryname=="DRC" & year>=2011 ***all except adapt*** replace flag=1 if countryname=="Denmark" & year>=2012 ***all except adapt*** replace flag=1 if countryname=="Dominican Republic" & year>=2012 ***all except adapt*** replace flag=1 if countryname=="Ecuador" & year>=2009 ***all except adapt*** replace flag=1 if countryname=="El Salvador" & year>=2012 *****supply, demand, adapt, randD, instit replace flag=1 if countryname=="Ethiopia" & year>=2011 **all except for carbon, randD replace flag=1 if countryname=="France" & year>=2009 ***all except for reed and adapt replace flag=1 if countryname=="France" & year>=2010 **as above**** replace flag=1 if countryname=="Micronesia" & year>=2013 **as above**** replace flag=1 if countryname=="Ghana" & year>=2011 ****supply demand instit rnadD transport replace flag=1 if countryname=="Guatemala" & year>=2013 ****supply demand instit rnadD transport replace flag=1 if countryname=="Japan" & year>=1998 ***supply, demand, transport, randD, instit replace flag=1 if countryname=="Jordan" & year>=2012 ***supply, demand, transport, randD, instit replace flag=1 if countryname=="Malaysia" & year>=2011 ***all replace flag=1 if countryname=="Mexico" & year>=2012 replace flag=1 if countryname=="New Zealand" & year>=2002 ***all replace flag=1 if countryname=="Norway" & year>=2012 replace flag=1 if countryname=="Philippines" & year>=2009 replace flag=1 if countryname=="South Korea" & year>=2010 replace flag=1 if countryname=="Switzerland" & year>=2013 ***all except demand replace flag=1 if countryname=="Turkey" & year>=2005 replace flag=1 if countryname=="UK" & year>=2008 ***all *****second definition****coverage gen flag=0 replace flag=1 if countryname=="Argentina" & year>=2007 ****inst, demand, supply, transportr***** replace flag=1 if countryname=="Australia" & year>=2012 replace flag=1 if countryname=="Bolivia" & year>=2012 ***red, adapt,randD, Instit**** * replace flag=1 if countryname=="Chile" & year>=2008 ***demand, supply, reed, adapt, instit replace flag=1 if countryname=="China" & year>=2011 ***all except adapt*** replace flag=1 if countryname=="Colombia" & year>=2011 ***all except adapt and carbon replace flag=1 if countryname=="Czech Republic" & year>=2004 ***all except adapt*** replace flag=1 if countryname=="Denmark" & year>=2012 ***all except adapt*** replace flag=1 if countryname=="Ethiopia" & year>=2011 **all except for carbon, randD replace flag=1 if countryname=="France" & year>=2010 **as above**** replace flag=1 if countryname=="Micronesia" & year>=2013 **as above**** replace flag=1 if countryname=="Germany" & year>=2007 ****supply demand instit rnadD transport replace flag=1 if countryname=="Guatemala" & year>=2013 ****supply demand instit rnadD transport replace flag=1 if countryname=="Guyana" & year>=2009 ****supply demand instit rnadD transport replace flag=1 if countryname=="India" & year>=2008 replace flag=1 if countryname=="Jamaica" & year>=2009 ***supply, demand, afdapt, randD, Instit replace flag=1 if countryname=="Japan" & year>=1998 ***supply, demand, transport, randD, instit replace flag=1 if countryname=="Kazakhstan" & year>=2006 ***supply, demand, transport, randD, instit replace flag=1 if countryname=="Maldives" & year>=2006 ***all replace flag=1 if countryname=="Mexico" & year>=2012 ***all replace flag=1 if countryname=="Mongolia" & year>=2011 ***all replace flag=1 if countryname=="Morocco" & year>=2009 ***all replace flag=1 if countryname=="Netherlands" & year>=2007 ***all replace flag=1 if countryname=="Nigeria" & year>=2013 ***all replace flag=1 if countryname=="Norway" & year>=2012 ***all replace flag=1 if countryname=="Pakistan" & year>=2012 ****all except carbon replace flag=1 if countryname=="Peru" & year>=2003 ****demand, adapt, randD, instit replace flag=1 if countryname=="Philippines" & year>=2009 ***all except carbon replace flag=1 if countryname=="Poland" & year>=2003 **all except carnon adn adapt replace flag=1 if countryname=="Russia" & year>=2009 ****instit replace flag=1 if countryname=="Rwanda" & year>=2011 ***all except carbon replace flag=1 if countryname=="South Africa" & year>=2011 ***all except demand replace flag=1 if countryname=="South Korea" & year>=2010 ****alll replace flag=1 if countryname=="Sweden" & year>=2009 ***all except demand replace flag=1 if countryname=="Switzerland" & year>=2013 ***all except demand replace flag=1 if countryname=="Tanzania" & year>=2012 ***all except demand *replace flag=1 if countryname=="Thailand" & year>=1992 ***all except demand replace flag=1 if countryname=="Thailand" & year>=2008 replace flag=1 if countryname=="Ukraine" & year>=2005 ***all except demand replace flag=1 if countryname=="Vietnam" & year>=2011 **all execpt carbon replace flag=1 if countryname=="UK" & year>=2008 ***all ***third definition-----no policies *****Construct the var flag to detect the lagged Effect of flagship legislation***** gen flag=0 replace flag=1 if countryname=="Argentina" & year>=2007 ****inst, demand, supply, transportr***** replace flag=1 if countryname=="Australia" & year>=2012 ***carbon, supply, demand, trasnport, instit replace flag=1 if countryname=="Bangladesh" & year>=2009 **adapt, instit replace flag=1 if countryname=="Bolivia" & year>=2012 ***red, adapt,randD, Instit**** replace flag=1 if countryname=="Brazil" & year>=2009 ***red, adapt,randD, Instit**** ***demand, supply, reed, adapt, instit replace flag=1 if countryname=="China" & year>=2011 ***all except adapt*** replace flag=1 if countryname=="Colombia" & year>=2011 ***all except adapt and carbon replace flag=1 if countryname=="Costa Rica" & year>=2008 ***all except adapt*** replace flag=1 if countryname=="Czech Republic" & year>=2004 ***all except adapt*** replace flag=1 if countryname=="DRC" & year>=2011 ***all except adapt*** replace flag=1 if countryname=="Denmark" & year>=2012 ***all except adapt*** replace flag=1 if countryname=="Dominican Republic" & year>=2012 ***all except adapt*** replace flag=1 if countryname=="Ecuador" & year>=2009 ***all except adapt*** replace flag=1 if countryname=="France" & year>=2009 ***all except for reed and adapt replace flag=1 if countryname=="France" & year>=2010 **as above**** replace flag=1 if countryname=="Micronesia" & year>=2013 **as above**** **as above**** replace flag=1 if countryname=="Germany" & year>=2007 ****supply demand instit rnadD transport replace flag=1 if countryname=="Ghana" & year>=2011 ****supply demand instit rnadD transport replace flag=1 if countryname=="Guatemala" & year>=2013 ****supply demand instit rnadD transport replace flag=1 if countryname=="Japan" & year>=1998 ***supply, demand, transport, randD, instit replace flag=1 if countryname=="Jordan" & year>=2012 ***supply, demand, transport, randD, instit replace flag=1 if countryname=="Malaysia" & year>=2011 ***all replace flag=1 if countryname=="Mexico" & year>=2012 ***all replace flag=1 if countryname=="Mongolia" & year>=2011 ***all replace flag=1 if countryname=="Mozambique" & year>=2013 ***all replace flag=1 if countryname=="New Zealand" & year>=2002 ***all replace flag=1 if countryname=="Norway" & year>=2012 ****all except carbon replace flag=1 if countryname=="Peru" & year>=2003 ****demand, adapt, randD, instit replace flag=1 if countryname=="Philippines" & year>=2009 ***all except carbon replace flag=1 if countryname=="Poland" & year>=2003 **all except carnon adn adapt replace flag=1 if countryname=="Russia" & year>=2009 ****instit replace flag=1 if countryname=="Rwanda" & year>=2011 ***all except carbon replace flag=1 if countryname=="Senegal" & year>=2003 ***all except demand replace flag=1 if countryname=="South Korea" & year>=2010 ****alll replace flag=1 if countryname=="Switzerland" & year>=2013 ***all except demand replace flag=1 if countryname=="Thailand" & year>=2008 ***all except demand replace flag=1 if countryname=="Turkey" & year>=2005 replace flag=1 if countryname=="Vietnam" & year>=2011 **all execpt carbon replace flag=1 if countryname=="UK" & year>=2008 ***all */ ***my definition-no policies ******legislative-most stringent definition***** /* gen flag=0 replace flag=1 if countryname=="Argentina" & year>=2007 replace flag=1 if countryname=="Australia" & year>=2012 ***carbon, supply, demand, trasnport, instit replace flag=1 if countryname=="Bangladesh" & year>=2009 **adapt, instit replace flag=1 if countryname=="Bolivia" & year>=2012 replace flag=1 if countryname=="Brazil" & year>=2009 ***red, adapt,randD, Instit**** ***demand, supply, reed, adapt, instit replace flag=1 if countryname=="China" & year>=2011 ***all except adapt*** replace flag=1 if countryname=="Colombia" & year>=2011 ***all except adapt and carbon replace flag=1 if countryname=="Czech Republic" & year>=2004 ***all except adapt*** replace flag=1 if countryname=="DRC" & year>=2011 ***all except adapt*** replace flag=1 if countryname=="Denmark" & year>=2012 ***all except adapt*** replace flag=1 if countryname=="Dominican Republic" & year>=2012 ***all except adapt*** replace flag=1 if countryname=="Ecuador" & year>=2009 ***all except adapt*** replace flag=1 if countryname=="France" & year>=2009 ***all except for reed and adapt replace flag=1 if countryname=="France" & year>=2010 **as above**** replace flag=1 if countryname=="Micronesia" & year>=2013 **as above**** replace flag=1 if countryname=="Ghana" & year>=2011 ****supply demand instit rnadD transport replace flag=1 if countryname=="Guatemala" & year>=2013 ****supply demand instit rnadD transport replace flag=1 if countryname=="Japan" & year>=1998 ***supply, demand, transport, randD, instit replace flag=1 if countryname=="Jordan" & year>=2012 ***supply, demand, transport, randD, instit replace flag=1 if countryname=="Kazakhstan" & year>=2006 ***supply, demand, transport, randD, instit replace flag=1 if countryname=="Malaysia" & year>=2011 replace flag=1 if countryname=="Maldives" & year>=2006 ***all replace flag=1 if countryname=="Mexico" & year>=2012 replace flag=1 if countryname=="New Zealand" & year>=2002 ***all replace flag=1 if countryname=="Norway" & year>=2012 replace flag=1 if countryname=="Peru" & year>=2003 replace flag=1 if countryname=="Philippines" & year>=2009 replace flag=1 if countryname=="Senegal" & year>=2003 replace flag=1 if countryname=="South Korea" & year>=2010 replace flag=1 if countryname=="Switzerland" & year>=2013 ***all except demand replace flag=1 if countryname=="Turkey" & year>=2005 replace flag=1 if countryname=="UK" & year>=2008 ***all ****host country variable***** */ */ ******Construct the var flagpol to detect the predictors of the flag policy***** sort countryname year by countryname: generate flagpol=1 if flag==1 & flag[_n-1]==0 replace flagpol=0 if flagpol==. sum flagpol,d bysort countryname year: replace Count_laws=Count_laws-1 if flagpol==1 ***government ideology*** generate left=0 replace left=1 if execrlc==3 gen right=0 replace right=1 if left==0 *****presidential regime**** generate pres=0 replace pres=1 if system==0 replace pres=. if system==-999 *****proportional regime**** generate prop=0 replace prop=1 if pr==1 *****majoritarian regime**** generate majo=0 replace majo=1 if pluralty==1 ****possible inter reelection**** generate reelect=0 if multpl==0 replace reelect=1 if finittrm==1 & multpl==1 replace reelect=1 if finittrm==0 ****Unified government;executive controls the majority of the representative house**** generate unified=allhouse *replace unified=1 if allhouse==1 *****three classes media freedom var**** generate FreeM=. replace FreeM=0 if status=="NF" replace FreeM=1 if status=="PF" replace FreeM=2 if status=="F" ****continuous media freedom var***** generate scoreMedia=-score ********electoral/partisan cycles****** ***any election*** gen ele=0 replace ele=1 if legelec==1 & pres==0 replace ele=1 if exelec==1 & pres==1 gen befele=ele[_n+1] gen aftele=ele[_n-1] gen ele_prop=0 replace ele_prop=ele*prop gen lele_prop=f.ele_prop gen ele_majo=0 replace ele_majo=ele*majo gen lele_majo=f.ele_majo gen parl=0 replace parl=1 if pres==0 gen ele_parl=0 replace ele_parl=ele*parl gen lele_parl=f.ele_parl gen ele_pres=0 replace ele_pres=ele*pres gen lele_pres=f.ele_pres ***generate for ZINB and inflate, a variable likely to generate the excess of zeros**** ****i.e. time before the first reform******** sort countryname year by countryname: gen tot_zeros=sum(Env_Pol_du) replace tot_zeros=. if tot_zeros>0 replace tot_zeros=1 if tot_zeros==0 by countryname: egen sum_zeros=total(tot_zeros) ****construct a variable: proxy for policy duffusion/spillover effect****** ***proportion of countries that adopted till time t-1******* sort year countryname foreach vvv of varlist Env_Pol_du Institutions_du REDD_du Energy_Supply_du Energy_Demand_du Adaptation_du Carbon_Pricing_du Transportation_du RandD_du{ by year: egen numb_`vvv'=total(`vvv') } sort countryname year foreach vvv of varlist numb_* { by countryname:gen ad`vvv'=sum(`vvv') } ***gen lag*** sort countryname year foreach vvv of varlist ad*{ gen l`vvv'=l.`vvv' } *********number of policy adopted till time t-1 in the n-1 countries******** sort year countryname foreach vvv of varlist Count_laws Env_Pol_num Institutions REDD Energy_Supply Carbon_Pricing Energy_Demand Adaptation Transportation RandD{ by year: egen numbpo_`vvv'=total(`vvv') } sort countryname year foreach vvv of varlist numbpo_* { by countryname:gen l`vvv'=l.`vvv' } foreach vvv of varlist Count_laws Env_Pol_num Institutions REDD Energy_Supply Carbon_Pricing Energy_Demand Adaptation Transportation RandD{ by countryname: gen l`vvv'=l.`vvv' } foreach vvv of varlist numbpo_* { by countryname:gen adpo`vvv'=sum(`vvv') } sort countryname year foreach vvv of varlist Count_laws Env_Pol_num Institutions REDD Energy_Supply Carbon_Pricing Energy_Demand Adaptation Transportation RandD{ by countryname: gen sing`vvv'=sum(`vvv') } foreach vvv of varlist sing*{ by countryname: gen l`vvv'=l.`vvv' } ***gen lag*** sort countryname year foreach vvv of varlist adpo*{ by countryname: gen lagged`vvv'=l.`vvv' } *****all policy adopted till time t-1****** by countryname: gen ladponumbpo_Count_laws=laggedadponumbpo_Count_laws-lsingCount_laws by countryname: gen ladponumbpo_Env_Pol_num=laggedadponumbpo_Env_Pol_num-lsingEnv_Pol_num by countryname: gen ladponumbpo_Energy_Supply=laggedadponumbpo_Energy_Supply-lsingEnergy_Supply by countryname: gen ladponumbpo_Energy_Demand=laggedadponumbpo_Energy_Demand-lsingEnergy_Demand by countryname: gen ladponumbpo_Carbon_Pricing=laggedadponumbpo_Carbon_Pricing-lsingCarbon_Pricing by countryname: gen ladponumbpo_Institutions=laggedadponumbpo_Institutions-lsingInstitutions by countryname: gen ladponumbpo_Transportation=laggedadponumbpo_Transportation-lsingTransportation by countryname: gen ladponumbpo_Adaptation=laggedadponumbpo_Adaptation-lsingAdaptation by countryname: gen ladponumbpo_RandD=laggedadponumbpo_RandD-lsingRandD by countryname: gen ladponumbpo_REDD=laggedadponumbpo_REDD-lsingREDD *****all policy adopted at time t-1****** by countryname: gen l_Env_Pol_num=lnumbpo_Env_Pol_num-lEnv_Pol_num by countryname: gen l_Energy_Supply=lnumbpo_Energy_Supply-lEnergy_Supply by countryname: gen l_Energy_Demand=lnumbpo_Energy_Demand-lEnergy_Demand by countryname: gen l_Carbon_Pricing=lnumbpo_Carbon_Pricing-lCarbon_Pricing by countryname: gen l_Institutions=lnumbpo_Institutions-lInstitutions by countryname: gen l_Transportation=lnumbpo_Transportation-lTransportation by countryname: gen l_Adaptation=lnumbpo_Adaptation-lAdaptation by countryname: gen l_RandD=lnumbpo_RandD-lRandD by countryname: gen l_REDD=lnumbpo_REDD-lREDD /* *****all policy at time t-1****** by countryname: gen ladponumbpo_Env_Pol_num=lnumbpo_Env_Pol_num-lEnv_Pol_num by countryname: gen ladponumbpo_Energy_Supply=lnumbpo_Energy_Supply-lEnergy_Supply by countryname: gen ladponumbpo_Energy_Demand=lnumbpo_Energy_Demand-lEnergy_Demand by countryname: gen ladponumbpo_Carbon_Pricing=lnumbpo_Carbon_Pricing-lCarbon_Pricing by countryname: gen ladponumbpo_Institutions=lnumbpo_Institutions-lInstitutions by countryname: gen ladponumbpo_Transportation=lnumbpo_Transportation-lTransportation by countryname: gen ladponumbpo_Adaptation=lnumbpo_Adaptation-lAdaptation by countryname: gen ladponumbpo_RandD=lnumbpo_RandD-lRandD */ ****generate a cumulative variable for the number of first adoption, i.e. first adopters at time t-1***** sort countryname year foreach vvv of varlist Env_Pol_du Institutions_du REDD_du Energy_Supply_du Carbon_Pricing_du Energy_Demand_du Adaptation_du Transportation_du RandD_du{ by countryname: gen cumadopt_`vvv'=sum(`vvv') } foreach vvv of varlist Env_Pol_du Institutions_du REDD_du Energy_Supply_du Carbon_Pricing_du Energy_Demand_du Adaptation_du Transportation_du RandD_du{ by countryname: gen cumul`vvv'=0 replace cumul`vvv'=1 if cumadopt_`vvv'>=1 } sort year foreach vvv of varlist Env_Pol_du Institutions_du REDD_du Energy_Supply_du Carbon_Pricing_du Energy_Demand_du Adaptation_du Transportation_du RandD_du{ by year: egen cumall`vvv'=total(cumul`vvv') } sort countryname year ***gen lag**** sort countryname year foreach vvv of varlist cumall*{ gen l`vvv'=l.`vvv' } **create country dummy*** replace countryname="AAAEcuador" if countryname=="Ecuador" replace countryname="AAJordan" if countryname=="Jordan" replace countryname="AUSA" if countryname=="USA" replace countryname="ABUK" if countryname=="UK" tab countryname, gen(dum_c) ***variables of interest: lcumallEnv_Pol_du, ladnumb_Env_Pol_du, **********EXTERNAL FACTORS******* ***host meetings***** sort countryname year by countryname: gen year_h=year if Host_dummy==1 gen l1year_h=l.year_h gen l2year_h=l2.year_h gen f1year_h=f.year_h gen f2year_h=f2.year_h generate yearhost=year_h replace yearhost=l1year_h if year_h==. replace yearhost=l2year_h if yearhost==. replace yearhost=f1year_h if yearhost==. replace yearhost=f2year_h if yearhost==. ***all time window (= 5 years)****** gen host_time=1 if yearhost!=. replace host_time=0 if yearhost==. ***3 years before(and same year of) hosting**** gen befhost=Host_dummy[_n+1] if year==yearhost-1 replace befhost=Host_dummy[_n+2] if year==yearhost-2 replace befhost=0 if befhost==. **2 years after hosting**** gen afthost=Host_dummy replace afthost=Host_dummy[_n-1] if year==yearhost+1 replace afthost=Host_dummy[_n-2] if year==yearhost+2 replace afthost=0 if afthost==. /* ******meetings: 1992, 1997, 2009******** generate Aft92=0 replace Aft92=1 if year==1993 & year==1994 generate Aft97=0 replace Aft97=1 if year==1998 & year==1999 generate host =0 replace host =1 if year>1992 & countryname=="Brazil" replace host =1 if year>1997 & countryname=="Japan" *replace host =1 if year>2007 & year<2012 & countryname=="Denmark" */ ****disaster:dir_loss_tot ins_loss_tot deaths_tot number_tot gen dis=0 replace dis=1 if dir_loss_tot>1760 gen ldis=l.dis ***gen time trend**** sort countryname year egen id=group(countryname) tab id, gen(count_du) gen Trend = year-1989 forvalues i=1(1)65 { gen Trend_`i' =Trend*count_du`i' } replace fraud=. if fraud==-999 ***gen ordered dependent variables***** gen Env_ordered=Env_Pol_du replace Env_ordered=2 if flag==1 ****generate LOG**** gen logENV=ln(Env_Pol_num) gen logEN_SU=ln(Energy_Supply) gen logEN_DE=ln(Energy_Demand) gen logINST=ln(Institutions) *keep if year>1994 *drop if polity2 logGDP<5 gen inter1=left*befele gen inter2=left*ele replace inter1=0 if inter1==. replace inter2=0 if inter2==. ****post summit dummy***** generate POST92=0 replace POST92=1 if year>=1992 & year<1996 generate Kyoto=0 replace Kyoto=1 if year>=1998 & year<2002 generate POST09=0 replace POST09=1 if year>=2009 ***business cycle**** drop if countryname=="Micronesia" | countryname=="Maldives" sort countryname year tsset id year tsfilter hp gdp_hp = logGDP, smooth (100) rename logGDP logGDPgross gen logGDP=ln(GDP) ***define recession*** sort countryname year bysort countryname: gen bus_d=1 bysort countryname: replace bus_d=0 if gdp_hp[_n]1 bysort countryname: replace bus_d=0 if gdp_hp<0 & _n==1 ***t-test***** preserve sort Annex_I year collapse Count_laws, by(Annex_I year) ttest Count_laws, by(Annex_I) restore ***** ***descriptive**** sum Count_laws logGDP Env_Pol_du afthost flag gdp_hp Kyoto unified ele befele left pres polity2 ladponumbpo_Count_laws, d set more off replace pluralty=. if pluralty<0 gen inter=left*pluralty ** 10% drop if countryname=="Italy" ** 10%drop if countryname=="Ukraine" ** 10% drop if countryname=="AAAEcuador" *drop if countryname=="Mongolia" **drop if countryname=="Mozambique" **drop if countryname=="Tanzania" *drop if countryname=="Vietnam" gen q=(lsingCount_laws*lsingCount_laws) *drop if countryname=="Indonesia" /* reg Count_laws ladponumbpo_Count_laws lsingCount_laws c.lsingCount_laws#c.lsingCount_laws Kyoto left gdp_hp polity2 logGDP ele befele unified afthost i.year dum_c*, vce(cluster id) estat vif nbreg Count_laws lsingCount_laws c.lsingCount_laws#c.lsingCount_laws Kyoto left gdp_hp polity2 logGDP ele befele unified afthost i.year dum_c*, vce(cluster id) iterate (20) *margins, at (lsingCount_laws=1.61) atmeans margins, at (lsingCount_laws=(2 4 6 8 10 12 14 16 18 20)) atmeans marginsplot, noci */ gen pol1=0 replace pol1=1 if polity2>=6 gen interpol1=pol1*ele gen interleft=left*gdp_hp nbreg Count_laws flag lsingCount_laws q ladponumbpo_Count_laws Kyoto left gdp_hp polity2 logGDP ele befele unified afthost i.year dum_c*, vce(cluster id) iterate (20) outreg2 afthost flag lsingCount_laws q ladponumbpo_Count_laws left Kyoto gdp_hp polity2 ele befele unified logGDP using Table_3.doc, bdec(3) nocon title(Pooled NB/fe vce(r)) replace jblkn xtpoisson Count_laws ladponumbpo_Count_laws flag lsingCount_laws q Kyoto left gdp_hp polity2 logGDP ele befele unified afthost i.year , fe vce(r) iterate (20) outreg2 afthost ladponumbpo_Count_laws flag lsingCount_laws q left Kyoto gdp_hp polity2 ele befele unified logGDP using Table_5.doc, bdec(3) nocon title(Pooled NB/fe vce(r)) replace nbreg Count_laws flag lsingCount_laws q ladponumbpo_Count_laws Kyoto left interpol1 pol1 gdp_hp logGDP ele befele unified afthost i.year dum_c*, vce(cluster id) iterate (20) outreg2 afthost flag lsingCount_laws q ladponumbpo_Count_laws left interpol1 Kyoto gdp_hp pol1 ele befele unified logGDP using Table_3.doc, bdec(3) nocon title(Pooled NB/fe vce(r)) xtpoisson Count_laws ladponumbpo_Count_laws flag lsingCount_laws q Kyoto left interpol1 pol1 gdp_hp logGDP ele befele unified afthost i.year , fe vce(r) iterate (20) outreg2 afthost ladponumbpo_Count_laws flag lsingCount_laws q left interpol1 Kyoto gdp_hp pol1 ele befele unified logGDP using Table_5.doc, bdec(3) nocon title(Pooled NB/fe vce(r)) nbreg Count_laws flag lsingCount_laws q ladponumbpo_Count_laws Kyoto left interleft interpol1 pol1 gdp_hp logGDP ele befele unified afthost i.year dum_c*, vce(cluster id) iterate (20) outreg2 afthost flag lsingCount_laws q ladponumbpo_Count_laws left interleft interpol1 Kyoto gdp_hp pol1 ele befele unified logGDP using Table_3.doc, bdec(3) nocon title(Pooled NB/fe vce(r)) xtpoisson Count_laws ladponumbpo_Count_laws flag lsingCount_laws q Kyoto left interleft interpol1 pol1 gdp_hp logGDP ele befele unified afthost i.year , fe vce(r) iterate (20) outreg2 afthost ladponumbpo_Count_laws flag lsingCount_laws q interleft left interpol1 Kyoto gdp_hp pol1 ele befele unified logGDP using Table_5.doc, bdec(3) nocon title(Pooled NB/fe vce(r)) preserve keep if polity2>=6 | polity2<=-6 drop pol1 drop interpol1 gen pol1=0 replace pol1=1 if polity2>=6 gen interpol1=pol1*ele nbreg Count_laws flag lsingCount_laws q ladponumbpo_Count_laws Kyoto left interleft interpol1 pol1 gdp_hp logGDP ele befele unified afthost i.year dum_c*, vce(cluster id) iterate (20) outreg2 afthost flag lsingCount_laws q ladponumbpo_Count_laws left interpol1 Kyoto gdp_hp pol1 ele befele unified logGDP using Table_3.doc, bdec(3) nocon title(Pooled NB/fe vce(r)) xtpoisson Count_laws ladponumbpo_Count_laws flag lsingCount_laws q Kyoto left interleft interpol1 pol1 gdp_hp logGDP ele befele unified afthost i.year , fe vce(r) iterate (20) outreg2 afthost ladponumbpo_Count_laws flag lsingCount_laws q left interpol1 Kyoto gdp_hp pol1 ele befele unified logGDP using Table_5.doc, bdec(3) nocon title(Pooled NB/fe vce(r)) restore clear log close