I have panel data for 34 countries and four independent variables to determine their impacts on Export performances (the data is attached below). fdi should be lagged by one year to show the effect of fdi on export for the current year. And I started estimation using FE, RE but I am not comfortable with the models. Please who can help me on the panel data estimation?


. xtset countrycode year
panel variable: countrycode (strongly balanced)
time variable: year, 2000 to 2018
delta: 1 unit

. gen fdi_L1=fdi[n-1]

. replace fdi_L1=L1.fdi
(644 real changes made, 34 to missing)

. xtreg export L1.fdi gdp nbtot exrate, fe

Fixed-effects (within) regression Number of obs = 612
Group variable: countrycode Number of groups = 34

R-sq: within = 0.6685 Obs per group: min = 18
between = 0.9327 avg = 18.0
overall = 0.8798 max = 18

F(4,574) = 289.35
corr(u_i, Xb) = 0.4697 Prob > F = 0.0000

------------------------------------------------------------------------------
export | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
fdi |
L1. | 1.13e-06 4.34e-07 2.60 0.010 2.75e-07 1.98e-06
|
gdp | .1903316 .0073299 25.97 0.000 .1759349 .2047283
nbtot | 9.18e+07 9167326 10.01 0.000 7.38e+07 1.10e+08
exrate | 256485.6 395204.7 0.65 0.517 -519738.1 1032709
_cons | -8.42e+09 1.12e+09 -7.51 0.000 -1.06e+10 -6.22e+09
-------------+----------------------------------------------------------------
sigma_u | 5.668e+09
sigma_e | 5.204e+09
rho | .54257873 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(33, 574) = 11.86 Prob > F = 0.0000

. est store fe

. xtreg export L1.fdi gdp nbtot exrate, re

Random-effects GLS regression Number of obs = 612
Group variable: countrycode Number of groups = 34

R-sq: within = 0.6658 Obs per group: min = 18
between = 0.9432 avg = 18.0
overall = 0.8891 max = 18

Wald chi2(4) = 1776.34
corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000

------------------------------------------------------------------------------
export | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
fdi |
L1. | 1.89e-06 4.14e-07 4.57 0.000 1.08e-06 2.70e-06
|
gdp | .2045409 .0061506 33.26 0.000 .1924859 .2165959
nbtot | 8.26e+07 8694212 9.50 0.000 6.56e+07 9.97e+07
exrate | 77512.02 333526.8 0.23 0.816 -576188.4 731212.5
_cons | -7.70e+09 1.26e+09 -6.11 0.000 -1.02e+10 -5.23e+09
-------------+----------------------------------------------------------------
sigma_u | 3.723e+09
sigma_e | 5.204e+09
rho | .33859025 (fraction of variance due to u_i)
------------------------------------------------------------------------------

. est store re

. hausman fe re

Note: the rank of the differenced variance matrix (2) does not equal the number of coefficients being tested (4); be sure this is what you expect, or there may be
problems computing the test. Examine the output of your estimators for anything unexpected and possibly consider scaling your variables so that the
coefficients are on a similar scale.

---- Coefficients ----
| (b) (B) (b-B) sqrt(diag(V_b-V_B))
| fe re Difference S.E.
-------------+----------------------------------------------------------------
fdi |
L1. | 1.13e-06 1.89e-06 -7.64e-07 1.31e-07
gdp | .1903316 .2045409 -.0142093 .0039871
nbtot | 9.18e+07 8.26e+07 9167895 2906984
exrate | 256485.6 77512.02 178973.6 212006.3
------------------------------------------------------------------------------
b = consistent under Ho and Ha; obtained from xtreg
B = inconsistent under Ha, efficient under Ho; obtained from xtreg

Test: Ho: difference in coefficients not systematic

chi2(2) = (b-B)'[(V_b-V_B)^(-1)](b-B)
= 11.16
Prob>chi2 = 0.0038