Hello everyone,

I have the following doubt, and would really appreciate any help.

I am trying to quantify the impact of FTAs on the bilateral stock of migrants between two countries. For this, I have constructed a database which includes the stocks of migrants in 5-year intervals from 1980 to 2010, matched with the FTAs that affect each country-combination and and several bilateral variables typical in the gravity setting (distance, commmon language, etc.). I have generated country-year FE (i.e. destination country-time and origin-country-time FE). Below you can see a selection of the variables in my dataset (the ones relevant in my estimations):


Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input float id int year double tot str14 destination str32 origin str7 ccode_origin str3 ccode_destination str91 agreement byte(contig comlang_off fta_wto) float(exp_time imp_time ln_gdp_diff_cap ln_pop_o ln_pop_d ln_distw ln_initial_stock eu wto_member)
 1 1980     0 "Australia" "Andorra"             "ADO" "AUS" "NONE" . . .   1 1           .          .         .        .         0 . .
 1 1985     0 "Australia" "Andorra"             "ADO" "AUS" "NONE" . . .   2 2           .          .         .        .         0 . .
 1 1990     0 "Australia" "Andorra"             "ADO" "AUS" "NONE" . . .   3 3           .          .         .        .         0 . .
 1 1995     3 "Australia" "Andorra"             "ADO" "AUS" "NONE" . . .   4 4           .          .         .        .         0 . .
 1 2000     9 "Australia" "Andorra"             "ADO" "AUS" "NONE" . . .   5 5           .          .         .        .         0 . .
 1 2005     9 "Australia" "Andorra"             "ADO" "AUS" "NONE" . . .   6 6           .          .         .        .         0 . .
 1 2010    10 "Australia" "Andorra"             "ADO" "AUS" "NONE" . . .   7 7           .          .         .        .         0 . .
 2 1980     0 "Australia" "Afghanistan"         "AFG" "AUS" "NONE" 0 0 0   8 1    3.607467   2.578733  2.687303 9.313451         0 0 0
 2 1985     0 "Australia" "Afghanistan"         "AFG" "AUS" "NONE" 0 0 0   9 2    3.964179  2.4448636  2.757348 9.313451         0 0 0
 2 1990  1559 "Australia" "Afghanistan"         "AFG" "AUS" "NONE" 0 0 0  10 3           .  2.4622514 2.8370354 9.313451         0 0 0
 2 1995  3301 "Australia" "Afghanistan"         "AFG" "AUS" "NONE" 0 0 0  11 4           .  2.8671074  2.894364 9.313451         0 0 0
 2 2000  6645 "Australia" "Afghanistan"         "AFG" "AUS" "NONE" 0 0 0  12 5           .   3.025066  2.952459 9.313451         0 0 0
 2 2005  7242 "Australia" "Afghanistan"         "AFG" "AUS" "NONE" 0 0 0  13 6    4.902947  3.2132945   3.01528 9.313451         0 0 0
 2 2010  7721 "Australia" "Afghanistan"         "AFG" "AUS" "NONE" 0 0 0  14 7     4.52509   3.346312  3.092487 9.313451         0 0 0
 3 1980     0 "Australia" "Angola"              "AGO" "AUS" "NONE" 0 0 0  15 1     2.57005  2.0330234  2.687303  9.46923         0 0 0
 3 1985     0 "Australia" "Angola"              "AGO" "AUS" "NONE" 0 0 0  16 2    2.723525  2.2042716  2.757348  9.46923         0 0 0
 3 1990   225 "Australia" "Angola"              "AGO" "AUS" "NONE" 0 0 0  17 3    2.909733  2.3354244 2.8370354  9.46923         0 0 0
 3 1995   261 "Australia" "Angola"              "AGO" "AUS" "NONE" 0 0 0  18 4    3.890078   2.493615  2.894364  9.46923         0 0 1
 3 2000   342 "Australia" "Angola"              "AGO" "AUS" "NONE" 0 0 0  19 5   3.4979475   2.633681  2.952459  9.46923         0 0 1
 3 2005   380 "Australia" "Angola"              "AGO" "AUS" "NONE" 0 0 0  20 6   2.9917684   2.806046   3.01528  9.46923         0 0 1
 3 2010   418 "Australia" "Angola"              "AGO" "AUS" "NONE" 0 0 0  21 7    2.507893  2.9729304  3.092487  9.46923         0 0 1
 4 1980  1230 "Australia" "Albania"             "ALB" "AUS" "NONE" 0 0 0  22 1   2.8120255   .9828262  2.687303 9.629609  6.777647 0 0
 4 1985  1027 "Australia" "Albania"             "ALB" "AUS" "NONE" 0 0 0  23 2    2.847914  1.0867968  2.757348 9.629609  6.777647 0 0
 4 1990   892 "Australia" "Albania"             "ALB" "AUS" "NONE" 0 0 0  24 3    3.349706  1.1898359 2.8370354 9.629609  6.777647 0 0
 4 1995   941 "Australia" "Albania"             "ALB" "AUS" "NONE" 0 0 0  25 4    3.287482   1.159326  2.894364 9.629609  6.777647 0 0
 4 2000  1170 "Australia" "Albania"             "ALB" "AUS" "NONE" 0 0 0  26 5    2.898926  1.1278561  2.952459 9.629609  6.777647 0 1
 4 2005  1234 "Australia" "Albania"             "ALB" "AUS" "NONE" 0 0 0  27 6    2.496994   1.096184   3.01528 9.629609  6.777647 0 1
 4 2010  1258 "Australia" "Albania"             "ALB" "AUS" "NONE" 0 0 0  28 7    2.518265  1.0496577  3.092487 9.629609  6.777647 0 1
 5 1980  4784 "Australia" "Argentina"           "ARG" "AUS" "NONE" 0 0 0  29 1   1.3143656   3.336486  2.687303  9.39637   7.79111 0 1
 5 1985  5815 "Australia" "Argentina"           "ARG" "AUS" "NONE" 0 0 0  30 2   1.3672258   3.412481  2.757348  9.39637   7.79111 0 1
 5 1990  7369 "Australia" "Argentina"           "ARG" "AUS" "NONE" 0 0 0  31 3   1.4363997   3.485075 2.8370354  9.39637   7.79111 0 1
 5 1995  8079 "Australia" "Argentina"           "ARG" "AUS" "NONE" 0 0 0  32 4    .8195249    3.55057  2.894364  9.39637   7.79111 0 1
 5 2000  9251 "Australia" "Argentina"           "ARG" "AUS" "NONE" 0 0 0  33 5    .8426481   3.608295  2.952459  9.39637   7.79111 0 1
 5 2005 10320 "Australia" "Argentina"           "ARG" "AUS" "NONE" 0 0 0  34 6   1.7739726   3.654491   3.01528  9.39637   7.79111 0 1
 5 2010 11330 "Australia" "Argentina"           "ARG" "AUS" "NONE" 0 0 0  35 7   1.5085126   3.698192  3.092487  9.39637   7.79111 0 1
 6 1980   198 "Australia" "Armenia"             "ARM" "AUS" "NONE" 0 0 0  36 1           .  1.1302072  2.687303 9.487109 4.6821313 0 0
 6 1985   181 "Australia" "Armenia"             "ARM" "AUS" "NONE" 0 0 0  37 2           .  1.2057154  2.757348 9.487109 4.6821313 0 0
 6 1990   736 "Australia" "Armenia"             "ARM" "AUS" "NONE" 0 0 0  38 3   3.3540676   1.265452 2.8370354 9.487109 4.6821313 0 0
 6 1995   572 "Australia" "Armenia"             "ARM" "AUS" "NONE" 0 0 0  39 4     3.80003  1.1703663  2.894364 9.487109 4.6821313 0 0
 6 2000   712 "Australia" "Armenia"             "ARM" "AUS" "NONE" 0 0 0  40 5   3.5515285  1.1236619  2.952459 9.487109 4.6821313 0 0
 6 2005   798 "Australia" "Armenia"             "ARM" "AUS" "NONE" 0 0 0  41 6    3.040486  1.1035722   3.01528 9.487109 4.6821313 0 1
 6 2010   882 "Australia" "Armenia"             "ARM" "AUS" "NONE" 0 0 0  42 7    2.808043  1.0863696  3.092487 9.487109 4.6821313 0 1
 7 1980     0 "Australia" "Antigua and Barbuda" "ATG" "AUS" "NONE" 0 1 0  43 1   1.8728904  -2.654969  2.687303 9.718523         0 0 0
 7 1985     0 "Australia" "Antigua and Barbuda" "ATG" "AUS" "NONE" 0 1 0  44 2   1.3149847  -2.721987  2.757348 9.718523         0 0 0
 7 1990    15 "Australia" "Antigua and Barbuda" "ATG" "AUS" "NONE" 0 1 0  45 3   1.0580324  -2.782138 2.8370354 9.718523         0 0 1
 7 1995    18 "Australia" "Antigua and Barbuda" "ATG" "AUS" "NONE" 0 1 0  46 4   1.0354974  -2.683128  2.894364 9.718523         0 0 1
 7 2000    17 "Australia" "Antigua and Barbuda" "ATG" "AUS" "NONE" 0 1 0  47 5    .7637718 -2.5555694  2.952459 9.718523         0 0 1
 7 2005    20 "Australia" "Antigua and Barbuda" "ATG" "AUS" "NONE" 0 1 0  48 6   1.0346985 -2.4941695   3.01528 9.718523         0 0 1
 7 2010    25 "Australia" "Antigua and Barbuda" "ATG" "AUS" "NONE" 0 1 0  49 7    1.381128 -2.4391725  3.092487 9.718523         0 0 1
 8 1980 20622 "Australia" "Austria"             "AUT" "AUS" "NONE" 0 0 0  57 1  -.06236241  2.0214725  2.687303 9.655565  9.328301 0 1
 8 1985 20763 "Australia" "Austria"             "AUT" "AUS" "NONE" 0 0 0  58 2    .2230513  2.0235302  2.757348 9.655565  9.328301 0 1
 8 1990 20488 "Australia" "Austria"             "AUT" "AUS" "NONE" 0 0 0  59 3  -.17144334  2.0383396 2.8370354 9.655565  9.328301 0 1
 8 1995 18968 "Australia" "Austria"             "AUT" "AUS" "NONE" 0 0 0  60 4   -.3958077  2.0729554  2.894364 9.655565  9.328301 0 1
 8 2000 18403 "Australia" "Austria"             "AUT" "AUS" "NONE" 0 0 0  61 5  -.12358955  2.0808864  2.952459 9.655565  9.328301 0 1
 8 2005 19756 "Australia" "Austria"             "AUT" "AUS" "NONE" 0 0 0  62 6  -.11767209  2.1075222   3.01528 9.655565  9.328301 0 1
 8 2010 20808 "Australia" "Austria"             "AUT" "AUS" "NONE" 0 0 0  63 7   .10915694  2.1270132  3.092487 9.655565  9.328301 0 1
 9 1980    15 "Australia" "Azerbaijan"          "AZE" "AUS" "NONE" 0 0 0  64 1           .  1.8187243  2.687303 9.462084 2.1972246 0 0
 9 1985    15 "Australia" "Azerbaijan"          "AZE" "AUS" "NONE" 0 0 0  65 2           .  1.8982354  2.757348 9.462084 2.1972246 0 0
 9 1990   121 "Australia" "Azerbaijan"          "AZE" "AUS" "NONE" 0 0 0  66 3    2.689629  1.9683703 2.8370354 9.462084 2.1972246 0 0
 9 1995    50 "Australia" "Azerbaijan"          "AZE" "AUS" "NONE" 0 0 0  67 4    3.937101  2.0392704  2.894364 9.462084 2.1972246 0 0
 9 2000   118 "Australia" "Azerbaijan"          "AZE" "AUS" "NONE" 0 0 0  68 5   3.4987595   2.085498  2.952459 9.462084 2.1972246 0 0
 9 2005   133 "Australia" "Azerbaijan"          "AZE" "AUS" "NONE" 0 0 0  69 6   3.0698476  2.1272612   3.01528 9.462084 2.1972246 0 0
 9 2010   150 "Australia" "Azerbaijan"          "AZE" "AUS" "NONE" 0 0 0  70 7    2.182197  2.2032433  3.092487 9.462084 2.1972246 0 0
10 1980     0 "Australia" "Burundi"             "BDI" "AUS" "NONE" 0 0 0  71 1    3.822308  1.4174387  2.687303  9.40385         0 0 1
10 1985     0 "Australia" "Burundi"             "BDI" "AUS" "NONE" 0 0 0  72 2   3.8602784   1.563217  2.757348  9.40385         0 0 1
10 1990    15 "Australia" "Burundi"             "BDI" "AUS" "NONE" 0 0 0  73 3     4.50232   1.723815 2.8370354  9.40385         0 0 1
10 1995    12 "Australia" "Burundi"             "BDI" "AUS" "NONE" 0 0 0  74 4    4.839501  1.8261485  2.894364  9.40385         0 0 1
10 2000    18 "Australia" "Burundi"             "BDI" "AUS" "NONE" 0 0 0  75 5    5.112754  1.8982623  2.952459  9.40385         0 0 1
10 2005    20 "Australia" "Burundi"             "BDI" "AUS" "NONE" 0 0 0  76 6    5.465685  2.0503206   3.01528  9.40385         0 0 1
10 2010    23 "Australia" "Burundi"             "BDI" "AUS" "NONE" 0 0 0  77 7    5.463675  2.2227573  3.092487  9.40385         0 0 1
11 1980  3258 "Australia" "Belgium"             "BEL" "AUS" "NONE" 0 0 0  78 1   -.2370437  2.2884092  2.687303 9.700097   7.40062 0 1
11 1985  3654 "Australia" "Belgium"             "BEL" "AUS" "NONE" 0 0 0  79 2    .2638566  2.2883146  2.757348 9.700097   7.40062 0 1
11 1990  4016 "Australia" "Belgium"             "BEL" "AUS" "NONE" 0 0 0  80 3  -.12653029  2.2993176 2.8370354 9.700097   7.40062 0 1
11 1995  4009 "Australia" "Belgium"             "BEL" "AUS" "NONE" 0 0 0  81 4   -.3368965  2.3161736  2.894364 9.700097   7.40062 0 1
11 2000  4321 "Australia" "Belgium"             "BEL" "AUS" "NONE" 0 0 0  82 5 -.066290274  2.3273997  2.952459 9.700097   7.40062 0 1
11 2005  4810 "Australia" "Belgium"             "BEL" "AUS" "NONE" 0 0 0  83 6  -.08270735  2.3493366   3.01528 9.700097   7.40062 0 1
11 2010  5289 "Australia" "Belgium"             "BEL" "AUS" "NONE" 0 0 0  84 7    .1551092   2.390621  3.092487 9.700097   7.40062 0 1
12 1980     0 "Australia" "Benin"               "BEN" "AUS" "NONE" 0 0 0  85 1    3.294166  1.3131924  2.687303 9.630884         0 0 1
12 1985     0 "Australia" "Benin"               "BEN" "AUS" "NONE" 0 0 0  86 2    3.847755  1.4556485  2.757348 9.630884         0 0 1
12 1990     0 "Australia" "Benin"               "BEN" "AUS" "NONE" 0 0 0  87 3    3.839346   1.609692 2.8370354 9.630884         0 0 1
12 1995     0 "Australia" "Benin"               "BEN" "AUS" "NONE" 0 0 0  88 4   4.0285916  1.7893662  2.894364 9.630884         0 0 1
12 2000    16 "Australia" "Benin"               "BEN" "AUS" "NONE" 0 0 0  89 5    4.156149  1.9386505  2.952459 9.630884         0 0 1
12 2005    17 "Australia" "Benin"               "BEN" "AUS" "NONE" 0 0 0  90 6   4.1562023   2.101981   3.01528 9.630884         0 0 1
12 2010    17 "Australia" "Benin"               "BEN" "AUS" "NONE" 0 0 0  91 7   4.3184686  2.2523227  3.092487 9.630884         0 0 1
13 1980     0 "Australia" "Burkina Faso"        "BFA" "AUS" "NONE" 0 0 0  92 1     3.58461  1.9202758  2.687303 9.675223         0 0 1
13 1985     0 "Australia" "Burkina Faso"        "BFA" "AUS" "NONE" 0 0 0  93 2    4.041782  2.0448387  2.757348 9.675223         0 0 1
13 1990     0 "Australia" "Burkina Faso"        "BFA" "AUS" "NONE" 0 0 0  94 3   3.9467635  2.1760046 2.8370354 9.675223         0 0 1
13 1995     6 "Australia" "Burkina Faso"        "BFA" "AUS" "NONE" 0 0 0  95 4   4.4584155  2.3115325  2.894364 9.675223         0 0 1
13 2000    10 "Australia" "Burkina Faso"        "BFA" "AUS" "NONE" 0 0 0  96 5     4.56776    2.45169  2.952459 9.675223         0 0 1
13 2005    11 "Australia" "Burkina Faso"        "BFA" "AUS" "NONE" 0 0 0  97 6   4.4251833    2.59689   3.01528 9.675223         0 0 1
13 2010    14 "Australia" "Burkina Faso"        "BFA" "AUS" "NONE" 0 0 0  98 7    4.470631  2.7434356  3.092487 9.675223         0 0 1
14 1980   493 "Australia" "Bangladesh"          "BGD" "AUS" "NONE" 0 0 0  99 1    3.837249  4.4127793  2.687303 9.067316  5.680172 0 1
14 1985   690 "Australia" "Bangladesh"          "BGD" "AUS" "NONE" 0 0 0 100 2    3.909851   4.546351  2.757348 9.067316  5.680172 0 1
14 1990  1648 "Australia" "Bangladesh"          "BGD" "AUS" "NONE" 0 0 0 101 3    4.173528  4.6764283 2.8370354 9.067316  5.680172 0 1
14 1995  3503 "Australia" "Bangladesh"          "BGD" "AUS" "NONE" 0 0 0 102 4   4.1641855   4.786404  2.894364 9.067316  5.680172 0 1
14 2000  6266 "Australia" "Bangladesh"          "BGD" "AUS" "NONE" 0 0 0 103 5   4.1086874   4.885701  2.952459 9.067316  5.680172 0 1
14 2005  7112 "Australia" "Bangladesh"          "BGD" "AUS" "NONE" 0 0 0 104 6    4.391068   4.963789   3.01528 9.067316  5.680172 0 1
14 2010  8003 "Australia" "Bangladesh"          "BGD" "AUS" "NONE" 0 0 0 105 7   4.2181625    5.01811  3.092487 9.067316  5.680172 0 1
15 1980  1525 "Australia" "Bulgaria"            "BGR" "AUS" "NONE" 0 0 0 106 1    1.505199    2.18172  2.687303 9.603973  6.943122 0 0
15 1985  1586 "Australia" "Bulgaria"            "BGR" "AUS" "NONE" 0 0 0 107 2    1.763892  2.1928313  2.757348 9.603973  6.943122 0 0
end
------------------ copy up to and including the previous line ------------------

I am attempting to fit a PPML with fixed effects model, so I am running this:

. ppmlhdfe tot fta_wto ln_gdp_diff_cap ln_distw wto_member ln_initial_stock contig colony comlang_off, absorb (imp_time exp_time) cluster(id)
note: 2 variables omitted because of collinearity: ln_gdp_diff_cap wto_member
Iteration 1: deviance = 2.690e+08 itol = 1.0e-04 subiters = 6 min(eta) = -5.33 [p ]
Iteration 2: deviance = 1.361e+08 eps = 9.77e-01 itol = 1.0e-04 subiters = 5 min(eta) = -6.84 [ ]
Iteration 3: deviance = 9.961e+07 eps = 3.66e-01 itol = 1.0e-04 subiters = 5 min(eta) = -8.55 [ ]
Iteration 4: deviance = 9.266e+07 eps = 7.51e-02 itol = 1.0e-04 subiters = 5 min(eta) = -9.82 [ ]
Iteration 5: deviance = 9.181e+07 eps = 9.27e-03 itol = 1.0e-04 subiters = 5 min(eta) = -10.59 [ ]
Iteration 6: deviance = 9.169e+07 eps = 1.25e-03 itol = 1.0e-04 subiters = 6 min(eta) = -11.61 [p ]
Iteration 7: deviance = 9.168e+07 eps = 1.53e-04 itol = 1.0e-04 subiters = 3 min(eta) = -12.26 [ ]
Iteration 8: deviance = 9.167e+07 eps = 1.50e-05 itol = 1.0e-04 subiters = 2 min(eta) = -12.81 [ ]
Iteration 9: deviance = 9.167e+07 eps = 1.21e-06 itol = 1.0e-06 subiters = 3 min(eta) = -13.16 [ ]
Iteration 10: deviance = 9.167e+07 eps = 1.07e-07 itol = 1.0e-06 subiters = 2 min(eta) = -13.42 [ ]
Iteration 11: deviance = 9.167e+07 eps = 7.21e-09 itol = 1.0e-08 subiters = 11 min(eta) = -13.62 [ps ]
Iteration 12: deviance = 9.167e+07 eps = 7.00e-11 itol = 1.0e-10 subiters = 13 min(eta) = -13.64 [pso]
Iteration 13: deviance = 9.167e+07 eps = 2.93e-15 itol = 1.0e-10 subiters = 13 min(eta) = -13.64 [pso]
------------------------------------------------------------------------------------------------------------
(legend: p: exact partial-out s: exact solver o: epsilon below tolerance)
Converged in 13 iterations and 79 HDFE sub-iterations (tol = 1.0e-08)

HDFE PPML regression No. of obs = 23,104
Absorbing 2 HDFE groups Residual df = 3,514
Statistics robust to heteroskedasticity Wald chi2(6) = 1511.85
Deviance = 91674760.25 Prob > chi2 = 0.0000
Log pseudolikelihood = -45909225.15 Pseudo R2 = 0.9459

Number of clusters (id) = 3,515
(Std. Err. adjusted for 3,515 clusters in id)
----------------------------------------------------------------------------------
| Robust
tot | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-----------------+----------------------------------------------------------------
fta_wto | .0066152 .0802348 0.08 0.934 -.1506422 .1638726
ln_gdp_diff_cap | 0 (omitted)
ln_distw | -.2374152 .0624547 -3.80 0.000 -.3598241 -.1150062
wto_member | 0 (omitted)
ln_initial_stock | .5596938 .0337345 16.59 0.000 .4935755 .6258122
contig | .2051182 .114665 1.79 0.074 -.019621 .4298575
colony | .2407653 .1003744 2.40 0.016 .0440351 .4374954
comlang_off | .2905784 .103064 2.82 0.005 .0885766 .4925801
_cons | 7.922486 .7559825 10.48 0.000 6.440788 9.404185
----------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
Absorbed FE | Categories - Redundant = Num. Coefs |
-------------+---------------------------------------|
imp_time | 133 0 133 |
exp_time | 1223 7 1216 |
-----------------------------------------------------+


As you can see, two variables are ommitted due to collinearity with the fixed effects (I know this because if I run the same especification, they are not dropped, although the sign on the other coefficients flips in a way that the coefficients are counter intuitive).

I constructed the GDP per capita differential as the ln of the GDP per capita in the destination country over the GDP per capita in the origin country. The fta_wto variable simply indicates whether the two countries share a RTA.

Could you help me on how to proceed, please? Is there any possibility that I am incorrectly specifying the model?

Many thanks in advance,

Julia