Announcement

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

  • Any Idea how to get rid of my ommited variables or wich fixed effects to use ?



    Hey Stata Community,

    i`m running my regression on the effect of regulation and other factors on FDI across countrys. Down there i exported the variables i`m using at the moment.
    When it comes to fixed effects I can only use time fixed effects or my data Set gets ommited variables or is insignificant all the time.

    country year fixed effects: 1.

    . egen cou_time = group(country year)

    . tabulate cou_time, gen(COU_TIME_FE) (those use without getting omiited variables as you can see in the regression output below)


    Time-fixed effects:

    egen time = group(year)

    .
    . quietly tabulate time, gen(TIME_FE) ( best ouput so far )



    Importer & exporter Fixed effects:

    . egen cou= group(country)

    . quietly tabulate cou, gen(COUNTRY_FE)


    . egen partner= group(partnercountry)

    . quietly tabulate partner, gen(PARTNER_FE) ( effects are not what i hoped to find or not significant)



    Any Idea how to get rid of ommited variables or make my regression more accurate ?



    1.


    . ppmlhdfe outwardflow courestrictiveness partnerrestrictiveness CNTG ln_DIST LANG CLNY ln_gdp_cou ln_gdp_partner if outwardflow > 0, absorb(partner_time cou_time) cluster (pair_id)

    (dropped 2 observations that are either singletons or separated by a fixed effect)
    warning: dependent variable takes very low values after standardizing (2.8351e-08)
    note: 4 variables omitted because of collinearity: courestrictiveness partnerrestrictiveness ln_gdp_cou ln_gdp_partner
    Iteration 1: deviance = 1.3788e+07 eps = . iters = 6 tol = 1.0e-04 min(eta) = -5.37 P
    Iteration 2: deviance = 9.4690e+06 eps = 4.56e-01 iters = 5 tol = 1.0e-04 min(eta) = -6.95
    Iteration 3: deviance = 8.6783e+06 eps = 9.11e-02 iters = 5 tol = 1.0e-04 min(eta) = -8.45
    Iteration 4: deviance = 8.5322e+06 eps = 1.71e-02 iters = 4 tol = 1.0e-04 min(eta) = -9.92
    Iteration 5: deviance = 8.5068e+06 eps = 2.98e-03 iters = 4 tol = 1.0e-04 min(eta) = -11.09
    Iteration 6: deviance = 8.5033e+06 eps = 4.11e-04 iters = 3 tol = 1.0e-04 min(eta) = -11.83
    Iteration 7: deviance = 8.5030e+06 eps = 4.14e-05 iters = 2 tol = 1.0e-04 min(eta) = -12.23
    Iteration 8: deviance = 8.5029e+06 eps = 2.41e-06 iters = 2 tol = 1.0e-05 min(eta) = -12.37
    Iteration 9: deviance = 8.5029e+06 eps = 3.05e-08 iters = 2 tol = 1.0e-06 min(eta) = -12.39 S
    Iteration 10: deviance = 8.5029e+06 eps = 4.44e-11 iters = 2 tol = 1.0e-07 min(eta) = -12.39 S
    Iteration 11: deviance = 8.5029e+06 eps = 9.68e-16 iters = 3 tol = 1.0e-09 min(eta) = -12.39 S O
    ------------------------------------------------------------------------------------------------------------
    (legend: p: exact partial-out s: exact solver h: step-halving o: epsilon below tolerance)
    Converged in 11 iterations and 38 HDFE sub-iterations (tol = 1.0e-08)

    HDFE PPML regression No. of obs = 7,134
    Absorbing 2 HDFE groups Residual df = 1,275
    Statistics robust to heteroskedasticity Wald chi2(4) = 77.06
    Deviance = 8502949.458 Prob > chi2 = 0.0000
    Log pseudolikelihood = -4272799.367 Pseudo R2 = 0.8467

    Number of clusters (pair_id)= 1,276
    (Std. err. adjusted for 1,276 clusters in pair_id)
    ----------------------------------------------------------------------------------------
    | Robust
    outwardflow | Coefficient std. err. z P>|z| [95% conf. interval]
    -----------------------+----------------------------------------------------------------
    courestrictiveness | 0 (omitted)
    partnerrestrictiveness | 0 (omitted)
    CNTG | .1741745 .1887926 0.92 0.356 -.1958521 .5442012
    ln_DIST | -.3507571 .0617022 -5.68 0.000 -.4716912 -.229823
    LANG | -.0111921 .1674039 -0.07 0.947 -.3392977 .3169136
    CLNY | .0184329 .2914564 0.06 0.950 -.5528112 .589677
    ln_gdp_cou | 0 (omitted)
    ln_gdp_partner | 0 (omitted)
    _cons | 12.04954 .4966784 24.26 0.000 11.07607 13.02301
    ----------------------------------------------------------------------------------------




    2. ppmlhdfe outwardflow courestrictiveness partnerrestrictiveness CNTG ln_DIST LANG CLNY ln_gdp_cou ln_gdp_partner if outwardflow>0, absorb( time) cluster (pair_id)


    . ppmlhdfe outwardflow courestrictiveness partnerrestrictiveness CNTG ln_DIST LANG CLNY ln_gdp_cou ln_gdp_partner if outwardflow > 0, absorb(time) cluster (pair_id)
    warning: dependent variable takes very low values after standardizing (2.8304e-08)
    Iteration 1: deviance = 4.7460e+07 eps = . iters = 1 tol = 1.0e-04 min(eta) = -6.88 P
    Iteration 2: deviance = 3.8031e+07 eps = 2.48e-01 iters = 1 tol = 1.0e-04 min(eta) = -7.32
    Iteration 3: deviance = 3.7102e+07 eps = 2.51e-02 iters = 1 tol = 1.0e-04 min(eta) = -7.50
    Iteration 4: deviance = 3.7082e+07 eps = 5.34e-04 iters = 1 tol = 1.0e-04 min(eta) = -7.53
    Iteration 5: deviance = 3.7082e+07 eps = 4.52e-07 iters = 1 tol = 1.0e-04 min(eta) = -7.53
    Iteration 6: deviance = 3.7082e+07 eps = 4.82e-13 iters = 1 tol = 1.0e-05 min(eta) = -7.53 S O
    ------------------------------------------------------------------------------------------------------------
    (legend: p: exact partial-out s: exact solver h: step-halving o: epsilon below tolerance)
    Converged in 6 iterations and 6 HDFE sub-iterations (tol = 1.0e-08)

    HDFE PPML regression No. of obs = 7,136
    Absorbing 1 HDFE group Residual df = 1,275
    Statistics robust to heteroskedasticity Wald chi2(8) = 300.47
    Deviance = 37081715.05 Prob > chi2 = 0.0000
    Log pseudolikelihood = -18562194.38 Pseudo R2 = 0.3372

    Number of clusters (pair_id)= 1,276
    (Std. err. adjusted for 1,276 clusters in pair_id)
    ----------------------------------------------------------------------------------------
    | Robust
    outwardflow | Coefficient std. err. z P>|z| [95% conf. interval]
    -----------------------+----------------------------------------------------------------
    courestrictiveness | -8.719844 2.276979 -3.83 0.000 -13.18264 -4.257046
    partnerrestrictiveness | -3.871093 1.230542 -3.15 0.002 -6.28291 -1.459276
    CNTG | -.6935523 .3418396 -2.03 0.042 -1.363546 -.023559
    ln_DIST | -.4814556 .1423541 -3.38 0.001 -.7604645 -.2024468
    LANG | 1.177399 .2237911 5.26 0.000 .738777 1.616022
    CLNY | -1.397121 .4008699 -3.49 0.000 -2.182812 -.6114309
    ln_gdp_cou | .3939792 .0782981 5.03 0.000 .2405177 .5474407
    ln_gdp_partner | .6383429 .0781314 8.17 0.000 .4852082 .7914776
    _cons | -9.031949 2.922492 -3.09 0.002 -14.75993 -3.30397



    3.ppmlhdfe outwardflow courestrictiveness partnerrestrictiveness CNTG ln_DIST LANG CLNY ln_gdp_cou ln_gdp_partner if outwardflow>0, absorb( cou partner time) cluster (pair_id)




    Number of clusters (pair_id)= 1,276
    (Std. err. adjusted for 1,276 clusters in pair_id)
    ----------------------------------------------------------------------------------------
    | Robust
    outwardflow | Coefficient std. err. z P>|z| [95% conf. interval]
    -----------------------+----------------------------------------------------------------
    courestrictiveness | 8.246634 8.935515 0.92 0.356 -9.266654 25.75992
    partnerrestrictiveness | 1.554044 1.893297 0.82 0.412 -2.15675 5.264839
    CNTG | .2900955 .1924785 1.51 0.132 -.0871554 .6673463
    ln_DIST | -.2920899 .0676267 -4.32 0.000 -.4246359 -.159544
    LANG | -.0967557 .1886689 -0.51 0.608 -.46654 .2730286
    CLNY | -.0032384 .2871345 -0.01 0.991 -.5660116 .5595349
    ln_gdp_cou | -.7710907 .6012889 -1.28 0.200 -1.949595 .4074138
    ln_gdp_partner | 1.234492 .5617127 2.20 0.028 .1335551 2.335429
    _cons | .8118327 16.84676 0.05 0.962 -32.20721 33.83087








    input float(outwardflow courestrictiveness partnerrestrictiveness) byte CNTG float ln_DIST byte(LANG CLNY) float(ln_gdp_cou ln_gdp_partner)
    0 .16276744 .1577907 0 9.352014 0 0 21.0061 15.857112
    . .15213954 .05953488 0 9.682405 0 0 21.019945 19.523643
    . .15213954 .10018605 0 9.801898 0 0 21.019945 18.426596
    0 .16218606 .2608372 0 9.5518 0 0 20.90943 17.47018
    . .16218606 .01044186 0 9.808187 0 0 20.90943 19.136395
    . .1648372 .4006512 0 8.611594 0 0 21.07991 20.76467
    261.40256 .14086047 .11986046 0 9.679594 1 0 21.101427 23.57934
    . .14153488 .068488374 0 9.654193 0 0 21.16819 20.080557
    37.90976 .16218606 .07467442 0 9.338734 0 0 20.90943 19.32501
    98.0918 .16276744 .2343256 0 9.25129 1 0 21.0061 21.69838
    3192.783 .14153488 .24106976 0 7.678326 1 0 21.16819 19.040115
    . .15213954 .063418604 0 9.700269 0 0 21.019945 21.324793
    . .14153488 .028465116 0 9.666435 0 0 21.16819 18.709042
    . .16218606 .068488374 0 9.654193 0 0 20.90943 19.9672
    . .1648372 .1713023 0 9.559446 1 0 21.053974 19.8018
    . .1648372 .1894651 0 8.655737 0 0 21.07991 16.423178
    4061.173 .14153488 .11986046 0 9.679594 1 0 21.16819 23.542744
    0 .14086047 .23597674 0 9.710691 0 0 21.101427 17.678411
    . .1648372 .063418604 0 9.700269 0 0 21.053974 21.421095
    . .1648372 .10386047 0 8.9986315 0 0 21.07991 18.022362
    3.005485 .15213954 .013023255 0 9.685331 0 0 21.019945 19.03671
    507.69345 .16218606 .02988372 0 9.685829 0 0 20.90943 21.966486
    . .16276744 .03672093 0 9.570529 0 0 21.0061 19.55814
    -326.6838 .1648372 .04776744 0 9.738495 0 0 21.053974 21.727154
    . .16276744 .2100465 0 9.470626 0 0 21.0061 20.87075
    . .16218606 .028465116 0 9.666435 0 0 20.90943 18.638554
    . .1648372 .1125814 0 9.715228 0 0 21.07991 20.416115
    0 .1648372 .7100232 0 9.689427 0 0 21.053974 17.768505
    0 .16276744 .023930233 0 9.633777 0 0 21.0061 17.6792
    4.824392 .14153488 .063418604 0 9.700269 0 0 21.16819 21.488493
    . .16218606 .007395349 0 9.721366 0 0 20.90943 17.908985
    . .1648372 .09369767 0 9.576025 0 0 21.053974 19.52951
    . .16218606 .08006977 0 9.654128 0 0 20.90943 20.05188
    0 .16218606 .16218606 0 6.952729 0 0 20.90943 20.90943
    . .1648372 .05953488 0 9.682405 0 0 21.053974 19.66645
    . .14086047 .03672093 0 9.570529 0 0 21.101427 19.750923
    . .15213954 .007395349 0 9.721366 0 0 21.019945 17.876785
    . .16218606 .07409302 0 8.960981 0 0 20.90943 22.320507
    -648.3903 .1648372 .23434883 0 7.678326 1 0 21.07991 19.17316
    . .16218606 .1125814 0 9.715228 0 0 20.90943 20.30749
    0 .1648372 .21381396 0 9.710691 0 0 21.07991 17.566668
    -3.716643 .16218606 .06044186 0 9.725556 0 0 20.90943 19.96048
    . .14086047 .08006977 0 9.654128 0 0 21.101427 20.16782
    . .1648372 .07623256 0 9.217912 0 0 21.07991 16.394066
    . .16218606 .01560465 0 9.719444 0 0 20.90943 20.463
    6.689958 .16218606 .303093 0 8.925188 0 0 20.90943 19.82393
    0 .14086047 .03860465 0 9.780642 0 0 21.101427 21.04234
    . .14153488 .01044186 0 9.808187 0 0 21.16819 19.241886
    . .14153488 .01560465 0 9.719444 0 0 21.16819 20.5649
    . .1648372 .013023255 0 9.685331 0 0 21.053974 19.346914
    0 .1648372 .04260465 0 9.67042 0 0 21.07991 16.820074
    . .1648372 .03672093 0 9.570529 0 0 21.053974 19.594494
    . .14086047 .1037907 0 9.458528 0 0 21.101427 19.11906
    . .1648372 .016976744 . . . . . .
    . .1648372 .17386046 0 9.717459 0 0 21.053974 17.028679
    . .1648372 .12937209 0 9.611463 0 0 21.07991 18.689877
    . .14153488 .51539534 0 8.740177 1 0 21.16819 19.421556
    . .15213954 .14134884 0 9.352014 0 0 21.019945 15.714355
    . .16276744 .1124186 0 9.676587 0 0 21.0061 19.80295
    . .16276744 .04016279 0 9.533583 0 0 21.0061 17.918419
    . .1648372 .02234884 0 9.630169 0 0 21.053974 17.250967
    . .1648372 .014860465 0 9.68887 0 0 21.07991 17.807032
    0 .1648372 .05360465 0 9.661925 0 0 21.07991 16.533936
    0 .14153488 .14153488 0 6.952729 0 0 21.16819 21.16819
    0 .1648372 .04260465 0 9.67042 0 0 21.053974 16.821259
    . .14153488 .013023255 0 9.685331 0 0 21.16819 19.15687
    406.6008 .16218606 .04776744 0 9.738495 0 0 20.90943 21.62564
    . .15213954 .014860465 0 9.68887 0 0 21.019945 17.571505
    -37.56856 .15213954 .4415349 0 8.611594 0 0 21.019945 20.5739
    41.00924 .1648372 .07467442 0 9.338734 0 0 21.053974 19.448103
    . .16218606 .14134884 0 9.352014 0 0 20.90943 15.695172
    103.83208 .1648372 .27281395 0 8.796187 0 0 21.07991 19.69825
    . .16276744 .01044186 0 9.808187 0 0 21.0061 19.21282
    . .16218606 .013023255 0 9.685331 0 0 20.90943 19.07781
    . .14086047 .1642093 0 9.340404 0 0 21.101427 19.21555
    0 .14086047 .3650233 0 8.9986315 0 0 21.101427 17.998701
    1479.808 .1648372 .1930465 0 9.652587 1 0 21.053974 21.27831
    2.2990267 .16276744 .08006977 0 9.654128 0 0 21.0061 20.108965
    0 .14153488 .1713023 0 9.559446 1 0 21.16819 19.48729
    . .14086047 .04106977 0 9.637045 0 0 21.101427 19.27968
    . .16276744 .068488374 0 9.654193 0 0 21.0061 20.08178
    . .15213954 .04016279 0 9.533583 0 0 21.019945 17.819933
    . .1648372 .028465116 0 9.666435 0 0 21.07991 18.894346
    632.7034 .1648372 .02988372 0 9.685829 0 0 21.07991 22.10338
    . .16218606 .1037907 0 9.458528 0 0 20.90943 19.07349
    -.7469934 .1648372 .0824186 0 9.612065 0 0 21.07991 20.472843
    . .1648372 .1037907 0 9.458528 0 0 21.053974 19.24692
    . .16276744 .0824186 0 9.612065 0 0 21.0061 20.571276
    . .14086047 .0824186 0 9.612065 0 0 21.101427 20.655167
    0 .1648372 .023930233 0 9.633777 0 0 21.053974 17.817326
    12.02194 .15213954 .03672093 0 9.570529 0 0 21.019945 19.49062
    . .1648372 .05953488 0 9.682405 0 0 21.07991 19.6928
    -2.9879735 .1648372 .27876744 0 8.925188 0 0 21.07991 20.043255
    93.92141 .15213954 .04776744 0 9.738495 0 0 21.019945 21.61262
    . .14153488 .016976744 . . . . . .
    . .16276744 .12937209 0 9.611463 0 0 21.0061 18.534817
    . .1648372 .1894651 0 8.655737 0 0 21.053974 16.415934
    . .14153488 .1125814 0 9.715228 0 0 21.16819 20.345564
    -223.0056 .16276744 .036906976 0 9.753188 1 0 21.0061 19.62845
    . .14153488 .014860465 0 9.68887 0 0 21.16819 17.686447
    end
    [/CODE]

    As always Thanks for looking into this !!


    Kind regards Max

  • #2
    Code delimiters would really help here.

    I don't get this question: "Any Idea how to get rid of ommited variables or make my regression more accurate?".

    By accurate you mean the efficiency of estimation, right?

    Regressors in this context are omitted because they do not vary within the included fixed effects if that makes sense. The best thing to do is to try to find data with additional sources of variation, i.e. maximise the variation sources of your regressors so they do not drop when you control for unobserved heterogeneity, be it time-invariant or not.

    For instance, if you were to run a two-way fixed effect regression on the impact of education on wages, and included a race dummy as a regressor, it would drop because it has no within-unit variation and you've included unit fixed effects.

    If you cannot get new data and you need a coefficient on these regressors, you can run a correlated random effects model as in Wooldridge (2010), but your coefficient will very probably be biased.

    Comment

    Working...
    X