Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • xtreg vs. LSDV

    Dear statalists,

    I hope this question is not an oldie. Surprisingly, to me, i have not found any discussion on this in the forum posts. I tried to estimate threeway fixed effects via the xtreg and interaction expansion command. My understanding was that, even though they use different calculations, they should imply the same.

    However i get different results for the constant and the fe's
    Code:
    reg ln_fdi_stock $distcontrolsG i.importer i.exporter i.yr
    xtreg ln_fdi_stock $distcontrolsG i.yr i.exporter, fe i(importer)

    Code:
    importer |
    2 | 1.884145 .196537 9.59 0.000 1.498929 2.269362
    3 | 3.169294 .2131197 14.87 0.000 2.751575 3.587013
    4 | 3.461649 .1449207 23.89 0.000 3.177602 3.745696
    5 | -.4018992 .1574931 -2.55 0.011 -.7105888 -.0932095
    6 | 5.318759 .153963 34.55 0.000 5.016988 5.620529
    7 | 2.361348 .1466429 16.10 0.000 2.073925 2.648771
    8 | 1.028668 .1640239 6.27 0.000 .7071779 1.350158
    9 | 1.299722 .1537005 8.46 0.000 .9984658 1.600978
    10 | -.1517205 .1644365 -0.92 0.356 -.4740194 .1705783
    11 | 3.332578 .1442507 23.10 0.000 3.049844 3.615312
    12 | -.1590171 .316898 -0.50 0.616 -.7801434 .4621091
    13 | 1.310839 .1858917 7.05 0.000 .9464882 1.675191
    14 | .2286898 .160598 1.42 0.154 -.0860854 .5434651
    15 | .3745796 .1999689 1.87 0.061 -.0173634 .7665227
    ....
    _cons | 6.007166 .4020739 14.94 0.000 5.219093 6.795238
    
    
    2 | .6924308 .4718152 1.47 0.142 -.2323363 1.617198
    3 | 1.261118 .4470196 2.82 0.005 .384951 2.137285
    4 | 3.3261 .4298435 7.74 0.000 2.483598 4.168602
    5 | 4.476361 .3855753 11.61 0.000 3.720626 5.232096
    6 | 1.635004 .4659014 3.51 0.000 .7218282 2.54818
    7 | 6.781577 .3739167 18.14 0.000 6.048693 7.514461
    8 | 5.391401 .3730204 14.45 0.000 4.660273 6.122528
    9 | 1.816172 .3962854 4.58 0.000 1.039445 2.592899
    10 | 5.098008 .3776053 13.50 0.000 4.357894 5.838122
    11 | 3.316414 .3946715 8.40 0.000 2.54285 4.089978
    12 | 1.108172 .414883 2.67 0.008 .2949931 1.921351
    13 | 5.116808 .4005912 12.77 0.000 4.331641 5.901974
    14 | .4545641 .3969522 1.15 0.252 -.3234701 1.232598
    15 | 5.665018 .3720416 15.23 0.000 4.935809 6.394227
    ....
    _cons | 8.455639 .3865197 21.88 0.000 7.698052 9.213225
    Does anybody know what i might be missing here? If You need more output, please let me know.

    Many Thanks,
    Felix Stips
    Last edited by Felix Stips; 02 Dec 2014, 14:14.

  • #2
    Felix,

    you are correct, the two ways of estimating this model, de-meaning/within-estimator/fixed-effects and least square dummy variable estimator (LSDV), result in the same estimates. There are several things unclear with your post, which might explain your confusion.

    First, you wonder about differences in the constant terms. Note that, there is no constant in a fixed-effects (de-meaned) model, as the constant is wiped out by the de-meaning. What Stata reports is as a constant, is basically the mean average value for the fixed effects (see here).

    You then claim to observe differences in the fixed-effects and show us coefficients(?) for importer - but this is the variable identifying your panel units, so there cannot be any estimates for them in fixed-effects (de-meaned) model.

    Hope this gives you an idea. If not, please provide the full syntax (including definitions of macros) along with the full output (probably using estimates table.

    Best
    Daniel
    Last edited by daniel klein; 02 Dec 2014, 15:20.

    Comment


    • #3
      Hi Daniel,

      Thank You for Your quick reply. I use threeway fixed effects. So the xtreg version of the command (at least in theory) demeans over importer and then when i later use predict, xb i can have a "predict" (or rather get fitted values) that includes exporter and year fixed effects, but not the importer fixed effects. that was my original reasoning. I thought this could be easier than doing reg i.importer .. and then compute "predicting" by hand. And since the coefficients for the controls should be the same, why not also the additional dummies? I posted the code and output below (with a couple of dummies not posted, but i guessed they dont matter that much).

      Yes, I read this documentation. I guess i understood the formula (5)
      _ = _ = _ _ = yit - yi + y = a + (xit - xi + x)b + (eit - ei + v) + e seeing a as a "traditional" constant. Ok, so the two terms do not represent the same in the two approaches. But when You use "predict", they are still used in the same way y= _b[_a] + ln_dist*_b[_ln_dist] ... + _b[_Iexportery_1]* _Iexportery_1 + ...
      Are these fitted y's the same in both approaches? If in my case a is smaller for LSDV than for xtreg is this then compensated by higher values of the dummy coeffcients? Hope my doubts are clearer now.
      Code:
      global distcontrolsG ln_dist contig smctry both_landlocked /* geography */
      reg ln_fdi_stock $distcontrolsG i.importer i.exporter i.yr
      xtset importer
             panel variable:  importer (unbalanced)
      xtreg ln_fdi_stock $distcontrolsG i.yr i.exporter, fe i(importer)
      
      
      --------------------------------------------
                            (1)             (2)  
                   ln_fdi_stock    ln_fdi_stock  
      --------------------------------------------
      ln_dist            -1.193***       -1.193***
                       (0.0138)        (0.0138)  
      
      contig              0.681***        0.681***
                       (0.0435)        (0.0435)  
      
      smctry              0.820***        0.820***
                       (0.0693)        (0.0693)  
      
      both_landl~d       -1.069**        -1.727  
                        (0.442)         (1.830)  
      
      1.importer              0                  
                            (.)                  
      
      2.importer          1.878***                
                        (0.197)                  
      
      3.importer          3.162***                
                        (0.213)                  
      
      4.importer          3.460***                
                        (0.145)                  
      
      5.importer          0.630                  
                        (0.469)                  
      
      6.importer          5.315***                
                        (0.154)                  
      
      7.importer          3.392***                
                        (0.466)                  
      
      8.importer          2.059***                
                        (0.469)                  
      
      9.importer          1.299***                
                        (0.154)                  
      
      10.importer        -0.146                  
                        (0.164)                  
      
      11.importer         3.334***                
                        (0.144)                  
      
      12.importer        -0.152                  
                        (0.317)                  
      
      13.importer         2.337***                
                        (0.479)                  
      
      14.importer         0.239                  
                        (0.161)                  
      
      15.importer         1.383***                
                        (0.485)                  
      
      16.importer         4.869***                
                        (0.149)                  
      
      17.importer         1.604***                
                        (0.138)                  
      
      18.importer         2.714***                
                        (0.569)                  
      
      19.importer         0.782***                
                        (0.157)                  
      
      20.importer         0.564**                
                        (0.235)                  
      
      21.importer         4.327***                
                        (0.145)                  
      
      22.importer         4.029***                
                        (0.157)                  
      
      23.importer         4.972***                
                        (0.146)                  
      
      24.importer         2.840***                
                        (0.183)                  
      
      25.importer         1.683***                
                        (0.255)                  
      
      26.importer         1.366***                
                        (0.170)                  
      
      27.importer         0.602***                
                        (0.146)                  
      
      28.importer         2.798***                
                        (0.464)                  
      
      29.importer         1.126***                
                        (0.214)                  
      
      30.importer         0.981***                
                        (0.301)                  
      
      31.importer         3.231***                
                        (0.141)                  
      
      32.importer         1.512***                
                        (0.216)                  
      
      33.importer         1.914***                
                        (0.197)                  
      
      34.importer         2.185***                
                        (0.170)                  
      
      35.importer         1.313***                
                        (0.163)                  
      
      36.importer         0.703***                
                        (0.146)                  
      
      37.importer         1.191**                
                        (0.522)                  
      
      38.importer         1.754***                
                        (0.151)                  
      
      39.importer         4.486***                
                        (0.135)                  
      
      40.importer         2.203***                
                        (0.245)                  
      
      41.importer         1.004***                
                        (0.177)                  
      
      42.importer         3.884***                
                        (0.140)                  
      
      43.importer         0.876***                
                        (0.188)                  
      
      44.importer         1.661***                
                        (0.154)                  
      
      45.importer         1.417***                
                        (0.198)                  
      
      46.importer         0.777***                
                        (0.283)                  
      
      47.importer       -0.0534                  
                        (0.616)                  
      
      48.importer         1.085***                
                        (0.208)                  
      
      49.importer         4.333***                
                        (0.155)                  
      
      50.importer         3.019***                
                        (0.465)                  
      
      51.importer        -0.120                  
                        (0.179)                  
      
      52.importer         3.019***                
                        (0.149)                  
      
      53.importer         3.340***                
                        (0.160)                  
      
      54.importer         1.010***                
                        (0.191)                  
      
      55.importer         1.485***                
                        (0.294)                  
      
      56.importer         3.215***                
                        (0.155)                  
      
      57.importer         1.575***                
                        (0.160)                  
      
      58.importer         2.803***                
                        (0.138)                  
      
      59.importer         0.968***                
                        (0.274)                  
      
      60.importer         3.500***                
                        (0.150)                  
      
      61.importer         0.559***                
                        (0.191)                  
      
      62.importer         3.321***                
                        (0.465)                  
      
      63.importer         1.037***                
                        (0.187)                  
      
      64.importer         0.165                  
                        (0.207)                  
      
      65.importer         0.467                  
                        (0.478)                  
      
      66.importer         0.671***                
                        (0.145)                  
      
      67.importer         0.112                  
                        (0.217)                  
      
      68.importer         0.261                  
                        (0.552)                  
      
      69.importer         2.531***                
                        (0.195)                  
      
      70.importer         1.563***                
                        (0.198)                  
      
      71.importer         0.746***                
                        (0.144)                  
      
      72.importer         0.546***                
                        (0.191)                  
      
      73.importer         1.690***                
                        (0.481)                  
      
      74.importer         3.544***                
                        (0.162)                  
      
      75.importer         1.153**                
                        (0.495)                  
      
      76.importer         2.570***                
                        (0.158)                  
      
      77.importer         3.700***                
                        (0.150)                  
      
      78.importer         1.855***                
                        (0.467)                  
      
      79.importer         2.381***                
                        (0.165)                  
      
      80.importer         1.468***                
                        (0.196)                  
      
      81.importer         1.502***                
                        (0.249)                  
      
      82.importer         0.475**                
                        (0.240)                  
      
      83.importer        0.0481                  
                        (0.492)                  
      
      84.importer         4.017***                
                        (0.139)                  
      
      85.importer         3.547***                
                        (0.166)                  
      
      86.importer         0.251                  
                        (0.254)                  
      
      87.importer         2.330***                
                        (0.170)                  
      
      88.importer         2.164***                
                        (0.141)                  
      
      89.importer         1.694***                
                        (0.171)                  
      
      90.importer         2.059***                
                        (0.155)                  
      
      91.importer         2.800***                
                        (0.156)                  
      
      92.importer         0.974***                
                        (0.197)                  
      
      93.importer         1.867***                
                        (0.473)                  
      
      94.importer         2.329***                
                        (0.151)                  
      
      95.importer         1.983***                
                        (0.152)                  
      
      96.importer         2.655***                
                        (0.141)                  
      
      97.importer         2.221***                
                        (0.145)                  
      
      98.importer         2.049***                
                        (0.197)                  
      
      99.importer         3.093***                
                        (0.141)                  
      
      100.importer        3.747***                
                        (0.137)                  
      
      101.importer        2.004***                
                        (0.141)                  
      
      102.importer        3.240***                
                        (0.143)                  
      
      103.importer        0.386                  
                        (0.545)                  
      
      104.importer        3.068***                
                        (0.158)                  
      
      105.importer        0.289                  
                        (0.210)                  
      
      106.importer        1.003***                
                        (0.157)                  
      
      107.importer       -0.906***                
                        (0.345)                  
      
      108.importer        5.140***                
                        (0.150)                  
      
      109.importer        2.223***                
                        (0.467)                  
      
      110.importer        0.205                  
                        (0.149)                  
      
      111.importer        3.854***                
                        (0.140)                  
      
      112.importer        4.311***                
                        (0.146)                  
      
      113.importer        1.185***                
                        (0.216)                  
      
      114.importer        1.766***                
                        (0.276)                  
      
      115.importer        1.633***                
                        (0.542)                  
      
      116.importer        3.047***                
                        (0.155)                  
      
      117.importer        4.492***                
                        (0.466)                  
      
      118.importer      -0.0841                  
                        (0.232)                  
      
      119.importer        1.758***                
                        (0.529)                  
      
      120.importer        3.341***                
                        (0.149)                  
      
      121.importer        0.873*                  
                        (0.468)                  
      
      122.importer       -0.391                  
                        (0.274)                  
      
      123.importer        2.153***                
                        (0.222)                  
      
      124.importer        0.127                  
                        (0.198)                  
      
      125.importer        2.588***                
                        (0.141)                  
      
      126.importer        2.526***                
                        (0.480)                  
      
      127.importer        1.792***                
                        (0.138)                  
      
      128.importer        3.011***                
                        (0.163)                  
      
      129.importer        4.602***                
                        (0.142)                  
      
      130.importer        1.488***                
                        (0.145)                  
      
      131.importer        5.797***                
                        (0.139)                  
      
      132.importer        1.913***                
                        (0.178)                  
      
      133.importer        2.491***                
                        (0.497)                  
      
      134.importer        2.911***                
                        (0.166)                  
      
      135.importer        2.608***                
                        (0.173)                  
      
      136.importer        2.026***                
                        (0.250)                  
      
      137.importer        2.325***                
                        (0.474)                  
      
      138.importer        2.115***                
                        (0.511)                  
      
      1.exporter              0               0  
                            (.)             (.)  
      
      2.exporter         -0.346          -1.004  
                        (0.387)         (1.818)  
      
      3.exporter          0.205          -0.453  
                        (0.356)         (1.812)  
      
      4.exporter          2.268***        1.610  
                        (0.334)         (1.807)  
      
      5.exporter          3.425***        2.767  
                        (0.275)         (1.797)  
      
      6.exporter          1.645***        1.645***
                        (0.466)         (0.466)  
      
      7.exporter          5.727***        5.069***
                        (0.259)         (1.795)  
      
      8.exporter          5.367***        5.367***
                        (0.373)         (0.373)  
      
      9.exporter          1.790***        1.790***
                        (0.396)         (0.396)  
      
      10.exporter         4.047***        3.389*  
                        (0.264)         (1.796)  
      
      11.exporter         2.264***        1.606  
                        (0.288)         (1.799)  
      
      12.exporter        0.0559          -0.602  
                        (0.316)         (1.804)  
      
      13.exporter         4.064***        3.406*  
                        (0.296)         (1.801)  
      
      14.exporter        -0.591**        -1.249  
                        (0.291)         (1.800)  
      
      15.exporter         4.616***        3.958**
                        (0.256)         (1.794)  
      
      16.exporter         3.383***        2.725  
                        (0.287)         (1.799)  
      
      17.exporter         0.383          -0.275  
                        (0.559)         (1.862)  
      
      18.exporter         0.765           0.765  
                        (1.830)         (1.830)  
      
      19.exporter         0.499           0.499  
                        (0.481)         (0.481)  
      
      20.exporter         0.135          -0.523  
                        (0.340)         (1.808)  
      
      21.exporter         2.350***        2.350***
                        (0.447)         (0.447)  
      
      22.exporter         4.370***        3.712**
                        (0.260)         (1.795)  
      
      23.exporter         0.390          -0.268  
                        (0.375)         (1.815)  
      
      24.exporter        0.0149          -0.643  
                        (0.263)         (1.796)  
      
      25.exporter         0.775           0.775  
                        (0.637)         (0.637)  
      
      26.exporter        -0.419          -0.419  
                        (1.098)         (1.098)  
      
      27.exporter        -1.906***       -2.564  
                        (0.465)         (1.836)  
      
      28.exporter         1.668***        1.010  
                        (0.472)         (1.838)  
      
      29.exporter         6.014***        5.356***
                        (0.255)         (1.794)  
      
      30.exporter         0.531          -0.127  
                        (0.648)         (1.889)  
      
      31.exporter         1.006           1.006  
                        (0.771)         (0.771)  
      
      32.exporter         1.414**         1.414**
                        (0.604)         (0.604)  
      
      33.exporter         3.396***        2.738  
                        (0.270)         (1.796)  
      
      34.exporter         4.600***        3.942**
                        (0.253)         (1.794)  
      
      35.exporter         2.694***        2.036  
                        (0.290)         (1.800)  
      
      36.exporter         0.949*          0.291  
                        (0.576)         (1.867)  
      
      37.exporter         1.581***        0.923  
                        (0.512)         (1.849)  
      
      38.exporter         1.354***        0.696  
                        (0.302)         (1.801)  
      
      39.exporter         0.530**        -0.128  
                        (0.266)         (1.796)  
      
      40.exporter         3.585***        2.927  
                        (0.257)         (1.795)  
      
      41.exporter         2.277***        2.277***
                        (0.375)         (0.375)  
      
      42.exporter         1.458***        0.800  
                        (0.358)         (1.812)  
      
      43.exporter         1.169**         0.511  
                        (0.556)         (1.861)  
      
      44.exporter         0.965*          0.307  
                        (0.502)         (1.846)  
      
      45.exporter         4.491***        3.833**
                        (0.254)         (1.794)  
      
      47.exporter         1.197***        0.539  
                        (0.359)         (1.812)  
      
      48.exporter         1.317***        0.659  
                        (0.312)         (1.803)  
      
      49.exporter         1.978***        1.320  
                        (0.282)         (1.798)  
      
      50.exporter         0.444          -0.214  
                        (0.398)         (1.820)  
      
      51.exporter        -0.749          -1.407  
                        (1.811)         (2.537)  
      
      52.exporter         0.323          -0.335  
                        (1.296)         (2.199)  
      
      53.exporter         0.509*         -0.149  
                        (0.266)         (1.796)  
      
      54.exporter         1.648***        1.648***
                        (0.635)         (0.635)  
      
      55.exporter        -0.938          -1.596  
                        (1.292)         (2.196)  
      
      56.exporter         3.912***        3.254*  
                        (0.257)         (1.795)  
      
      57.exporter         6.314***        5.656***
                        (0.253)         (1.794)  
      
      58.exporter         0.167          -0.491  
                        (0.557)         (1.861)  
      
      59.exporter         1.400***        0.742  
                        (0.420)         (1.825)  
      
      60.exporter         2.177           1.519  
                        (1.810)         (2.536)  
      
      61.exporter         0.173          -0.485  
                        (0.342)         (1.809)  
      
      62.exporter         6.141***        5.483***
                        (0.253)         (1.794)  
      
      63.exporter         1.280***        0.622  
                        (0.374)         (1.815)  
      
      64.exporter         2.488***        1.830  
                        (0.263)         (1.795)  
      
      65.exporter         0.683*         0.0254  
                        (0.372)         (1.815)  
      
      66.exporter         1.887***        1.229  
                        (0.682)         (1.903)  
      
      67.exporter        -0.838          -1.496  
                        (0.725)         (1.915)  
      
      68.exporter         2.259*          1.601  
                        (1.293)         (2.197)  
      
      69.exporter        -1.974***       -2.632  
                        (0.596)         (1.873)  
      
      70.exporter        -1.001**        -1.659  
                        (0.389)         (1.818)  
      
      71.exporter         5.023***        4.365**
                        (0.260)         (1.795)  
      
      72.exporter         2.760***        2.760***
                        (0.375)         (0.375)  
      
      73.exporter         2.290***        1.632  
                        (0.261)         (1.795)  
      
      74.exporter         3.159***        2.501  
                        (0.258)         (1.795)  
      
      75.exporter         2.633***        1.975  
                        (0.274)         (1.797)  
      
      76.exporter         2.025***        1.367  
                        (0.283)         (1.799)  
      
      77.exporter         0.834**         0.176  
                        (0.347)         (1.810)  
      
      78.exporter         4.417***        3.759**
                        (0.259)         (1.795)  
      
      79.exporter         2.737***        2.079  
                        (0.257)         (1.795)  
      
      80.exporter         4.911***        4.253**
                        (0.254)         (1.794)  
      
      81.exporter         0.718*         0.0599  
                        (0.407)         (1.822)  
      
      82.exporter         6.686***        6.028***
                        (0.256)         (1.794)  
      
      83.exporter         1.219***        0.561  
                        (0.300)         (1.801)  
      
      84.exporter         3.037***        3.037***
                        (0.382)         (0.382)  
      
      85.exporter         1.738***        1.080  
                        (0.310)         (1.803)  
      
      86.exporter         3.540***        2.882  
                        (0.272)         (1.797)  
      
      87.exporter         1.452***        1.452***
                        (0.443)         (0.443)  
      
      88.exporter        -0.573          -0.573  
                        (0.492)         (0.492)  
      
      89.exporter         0.502*         -0.156  
                        (0.268)         (1.796)  
      
      90.exporter         2.484***        1.826  
                        (0.278)         (1.798)  
      
      91.exporter         1.346**         1.346**
                        (0.553)         (0.553)  
      
      92.exporter         2.469***        1.811  
                        (0.282)         (1.798)  
      
      93.exporter         2.320***        1.662  
                        (0.301)         (1.801)  
      
      94.exporter         0.393          -0.265  
                        (0.270)         (1.796)  
      
      95.exporter         6.668***        6.668***
                        (0.373)         (0.373)  
      
      96.exporter         1.478***        0.820  
                        (0.332)         (1.807)  
      
      97.exporter         0.831           0.173  
                        (0.526)         (1.853)  
      
      98.exporter         1.685***        1.685***
                        (0.465)         (0.465)  
      
      99.exporter         4.207***        3.549**
                        (0.263)         (1.795)  
      
      100.exporter        1.552***        0.894  
                        (0.541)         (1.857)  
      
      101.exporter        1.424***        1.424***
                        (0.532)         (0.532)  
      
      102.exporter        2.948***        2.290  
                        (0.274)         (1.797)  
      
      103.exporter        0.144          -0.514  
                        (0.465)         (1.836)  
      
      104.exporter        4.008***        3.350*  
                        (0.265)         (1.796)  
      
      105.exporter        4.339***        3.681**
                        (0.270)         (1.796)  
      
      106.exporter       -0.968          -1.626  
                        (1.293)         (2.197)  
      
      107.exporter        1.096*          1.096*  
                        (0.654)         (0.654)  
      
      108.exporter        1.326***        0.668  
                        (0.272)         (1.797)  
      
      109.exporter        0.729*         0.0708  
                        (0.386)         (1.817)  
      
      135.exporter       -1.738**        -1.738**
                        (0.776)         (0.776)  
      
      136.exporter        1.394**         0.736  
                        (0.574)         (1.867)  
      
      137.exporter        2.853***        2.195  
                        (0.368)         (1.814)  
      
      138.exporter        2.996***        2.338  
                        (0.344)         (1.809)  
      
      139.exporter        0.658               0  
                        (1.810)             (.)  
      
      140.exporter        2.897***        2.239  
                        (0.269)         (1.796)  
      
      141.exporter        1.056***        0.398  
                        (0.393)         (1.819)  
      
      142.exporter        0.195          -0.463  
                        (0.295)         (1.800)  
      
      143.exporter        0.364          -0.294  
                        (0.556)         (1.861)  
      
      144.exporter        5.525***        4.867***
                        (0.259)         (1.795)  
      
      145.exporter        1.298***        1.298***
                        (0.382)         (0.382)  
      
      146.exporter        0.609**       -0.0490  
                        (0.260)         (1.795)  
      
      148.exporter        0.463          -0.195  
                        (0.556)         (1.862)  
      
      149.exporter        4.084***        3.426*  
                        (0.257)         (1.795)  
      
      150.exporter        5.514***        4.856***
                        (0.257)         (1.795)  
      
      151.exporter        0.720**        0.0622  
                        (0.331)         (1.807)  
      
      152.exporter        0.785*          0.127  
                        (0.442)         (1.831)  
      
      153.exporter        1.264***        0.606  
                        (0.481)         (1.840)  
      
      154.exporter        2.304***        2.304***
                        (0.458)         (0.458)  
      
      155.exporter        5.125***        4.467**
                        (0.256)         (1.794)  
      
      156.exporter        7.039***        7.039***
                        (0.371)         (0.371)  
      
      157.exporter        0.800**         0.142  
                        (0.325)         (1.806)  
      
      158.exporter        1.101*          1.101*  
                        (0.655)         (0.655)  
      
      159.exporter        2.815***        2.157  
                        (0.263)         (1.796)  
      
      160.exporter       -0.396          -0.396  
                        (0.402)         (0.402)  
      
      161.exporter        1.887***        1.229  
                        (0.433)         (1.828)  
      
      162.exporter        0.863           0.205  
                        (1.293)         (2.197)  
      
      163.exporter        2.205***        1.547  
                        (0.346)         (1.810)  
      
      164.exporter        0.990***        0.332  
                        (0.363)         (1.813)  
      
      165.exporter        2.090***        1.432  
                        (0.256)         (1.795)  
      
      166.exporter        0.960**         0.960**
                        (0.456)         (0.456)  
      
      167.exporter        0.619**       -0.0390  
                        (0.270)         (1.797)  
      
      168.exporter        3.705***        3.047*  
                        (0.264)         (1.796)  
      
      169.exporter        7.008***        6.350***
                        (0.254)         (1.794)  
      
      170.exporter        1.385***        0.727  
                        (0.378)         (1.816)  
      
      171.exporter        7.783***        7.125***
                        (0.252)         (1.794)  
      
      172.exporter        3.074***        2.416  
                        (0.282)         (1.798)  
      
      173.exporter        2.312***        2.312***
                        (0.425)         (0.425)  
      
      174.exporter        1.693***        1.035  
                        (0.359)         (1.812)  
      
      175.exporter        2.937***        2.279  
                        (0.286)         (1.799)  
      
      176.exporter        1.214***        0.556  
                        (0.294)         (1.800)  
      
      177.exporter            0          -0.658  
                            (.)         (1.810)  
      
      178.exporter        1.736***        1.736***
                        (0.432)         (0.432)  
      
      179.exporter        1.899***        1.899***
                        (0.449)         (0.449)  
      
      1.yr                    0               0  
                            (.)             (.)  
      
      2.yr                0.153***        0.153***
                       (0.0500)        (0.0500)  
      
      3.yr                0.312***        0.312***
                       (0.0494)        (0.0494)  
      
      4.yr                0.433***        0.433***
                       (0.0484)        (0.0484)  
      
      5.yr                0.520***        0.520***
                       (0.0479)        (0.0479)  
      
      6.yr                0.779***        0.779***
                       (0.0474)        (0.0474)  
      
      7.yr                1.024***        1.024***
                       (0.0466)        (0.0466)  
      
      8.yr                1.130***        1.130***
                       (0.0467)        (0.0467)  
      
      9.yr                1.255***        1.255***
                       (0.0453)        (0.0453)  
      
      10.yr               1.308***        1.308***
                       (0.0448)        (0.0448)  
      
      11.yr               1.410***        1.410***
                       (0.0447)        (0.0447)  
      
      12.yr               1.464***        1.464***
                       (0.0451)        (0.0451)  
      
      _cons               7.051***        10.41***
                        (0.296)         (2.064)  
      --------------------------------------------
      N                   42893           42893  
      --------------------------------------------
      Standard errors in parentheses
      * p<.10, ** p<.05, *** p<.01

      Comment


      • #4
        I am not sure if I am understanding your data structure. It seems to me that you are trying to estimate some kind of trade gravity model. How do you classify importers and exporters? They cannot be mutually exclusive because xtreg only uses those observations with a non-missing value for your panel identifier variable, importer, and would consequently not report any coefficients for your exporter dummies. But if they are not mutually exclusive, you will have a collinearity problem among your dummy variables, which also becomes clear from your output (139.exporter is omitted by xtreg, and 177.exporter is omitted by reg). The simple fact that both commands omitted different dummies already explains the differences in all your dummy coefficients. However, without knowing anything about your data, in particular the construction of the variables importer and exporter, we cannot give any further advice here. Are these dummies even constant over time?
        Last edited by Sebastian Kripfganz; 02 Dec 2014, 19:20.
        https://www.kripfganz.de/stata/

        Comment

        Working...
        X