Announcement

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

  • Fixed Effects - different results reporting from xtreg,fe and xi commands

    Would it be possible for someone to outline how the two approaches I have used differ, and which is most appropriate.



    xtreg ppvt_raw DISASTER disjunt juntos WORKTIME i.headedu i.gender i.region, fe
    note: 2.gender omitted because of collinearity

    Fixed-effects (within) regression Number of obs = 5,241
    Group variable: panelid Number of groups = 1,890

    R-sq: Obs per group:
    within = 0.1555 min = 1
    between = 0.1519 avg = 2.8
    overall = 0.1355 max = 3

    F(22,3329) = 27.86
    corr(u_i, Xb) = -0.3568 Prob > F = 0.0000

    --------------------------------------------------------------------------------------------------------------
    ppvt_raw | Coef. Std. Err. t P>|t| [95% Conf. Interval]
    ---------------------------------------------+----------------------------------------------------------------
    DISASTER | -4.124934 1.359051 -3.04 0.002 -6.789593 -1.460275
    disjunt | 1.555855 1.990849 0.78 0.435 -2.347556 5.459266
    juntos | 10.4974 1.543968 6.80 0.000 7.470174 13.52462
    WORKTIME | 4.015787 .2564161 15.66 0.000 3.513037 4.518536
    |
    headedu |
    Grade 1 | -3.024054 4.894436 -0.62 0.537 -12.62046 6.572353
    Grade 2 | -11.81112 4.382628 -2.69 0.007 -20.40404 -3.218205
    Grade 3 | -.3126233 3.994654 -0.08 0.938 -8.144848 7.519602
    Grade 4 | .8936467 4.596557 0.19 0.846 -8.118715 9.906009
    Grade 5 | -3.632201 4.149429 -0.88 0.381 -11.76789 4.503488
    Grade 6 | 9.45312 3.649478 2.59 0.010 2.297674 16.60857
    Grade 7 | 9.480014 4.658118 2.04 0.042 .3469491 18.61308
    Grade 8 | 10.84689 4.532676 2.39 0.017 1.959783 19.73401
    Grade 9 | 11.9329 4.10398 2.91 0.004 3.886323 19.97948
    Grade 10 | 15.02676 5.100044 2.95 0.003 5.027222 25.0263
    Grade 11 | 16.61036 3.755945 4.42 0.000 9.246162 23.97455
    Technical, pedagogical, CETPRO (incomplete) | 16.72069 4.644156 3.60 0.000 7.615005 25.82638
    Technical, pedagogical, CETPRO (complete) | 25.04751 4.327413 5.79 0.000 16.56285 33.53217
    University (incomplete) | 27.43524 5.381455 5.10 0.000 16.88394 37.98653
    University (complete) | 33.93681 4.964016 6.84 0.000 24.20398 43.66964
    17 | 38.95131 24.35117 1.60 0.110 -8.793468 86.6961
    |
    gender |
    female | 0 (omitted)
    |
    region |
    Sierra | -22.75027 2.313365 -9.83 0.000 -27.28603 -18.21451
    Selva | -9.289368 3.627105 -2.56 0.010 -16.40095 -2.177788
    |
    _cons | 72.82197 3.692845 19.72 0.000 65.58149 80.06245
    ---------------------------------------------+----------------------------------------------------------------
    sigma_u | 16.901904
    sigma_e | 19.594292
    rho | .42662758 (fraction of variance due to u_i)
    --------------------------------------------------------------------------------------------------------------
    F test that all u_i=0: F(1889, 3329) = 1.43 Prob > F = 0.0000



    xi: regress ppvt_raw DISASTER disjunt juntos WORKTIME i.headedu i.gender i.region
    i.headedu _Iheadedu_0-17 (naturally coded; _Iheadedu_0 omitted)
    i.gender _Igender_1-2 (naturally coded; _Igender_1 omitted)
    i.region _Iregion_31-33 (naturally coded; _Iregion_31 omitted)

    Source | SS df MS Number of obs = 5,241
    -------------+---------------------------------- F(23, 5217) = 58.07
    Model | 590458.876 23 25672.1251 Prob > F = 0.0000
    Residual | 2306419.53 5,217 442.096901 R-squared = 0.2038
    -------------+---------------------------------- Adj R-squared = 0.2003
    Total | 2896878.41 5,240 552.839391 Root MSE = 21.026

    ------------------------------------------------------------------------------
    ppvt_raw | Coef. Std. Err. t P>|t| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    DISASTER | -8.214078 1.075542 -7.64 0.000 -10.32259 -6.105565
    disjunt | 3.304307 1.638702 2.02 0.044 .0917642 6.516849
    juntos | -3.876099 1.041407 -3.72 0.000 -5.917693 -1.834505
    WORKTIME | 1.652771 .2115815 7.81 0.000 1.237983 2.067559
    _Iheadedu_1 | 2.237623 2.383351 0.94 0.348 -2.434743 6.909989
    _Iheadedu_2 | -1.935282 1.915909 -1.01 0.312 -5.691266 1.820702
    _Iheadedu_3 | 2.919267 1.817414 1.61 0.108 -.6436249 6.482158
    _Iheadedu_4 | 2.588977 2.077937 1.25 0.213 -1.48465 6.662604
    _Iheadedu_5 | 1.563857 1.858906 0.84 0.400 -2.080378 5.208091
    _Iheadedu_6 | 8.286911 1.573165 5.27 0.000 5.202849 11.37097
    _Iheadedu_7 | 6.0136 2.233944 2.69 0.007 1.634133 10.39307
    _Iheadedu_8 | 10.79432 2.025451 5.33 0.000 6.823584 14.76505
    _Iheadedu_9 | 12.59025 1.853089 6.79 0.000 8.957423 16.22308
    _Iheadedu_10 | 13.38254 2.366417 5.66 0.000 8.743368 18.0217
    _Iheadedu_11 | 15.76536 1.541536 10.23 0.000 12.7433 18.78741
    _Iheadedu_13 | 17.31192 1.992669 8.69 0.000 13.40545 21.21839
    _Iheadedu_14 | 23.40903 1.798692 13.01 0.000 19.88284 26.93522
    _Iheadedu_15 | 24.99694 2.366636 10.56 0.000 20.35734 29.63654
    _Iheadedu_16 | 28.22627 2.105169 13.41 0.000 24.09926 32.35329
    _Iheadedu_17 | 17.0119 21.09093 0.81 0.420 -24.33515 58.35895
    _Igender_2 | -2.691638 .5840434 -4.61 0.000 -3.836607 -1.546668
    _Iregion_32 | -6.016723 .7239521 -8.31 0.000 -7.435973 -4.597474
    _Iregion_33 | -5.260057 .895482 -5.87 0.000 -7.015576 -3.504537
    _cons | 73.24816 1.567087 46.74 0.000 70.17602 76.32031
    ------------------------------------------------------------------------------

  • #2
    It's very difficult to understand the code and the output, but it seems to me that in the first case you're estimating a fixed effects model, whereas in the second one you're estimating a pooled OLS. There's no reason why the two should give you the same result. In the first estimation, you're controlling for time invariant heterogeneity in your panel variable. In the second estimation, you're ignoring it.

    Probably the confusion arises because of "xi" which is not equivalent to "xtreg [...], fe". "xi" is a prefix, useful if you want to include dummy variables from variables saved as string.

    Comment


    • #3
      Thank You, Salvatore.

      Comment


      • #4
        Chumani:
        as an aside to Salvatore's helpful comment, please note:
        - we do not know how you -xtset- your data;
        - I fail to get why you correctly used -fvvarlist- notation under -xtreg- but the old-fashioned (and actually superseeded) -xi:- notation under OLS (please note that -regress- supports -fvvarlist- notation, too);
        - in your OLS code I'm not clear with the -panelid- that you should have included as -i.paneild- in the right-hand side of the -regress- equation.
        Hence, no wonder that you got different coefficients: you have estimated two different models and, if I'm not mistaken, in the OLS all observations are considered independent, as you seemingly omitted -i.panelid- among the set of predictors (breaking, in this way, the panel structure of your dataset)
        Kind regards,
        Carlo
        (Stata 18.0 SE)

        Comment

        Working...
        X