The following is a snippet of my database( I have data of Brazil's exports and imports flow with 122 countries, from 2009 to 2014):
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str3(ID_EXP ID_IMP) int(ID_NUM ANO) double(EXP_NRB DIST SCO_EXP SCO_IMP) byte(FRO LIN COL) "BRA" "AGO" 1 2009 152903849 6391.615 .6991869918699187 .8211382113821139 0 1 0 "BRA" "AGO" 1 2010 60699279 6391.615 .4796747967479675 .7317073170731707 0 1 0 "BRA" "AGO" 1 2011 61883975 6391.615 .5934959349593496 .5528455284552846 0 1 0 "BRA" "AGO" 1 2012 64203369 6391.615 .3821138211382114 .5528455284552846 0 1 0 "BRA" "AGO" 1 2013 75264517 6391.615 .3821138211382114 .8373983739837398 0 1 0 "BRA" "AGO" 1 2014 85859091 6391.615 .2845528455284553 .4959349593495935 0 1 0 "BRA" "ALB" 2 2009 40668 9313.151 .6991869918699187 .8943089430894309 0 0 0 "BRA" "ALB" 2 2010 64360 9313.151 .4796747967479675 .959349593495935 0 0 0 "BRA" "ALB" 2 2011 1467 9313.151 .5934959349593496 .5447154471544715 0 0 0 "BRA" "ALB" 2 2012 451 9313.151 .3821138211382114 1 0 0 0 "BRA" "ALB" 2 2013 54 9313.151 .3821138211382114 .3902439024390244 0 0 0 "BRA" "ALB" 2 2014 1387 9313.151 .2845528455284553 .7154471544715447 0 0 0 "BRA" "ARE" 3 2009 83546921 11809.98 .6991869918699187 .4065040650406504 0 0 0 "BRA" "ARE" 3 2010 23600914 11809.98 .4796747967479675 .3170731707317073 0 0 0 "BRA" "ARE" 3 2011 68742508 11809.98 .5934959349593496 .42276422764227645 0 0 0 "BRA" "ARE" 3 2012 45312701 11809.98 .3821138211382114 .13821138211382114 0 0 0 "BRA" "ARE" 3 2013 58465966 11809.98 .3821138211382114 .45528455284552843 0 0 0 "BRA" "ARE" 3 2014 176933670 11809.98 .2845528455284553 .5691056910569106 0 0 0 "BRA" "ARG" 4 2009 1199662929 2089.281 .6991869918699187 .5691056910569106 1 0 0 "BRA" "ARG" 4 2010 1575475673 2089.281 .4796747967479675 .8292682926829268 1 0 0 "BRA" "ARG" 4 2011 1850370799 2089.281 .5934959349593496 .6747967479674797 1 0 0 "BRA" "ARG" 4 2012 1641368735 2089.281 .3821138211382114 .35772357723577236 1 0 0 "BRA" "ARG" 4 2013 1328340316 2089.281 .3821138211382114 .3170731707317073 1 0 0 "BRA" "ARG" 4 2014 1133068766 2089.281 .2845528455284553 .17886178861788618 1 0 0 "BRA" "ARM" 5 2009 49 11214.9 .6991869918699187 .3252032520325203 0 0 0 "BRA" "ARM" 5 2010 35856 11214.9 .4796747967479675 .7398373983739838 0 0 0 "BRA" "ARM" 5 2011 24 11214.9 .5934959349593496 .12195121951219512 0 0 0 "BRA" "ARM" 5 2012 6590 11214.9 .3821138211382114 .0975609756097561 0 0 0 "BRA" "ARM" 5 2013 49 11214.9 .3821138211382114 .6016260162601627 0 0 0 "BRA" "ARM" 5 2014 244 11214.9 .2845528455284553 .3252032520325203 0 0 0 "BRA" "AUS" 6 2009 22302246 13983.36 .6991869918699187 .3008130081300813 0 0 0 "BRA" "AUS" 6 2010 20209779 13983.36 .4796747967479675 .4959349593495935 0 0 0 "BRA" "AUS" 6 2011 22328151 13983.36 .5934959349593496 .3170731707317073 0 0 0 "BRA" "AUS" 6 2012 23223800 13983.36 .3821138211382114 .6991869918699187 0 0 0 "BRA" "AUS" 6 2013 17347535 13983.36 .3821138211382114 .4878048780487805 0 0 0 "BRA" "AUS" 6 2014 30864179 13983.36 .2845528455284553 .5528455284552846 0 0 0 "BRA" "AUT" 7 2009 5313013 9395.406 .6991869918699187 .7235772357723578 0 0 0 "BRA" "AUT" 7 2010 6330983 9395.406 .4796747967479675 .35772357723577236 0 0 0 "BRA" "AUT" 7 2011 5698958 9395.406 .5934959349593496 .8455284552845529 0 0 0 "BRA" "AUT" 7 2012 1664144 9395.406 .3821138211382114 .7073170731707317 0 0 0 "BRA" "AUT" 7 2013 1395217 9395.406 .3821138211382114 .4634146341463415 0 0 0 "BRA" "AUT" 7 2014 16199355 9395.406 .2845528455284553 .8699186991869918 0 0 0 "BRA" "AZE" 8 2009 63514 11569.65 .6991869918699187 .7804878048780488 0 0 0 "BRA" "AZE" 8 2010 0 11569.65 .4796747967479675 .967479674796748 0 0 0 "BRA" "AZE" 8 2011 602 11569.65 .5934959349593496 .34959349593495936 0 0 0 "BRA" "AZE" 8 2012 2265 11569.65 .3821138211382114 .3008130081300813 0 0 0 "BRA" "AZE" 8 2013 219612 11569.65 .3821138211382114 .7804878048780488 0 0 0 "BRA" "AZE" 8 2014 51436 11569.65 .2845528455284553 .4146341463414634 0 0 0 "BRA" "BEL" 9 2009 117516351 8977.309 .6991869918699187 .3983739837398374 0 0 0 "BRA" "BEL" 9 2010 111740378 8977.309 .4796747967479675 .14634146341463414 0 0 0 "BRA" "BEL" 9 2011 188609683 8977.309 .5934959349593496 .7317073170731707 0 0 0 "BRA" "BEL" 9 2012 164059354 8977.309 .3821138211382114 .7479674796747967 0 0 0 "BRA" "BEL" 9 2013 114426142 8977.309 .3821138211382114 .15447154471544716 0 0 0 "BRA" "BEL" 9 2014 125515938 8977.309 .2845528455284553 .7560975609756098 0 0 0 "BRA" "BEN" 10 2009 16094862 5893.825 .6991869918699187 .0975609756097561 0 0 0 "BRA" "BEN" 10 2010 4151754 5893.825 .4796747967479675 .07317073170731707 0 0 0 "BRA" "BEN" 10 2011 9704038 5893.825 .5934959349593496 .0975609756097561 0 0 0 "BRA" "BEN" 10 2012 1780809 5893.825 .3821138211382114 .14634146341463414 0 0 0 "BRA" "BEN" 10 2013 4600869 5893.825 .3821138211382114 .2032520325203252 0 0 0 "BRA" "BEN" 10 2014 280249 5893.825 .2845528455284553 .13008130081300814 0 0 0 "BRA" "BGD" 11 2009 6610295 15292.22 .6991869918699187 .8617886178861789 0 0 0 "BRA" "BGD" 11 2010 3745866 15292.22 .4796747967479675 .5853658536585366 0 0 0 "BRA" "BGD" 11 2011 2797106 15292.22 .5934959349593496 .7398373983739838 0 0 0 "BRA" "BGD" 11 2012 423424 15292.22 .3821138211382114 .8780487804878049 0 0 0 "BRA" "BGD" 11 2013 887481 15292.22 .3821138211382114 .7967479674796748 0 0 0 "BRA" "BGD" 11 2014 2398781 15292.22 .2845528455284553 .7642276422764228 0 0 0 "BRA" "BGR" 12 2009 618688 9768.308 .6991869918699187 .25203252032520324 0 0 0 "BRA" "BGR" 12 2010 673776 9768.308 .4796747967479675 .25203252032520324 0 0 0 "BRA" "BGR" 12 2011 192542 9768.308 .5934959349593496 .06504065040650407 0 0 0 "BRA" "BGR" 12 2012 270882 9768.308 .3821138211382114 .5609756097560976 0 0 0 "BRA" "BGR" 12 2013 206898 9768.308 .3821138211382114 .6422764227642277 0 0 0 "BRA" "BGR" 12 2014 255623 9768.308 .2845528455284553 .08130081300813008 0 0 0 "BRA" "BHR" 13 2009 449527 11384.75 .6991869918699187 .06504065040650407 0 0 0 "BRA" "BHR" 13 2010 406267 11384.75 .4796747967479675 .21138211382113822 0 0 0 "BRA" "BHR" 13 2011 856167 11384.75 .5934959349593496 .17886178861788618 0 0 0 "BRA" "BHR" 13 2012 10449143 11384.75 .3821138211382114 .3983739837398374 0 0 0 "BRA" "BHR" 13 2013 209478 11384.75 .3821138211382114 .008130081300813009 0 0 0 "BRA" "BHR" 13 2014 194060 11384.75 .2845528455284553 .12195121951219512 0 0 0 "BRA" "BIH" 14 2009 323008 9351.396 .6991869918699187 .2032520325203252 0 0 0 "BRA" "BIH" 14 2010 559483 9351.396 .4796747967479675 .11382113821138211 0 0 0 "BRA" "BIH" 14 2011 416766 9351.396 .5934959349593496 .04065040650406504 0 0 0 "BRA" "BIH" 14 2012 929 9351.396 .3821138211382114 .5772357723577236 0 0 0 "BRA" "BIH" 14 2013 58609 9351.396 .3821138211382114 .5121951219512195 0 0 0 "BRA" "BIH" 14 2014 98829 9351.396 .2845528455284553 .008130081300813009 0 0 0 "BRA" "BLR" 15 2009 196491 10486.81 .6991869918699187 .18699186991869918 0 0 0 "BRA" "BLR" 15 2010 200535 10486.81 .4796747967479675 .5121951219512195 0 0 0 "BRA" "BLR" 15 2011 341227 10486.81 .5934959349593496 .10569105691056911 0 0 0 "BRA" "BLR" 15 2012 477479 10486.81 .3821138211382114 .04065040650406504 0 0 0 "BRA" "BLR" 15 2013 391021 10486.81 .3821138211382114 .6504065040650406 0 0 0 "BRA" "BLR" 15 2014 171054 10486.81 .2845528455284553 .14634146341463414 0 0 0 "BRA" "BOL" 16 2009 212279880 2266.878 .6991869918699187 .4959349593495935 1 0 0 "BRA" "BOL" 16 2010 275644036 2266.878 .4796747967479675 .2032520325203252 1 0 0 "BRA" "BOL" 16 2011 318939530 2266.878 .5934959349593496 .2926829268292683 1 0 0 "BRA" "BOL" 16 2012 319023235 2266.878 .3821138211382114 .06504065040650407 1 0 0 "BRA" "BOL" 16 2013 347332761 2266.878 .3821138211382114 .6747967479674797 1 0 0 "BRA" "BOL" 16 2014 359426904 2266.878 .2845528455284553 .21138211382113822 1 0 0 "BRA" "BRN" 17 2009 51951 17221.85 .6991869918699187 .6341463414634146 0 0 0 "BRA" "BRN" 17 2010 39346 17221.85 .4796747967479675 .3902439024390244 0 0 0 "BRA" "BRN" 17 2011 49940 17221.85 .5934959349593496 .16260162601626016 0 0 0 "BRA" "BRN" 17 2012 1876 17221.85 .3821138211382114 .5853658536585366 0 0 0 end format %ty ANO
ID_EXP: ISO code for exporter
ID_IMP: ISO code for importer
ID_NUM: numerical id for ID_IMP
EXP_NRB: the value of non-resource based exports
DIST: the distance between ID_EXP and ID_IMP
SCO_EXP, SCO_IMP: score of the strictness of environmental regulation for ID_EXP and ID_IMP respectively
FRO, LIN, COL: equal to 1 if ID_EXP has a border with ID_IMP, speak the same language and have colonial ties respectively, 0 otherwise
The commands I am running are the following:
Code:
tsset ID_NUM ANO, yearly qui tab ID_NUM, gen(fe_ID_NUM) ppml EXP_NRB DIST SCO_EXP SCO_IMP FRO LIN COL fe_ID_NUM*, cluster(DIST)
Code:
Exports “NRB”
(1) | |
. | |
DIST | -0.00*** |
(0.00) | |
SCO_EXP | -0.59 |
(0.38) | |
SCO_IMP | 0.52** |
(0.24) | |
FRO | -0.13** |
(0.06) | |
LIN | -0.39*** |
(0.03) | |
Constant | 20.33*** |
(0.10) | |
Observations | 714 |
R2 | 0.894 |
Standard errors in parentheses * p < 0.10, ** p < 0.05, *** p < 0.01
1) Is the way I estimated my model correct? Because I have a 1xN model, I only estimated the importer fixed effects. Also, I clustered my errors based on the distance (should I use ln(distance)?). Is this correct?
2) Regarding the creation of ID_NUM, I simply assigned a sequence {1,2,3,...,n} of values to the column of importers, in such a way that AGO = 1, ALB = 2, etc. Is this correct?
3) Assuming the approach is correct, why would FRO and LIN be negative? In theory, countries that share a common border and/or language should trade more with each other, not less.
I appreciate immensely any help.
Kind regards,
Pedro
*ppml is a third-party command. You can install it using the following command:
Code:
ssc install ppml
0 Response to Help with gravity equation estimated using PPML (Stata 14.2)
Post a Comment