Hello,
First of all, let me state that I am quite novice in STATA.
I am trying to estimate trade potentials by using the Gravity model of International Trade. Model includes trade flows between countries, their GDPs, distance, and more than 0 dummy variables like whether countries were in common colony, share border etc. I have three different datasets, all are from CEPII, for trade flows, for country name in ISO code, and the third one for all other variables.
The first dataset is as below; (t - time, hs6- HS6 code, i and j - iso numeric codes for importer and exporter, respectively and v is value of export)
t hs6 i j v
2013 10600 4 124 1.622
2013 10600 4 586 36.676
2013 20110 4 634 2.434
2013 20130 4 634 30.128
2013 20319 4 616 3.83633
2013 20421 4 634 100.953
2013 30342 4 704 264.611
2013 30343 4 704 42.3159
And second looks like as; ( here iso3 and iso2 are ALpha2 and 3 Iso codes, and i is, again, iso numeric code)
And the third dataset is as ( you may guess the variables, hopefully)
iso3_o iso3_d year contig comlang_off comlang_comcol col45 distw pop_o gdp_o gdpcap_o iso2_o
ABW AFG 1991 0 0 0 0 0 13168.22 872.067 AW
ABW AFG 1992 0 0 0 0 0 13168.22 958.6592 AW
ABW AFG 1993 0 0 0 0 0 13168.22 1083.24 AW
ABW AFG 1994 0 0 0 0 0 13168.22 1245.81 AW
ABW AFG 1995 0 0 0 0 0 13168.22 1320.67 AW
ABW AFG 1996 0 0 0 0 0 13168.22 1379.888 AW
ABW AFG 1997 0 0 0 0 0 13168.22 1531.844 AW
The above dataset has 38 variables and about 3 mln observation. Some of the variables and majority of the observations here are not in my interest and I will not include them in my model.
Now my question is like this. How can I include Respective iso3 codes and names from second dataset and distance between that pair of countries, border, common language and other dummies from the third dataset to my first dataset?
Hopefully I was able to state my problem clearly. I have searched for this a lot but, unfortunately, have not found any answer yet. Any help would be highly appreciated..
First of all, let me state that I am quite novice in STATA.
I am trying to estimate trade potentials by using the Gravity model of International Trade. Model includes trade flows between countries, their GDPs, distance, and more than 0 dummy variables like whether countries were in common colony, share border etc. I have three different datasets, all are from CEPII, for trade flows, for country name in ISO code, and the third one for all other variables.
The first dataset is as below; (t - time, hs6- HS6 code, i and j - iso numeric codes for importer and exporter, respectively and v is value of export)
t hs6 i j v
2013 10600 4 124 1.622
2013 10600 4 586 36.676
2013 20110 4 634 2.434
2013 20130 4 634 30.128
2013 20319 4 616 3.83633
2013 20421 4 634 100.953
2013 30342 4 704 264.611
2013 30343 4 704 42.3159
And second looks like as; ( here iso3 and iso2 are ALpha2 and 3 Iso codes, and i is, again, iso numeric code)
iso3 | iso2 | name_english | i | |
AFG | AF | Afghanistan | 4 | |
ALB | AL | Albania | 8 | |
DZA | DZ | Algeria | 12 | |
ASM | AS | American Samoa | 16 | |
AND | AD | Andorra | 20 | |
AGO | AO | Angola | 24 | |
ATG | AG | Antigua and Barbuda | 28 |
iso3_o iso3_d year contig comlang_off comlang_comcol col45 distw pop_o gdp_o gdpcap_o iso2_o
ABW AFG 1991 0 0 0 0 0 13168.22 872.067 AW
ABW AFG 1992 0 0 0 0 0 13168.22 958.6592 AW
ABW AFG 1993 0 0 0 0 0 13168.22 1083.24 AW
ABW AFG 1994 0 0 0 0 0 13168.22 1245.81 AW
ABW AFG 1995 0 0 0 0 0 13168.22 1320.67 AW
ABW AFG 1996 0 0 0 0 0 13168.22 1379.888 AW
ABW AFG 1997 0 0 0 0 0 13168.22 1531.844 AW
The above dataset has 38 variables and about 3 mln observation. Some of the variables and majority of the observations here are not in my interest and I will not include them in my model.
Now my question is like this. How can I include Respective iso3 codes and names from second dataset and distance between that pair of countries, border, common language and other dummies from the third dataset to my first dataset?
Hopefully I was able to state my problem clearly. I have searched for this a lot but, unfortunately, have not found any answer yet. Any help would be highly appreciated..
Comment