Hello Everyone,
I am running an empirical analysis on the effects of 2 Countries, in this case, Bulgaria and Romania, joining the EU and how it affects their imports and exports from countries that had existing FTA agreements with the EU using the dataset from CEPII.
Could you please check my code below if it is relevant, I am afraid it captures all countries and not the specific relationship I mentioned above.
1. Please could you share what should be my next steps in ensuring the validity of my results, should I drop all irrelevant observations and keep only the exports of Bulgaria and Romania towards these countries?
2. What other regressions should I run and what other econometrical analysis could I use?
Code below :
*load dataset*
use "C:\Users\themi\Desktop\master theis\DATA\Gravity_V202202.dta"
*generate log variable*
keep if year>= 1990
gen lgdp_o=log(gdp_o)
gen lgdp_d=log(gdp_d)
gen lpop_o=log(pop_o)
gen lpop_d=log(pop_d)
gen ldistcap=log(distcap)
gen ln_tradeflow_baci=log(tradeflow_baci)
gen ltradeflow_comtrade_o=log( tradeflow_comtrade_o)
gen ltradeflow_comtrade_d=log(tradeflow_comtrade_d)
gen lgdgcap_o=log( gdpcap_ppp_o)
gen lgdgcap_d=log( gdpcap_ppp_d)
rename ltradeflow_comtrade_o exportsBulgaria_Romania
label variable exportsBulgaria_Romania "Exports of Bulgaria and Romania"
*create pair*
gen exporter=(country_id_o == "BGR" | country_id_o == "ROU" )
gen importer=(country_id_d == "DZA" | country_id_d == "AND" | country_id_d == "AZE" | country_id_d == "CHL" | country_id_d == "EGY" | country_id_d == "FRO" | country_id_d== "JOR" | country_id_d == "LBN" | country_id_d == "MEX" | country_id_d == "MAR" | country_id_d == "NOR" | country_id_d == "PSE" | country_id_d == "SMR" | country_id_d == "TUN" | country_id_d == "TUR")
*create FE*
egen exp_time=group(exporter year)
tabulate exp_time, generate(EXPORTER_TIME_FE)
egen imp_time=group(importer year)
tabulate imp_time, generate(IMPORTER_TIME_FE)
egen countrypair_id=group(exporter importer)
tabulate countrypair_id, generate(PAIR_FE)
*run PPML regressions*
ppml exportsBulgaria_Romania rta lgdp_o lgdp_d lpop_o lpop_d ldistcap lgdgcap_o lgdgcap_d EXPORTER_TIME_FE* IMPORTER_TIME_FE* PAIR_FE*
I am running an empirical analysis on the effects of 2 Countries, in this case, Bulgaria and Romania, joining the EU and how it affects their imports and exports from countries that had existing FTA agreements with the EU using the dataset from CEPII.
Could you please check my code below if it is relevant, I am afraid it captures all countries and not the specific relationship I mentioned above.
1. Please could you share what should be my next steps in ensuring the validity of my results, should I drop all irrelevant observations and keep only the exports of Bulgaria and Romania towards these countries?
2. What other regressions should I run and what other econometrical analysis could I use?
Code below :
*load dataset*
use "C:\Users\themi\Desktop\master theis\DATA\Gravity_V202202.dta"
*generate log variable*
keep if year>= 1990
gen lgdp_o=log(gdp_o)
gen lgdp_d=log(gdp_d)
gen lpop_o=log(pop_o)
gen lpop_d=log(pop_d)
gen ldistcap=log(distcap)
gen ln_tradeflow_baci=log(tradeflow_baci)
gen ltradeflow_comtrade_o=log( tradeflow_comtrade_o)
gen ltradeflow_comtrade_d=log(tradeflow_comtrade_d)
gen lgdgcap_o=log( gdpcap_ppp_o)
gen lgdgcap_d=log( gdpcap_ppp_d)
rename ltradeflow_comtrade_o exportsBulgaria_Romania
label variable exportsBulgaria_Romania "Exports of Bulgaria and Romania"
*create pair*
gen exporter=(country_id_o == "BGR" | country_id_o == "ROU" )
gen importer=(country_id_d == "DZA" | country_id_d == "AND" | country_id_d == "AZE" | country_id_d == "CHL" | country_id_d == "EGY" | country_id_d == "FRO" | country_id_d== "JOR" | country_id_d == "LBN" | country_id_d == "MEX" | country_id_d == "MAR" | country_id_d == "NOR" | country_id_d == "PSE" | country_id_d == "SMR" | country_id_d == "TUN" | country_id_d == "TUR")
*create FE*
egen exp_time=group(exporter year)
tabulate exp_time, generate(EXPORTER_TIME_FE)
egen imp_time=group(importer year)
tabulate imp_time, generate(IMPORTER_TIME_FE)
egen countrypair_id=group(exporter importer)
tabulate countrypair_id, generate(PAIR_FE)
*run PPML regressions*
ppml exportsBulgaria_Romania rta lgdp_o lgdp_d lpop_o lpop_d ldistcap lgdgcap_o lgdgcap_d EXPORTER_TIME_FE* IMPORTER_TIME_FE* PAIR_FE*
Comment