Hello All,
I am trying to find the impact of firms and other macro-economic variables on exports.
I am interested in the relationship between firms and exports across different regions (OECD / non-OECD).
To test this relationship, I use the following command:
The model shows there is a statistical difference between OECD and non-OECD regions, with firms leading to a decrease in exports for OECD and an increase in firms for non-OECD.
so I proceed with a marginsplot to visualize the relationship.

Would the margins plot be interpreted as:
- The effect of the level of development (OECD) on exports
- Exports increase at different speeds for OECD and non OECD nations
- Non-OECD nations will export significantly more, as firms increase
Isn’t there a conflict between the results of the model and the marginsplot?
Are both procedures correct for this type of model?
Data is attached.
Thanks in advance
I am trying to find the impact of firms and other macro-economic variables on exports.
I am interested in the relationship between firms and exports across different regions (OECD / non-OECD).
To test this relationship, I use the following command:
Code:
reghdfe Exports Firms RD Reg FDI i.OECD#(c.Firms),absorb (ccode year) cluster (ccode) . reghdfe Exports Firms RD Reg FDI i.OECD#(c.Firms),absorb (ccode year) cluster ( > ccode) (dropped 11 singleton observations) (MWFE estimator converged in 5 iterations) HDFE Linear regression Number of obs = 289 Absorbing 2 HDFE groups F( 5, 81) = 7.19 Statistics robust to heteroskedasticity Prob > F = 0.0000 R-squared = 0.9969 Adj R-squared = 0.9955 Within R-sq. = 0.0441 Number of clusters (ccode) = 82 Root MSE = 6.435e+09 (Std. err. adjusted for 82 clusters in ccode) ------------------------------------------------------------------------------ | Robust Exports | Coefficient std. err. t P>|t| [95% conf. interval] -------------+---------------------------------------------------------------- Firms | -151498.9 33226.54 -4.56 0.000 -217609.3 -85388.46 RD | 8.18e+09 5.16e+09 1.58 0.117 -2.09e+09 1.85e+10 Reg | -2.90e+09 4.56e+09 -0.64 0.526 -1.20e+10 6.17e+09 FDI | -2489519 6286609 -0.40 0.693 -1.50e+07 1.00e+07 | OECD#c.Firms | 1 | 127215.7 43671.96 2.91 0.005 40322.2 214109.2 | _cons | 2.96e+10 5.75e+09 5.14 0.000 1.81e+10 4.10e+10 ------------------------------------------------------------------------------ Absorbed degrees of freedom: -----------------------------------------------------+ Absorbed FE | Categories - Redundant = Num. Coefs | -------------+---------------------------------------| ccode | 82 82 0 *| year | 4 1 3 | -----------------------------------------------------+ * = FE nested within cluster; treated as redundant for DoF computation
so I proceed with a marginsplot to visualize the relationship.
Code:
reg Exports Firms RD Reg FDI OECD c.OECD#c.Firms Source | SS df MS Number of obs = 300 -------------+---------------------------------- F(6, 293) = 14.43 Model | 6.0689e+23 6 1.0115e+23 Prob > F = 0.0000 Residual | 2.0532e+24 293 7.0077e+21 R-squared = 0.2281 -------------+---------------------------------- Adj R-squared = 0.2123 Total | 2.6601e+24 299 8.8968e+21 Root MSE = 8.4e+10 -------------------------------------------------------------------------------- Exports | Coefficient Std. err. t P>|t| [95% conf. interval] ---------------+---------------------------------------------------------------- Firms | 72683.64 60353.12 1.20 0.229 -46096.93 191464.2 RD | 3.14e+10 6.75e+09 4.65 0.000 1.81e+10 4.46e+10 Reg | 1.17e+10 8.28e+09 1.41 0.158 -4.58e+09 2.80e+10 FDI | 2.10e+08 2.66e+08 0.79 0.431 -3.13e+08 7.33e+08 OECD | 3.98e+10 1.50e+10 2.66 0.008 1.04e+10 6.93e+10 | c.OECD#c.Firms | 374095.9 97669.49 3.83 0.000 181873.2 566318.6 | _cons | -4.86e+10 1.48e+10 -3.28 0.001 -7.78e+10 -1.94e+10 -------------------------------------------------------------------------------- margins, at (Firms=(0(10000)200000) OECD==(0 1)) ------------------------------------------------------------------------------ | Delta-method | Margin std. err. t P>|t| [95% conf. interval] -------------+---------------------------------------------------------------- _at | 1 | -5.99e+09 9.93e+09 -0.60 0.547 -2.55e+10 1.36e+10 2 | 3.38e+10 8.71e+09 3.89 0.000 1.67e+10 5.10e+10 3 | -5.27e+09 9.73e+09 -0.54 0.589 -2.44e+10 1.39e+10 4 | 3.83e+10 8.37e+09 4.58 0.000 2.18e+10 5.48e+10 5 | -4.54e+09 9.56e+09 -0.47 0.635 -2.34e+10 1.43e+10 6 | 4.28e+10 8.09e+09 5.29 0.000 2.69e+10 5.87e+10 7 | -3.81e+09 9.43e+09 -0.40 0.686 -2.24e+10 1.47e+10 8 | 4.72e+10 7.88e+09 6.00 0.000 3.17e+10 6.27e+10 9 | -3.09e+09 9.33e+09 -0.33 0.741 -2.15e+10 1.53e+10 10 | 5.17e+10 7.73e+09 6.69 0.000 3.65e+10 6.69e+10 11 | -2.36e+09 9.28e+09 -0.25 0.799 -2.06e+10 1.59e+10 12 | 5.62e+10 7.67e+09 7.33 0.000 4.11e+10 7.13e+10 13 | -1.63e+09 9.26e+09 -0.18 0.860 -1.99e+10 1.66e+10 14 | 6.06e+10 7.68e+09 7.90 0.000 4.55e+10 7.58e+10 15 | -9.06e+08 9.28e+09 -0.10 0.922 -1.92e+10 1.74e+10 16 | 6.51e+10 7.77e+09 8.38 0.000 4.98e+10 8.04e+10 17 | -1.79e+08 9.34e+09 -0.02 0.985 -1.86e+10 1.82e+10 18 | 6.96e+10 7.93e+09 8.77 0.000 5.40e+10 8.52e+10 19 | 5.48e+08 9.44e+09 0.06 0.954 -1.80e+10 1.91e+10 20 | 7.40e+10 8.17e+09 9.07 0.000 5.80e+10 9.01e+10 21 | 1.27e+09 9.57e+09 0.13 0.894 -1.76e+10 2.01e+10 22 | 7.85e+10 8.46e+09 9.28 0.000 6.19e+10 9.52e+10 23 | 2.00e+09 9.74e+09 0.21 0.837 -1.72e+10 2.12e+10 24 | 8.30e+10 8.82e+09 9.41 0.000 6.56e+10 1.00e+11 25 | 2.73e+09 9.95e+09 0.27 0.784 -1.69e+10 2.23e+10 26 | 8.75e+10 9.22e+09 9.48 0.000 6.93e+10 1.06e+11 27 | 3.46e+09 1.02e+10 0.34 0.735 -1.66e+10 2.35e+10 28 | 9.19e+10 9.67e+09 9.50 0.000 7.29e+10 1.11e+11 29 | 4.18e+09 1.05e+10 0.40 0.689 -1.64e+10 2.48e+10 30 | 9.64e+10 1.02e+10 9.48 0.000 7.64e+10 1.16e+11 31 | 4.91e+09 1.07e+10 0.46 0.648 -1.62e+10 2.61e+10 32 | 1.01e+11 1.07e+10 9.44 0.000 7.98e+10 1.22e+11 33 | 5.64e+09 1.11e+10 0.51 0.611 -1.61e+10 2.74e+10 34 | 1.05e+11 1.12e+10 9.37 0.000 8.32e+10 1.27e+11 35 | 6.36e+09 1.14e+10 0.56 0.577 -1.61e+10 2.88e+10 36 | 1.10e+11 1.18e+10 9.29 0.000 8.65e+10 1.33e+11 37 | 7.09e+09 1.18e+10 0.60 0.547 -1.61e+10 3.03e+10 38 | 1.14e+11 1.24e+10 9.21 0.000 8.98e+10 1.39e+11 39 | 7.82e+09 1.22e+10 0.64 0.521 -1.61e+10 3.17e+10 40 | 1.19e+11 1.30e+10 9.11 0.000 9.31e+10 1.44e+11 41 | 8.54e+09 1.25e+10 0.68 0.497 -1.62e+10 3.32e+10 42 | 1.23e+11 1.37e+10 9.02 0.000 9.63e+10 1.50e+11 ------------------------------------------------------------------------------ marginsplot
Would the margins plot be interpreted as:
- The effect of the level of development (OECD) on exports
- Exports increase at different speeds for OECD and non OECD nations
- Non-OECD nations will export significantly more, as firms increase
Isn’t there a conflict between the results of the model and the marginsplot?
Are both procedures correct for this type of model?
Data is attached.
Thanks in advance
Comment