Announcement

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

  • Which one is better to use, fixed-effect model or simple regression controls ID and year period?

    Dear All,

    I have a question.
    I'm running regressions to see the aid-effectiveness by country-fixed-effect model.
    My question is that I have two options, which is that simply running regressions by fixed-effect model, or regression which included country and i.year variables as independent variables.

    1) xtreg y x1 x2 .........., fe
    2) reg y x1 x2........... i.year country (i.d.)

    Which is better to see the correct result?

    p.s.)
    D.V. is education enrollment rate.
    I include education aid amount as independent variables as well as the interaction terms with recipient political stability status to see the effects of such political status on aid-effectiveness. Also, country variable is for recipient countries' identifications. Time series is from 2002 to 2017.

    Kosho

  • #2
    Kosho:
    welcome to this forum.
    If you have panel data, your first choice should be -xtreg,fe-, that allows you to test whether there's evidence of a fixed effect (see the F-test appearing as a footnote under the -xtreg.fe- outcome table, provided you have run the model with default standard errors).
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment


    • #3
      Thank you very much for your reply, Mr. Lazzaro.

      Okay, I just checked it, and it is as following,
      F(64, 274) = 58.82 Prob > F = 0.0000

      Maybe, it is large enough to use FE model.

      My next question about model is that what is different from the FE model to simple regression with controlling country (ID) & year variable.
      If there is any motivation or reason to prefer either type, please tell me the reason.

      Secondly, in the case that I use FE model, should I include the time period (I mean "i.year" variable) in the FE equation?
      If so or not, please inform me of the potential reasons for that.

      Thank you.

      Kosho

      Comment


      • #4
        Kosho:
        1) yes, -fe- specification outperforms pooled OLS. The next thing I would do is to check whether -re- outpeforms -fe- via -hausman-.
        2) if -fe- is actually the way to go, the results you get from -xtreg,fe-.and -regress- with -panelid- as catagorical predictor are basically the same:
        Code:
        use "http://www.stata-press.com/data/r15/nlswork.dta"
        . xtreg ln_wage grade i.year if idcode<=3, fe
        note: grade omitted because of collinearity
        
        Fixed-effects (within) regression               Number of obs     =         39
        Group variable: idcode                          Number of groups  =          3
        
        R-sq:                                           Obs per group:
             within  = 0.5446                                         min =         12
             between = 0.2670                                         avg =       13.0
             overall = 0.3678                                         max =         15
        
                                                        F(14,22)          =       1.88
        corr(u_i, Xb)  = -0.0356                        Prob > F          =     0.0897
        
        ------------------------------------------------------------------------------
             ln_wage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
               grade |          0  (omitted)
                     |
                year |
                 69  |    .208967   .3918928     0.53   0.599    -.6037689    1.021703
                 70  |  -.2747772   .3439816    -0.80   0.433    -.9881514    .4385969
                 71  |  -.3613911    .326316    -1.11   0.280    -1.038129    .3153467
                 72  |  -.2056973    .326316    -0.63   0.535    -.8824352    .4710406
                 73  |  -.0310461    .326316    -0.10   0.925     -.707784    .6456917
                 75  |   .0416271    .326316     0.13   0.900    -.6351107     .718365
                 77  |   .0358937    .326316     0.11   0.913    -.6408441    .7126316
                 78  |   .2433199    .326316     0.75   0.464    -.4334179    .9200578
                 80  |   .2726139    .326316     0.84   0.412    -.4041239    .9493518
                 82  |   .1747839   .3439816     0.51   0.616    -.5385903    .8881581
                 83  |   .2924489    .326316     0.90   0.380    -.3842889    .9691868
                 85  |   .3712589    .326316     1.14   0.267     -.305479    1.047997
                 87  |   .2960361    .326316     0.91   0.374    -.3807017     .972774
                 88  |   .3038639    .326316     0.93   0.362    -.3728739    .9806018
                     |
               _cons |   1.659677   .2833366     5.86   0.000     1.072073    2.247281
        -------------+----------------------------------------------------------------
             sigma_u |  .24956596
             sigma_e |  .27711004
                 rho |  .44784468   (fraction of variance due to u_i)
        ------------------------------------------------------------------------------
        F test that all u_i=0: F(2, 22) = 9.64                       Prob > F = 0.0010
        
        . reg ln_wage grade i.idcode i.year if idcode<=3
        note: grade omitted because of collinearity
        
              Source |       SS           df       MS      Number of obs   =        39
        -------------+----------------------------------   F(16, 22)       =      2.84
               Model |  3.48635949        16  .217897468   Prob > F        =    0.0122
            Residual |  1.68937946        22  .076789976   R-squared       =    0.6736
        -------------+----------------------------------   Adj R-squared   =    0.4362
               Total |  5.17573896        38  .136203657   Root MSE        =    .27711
        
        ------------------------------------------------------------------------------
             ln_wage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
               grade |          0  (omitted)
                     |
              idcode |
                  2  |  -.3898423   .1155629    -3.37   0.003     -.629505   -.1501795
                  3  |  -.4648596   .1120424    -4.15   0.000    -.6972212   -.2324979
                     |
                year |
                 69  |    .208967   .3918928     0.53   0.599    -.6037689    1.021703
                 70  |  -.2747772   .3439816    -0.80   0.433    -.9881514    .4385969
                 71  |  -.3613911    .326316    -1.11   0.280    -1.038129    .3153467
                 72  |  -.2056973    .326316    -0.63   0.535    -.8824352    .4710406
                 73  |  -.0310461    .326316    -0.10   0.925     -.707784    .6456917
                 75  |   .0416271    .326316     0.13   0.900    -.6351107     .718365
                 77  |   .0358937    .326316     0.11   0.913    -.6408441    .7126316
                 78  |   .2433199    .326316     0.75   0.464    -.4334179    .9200578
                 80  |   .2726139    .326316     0.84   0.412    -.4041239    .9493518
                 82  |   .1747839   .3439816     0.51   0.616    -.5385903    .8881581
                 83  |   .2924489    .326316     0.90   0.380    -.3842889    .9691868
                 85  |   .3712589    .326316     1.14   0.267     -.305479    1.047997
                 87  |   .2960361    .326316     0.91   0.374    -.3807017     .972774
                 88  |   .3038639    .326316     0.93   0.362    -.3728739    .9806018
                     |
               _cons |   1.958421   .2989038     6.55   0.000     1.338532    2.578309
        ------------------------------------------------------------------------------
        
        .
        That said, I still prefer -xtreg,fe- that allows you to test whether there's evidence of a fixed effect (see the F-test appearing as a footnote under the -xtreg.fe- outcome table, provided you have run the model with default standard errors).

        3) It's perfectly legal to include -i.year- as a predictor.
        Kind regards,
        Carlo
        (Stata 18.0 SE)

        Comment


        • #5
          Okay, I got it. Thank you very much for your advice.

          Yes, I think I will employ the FE model because I have strongly balanced panel data and F-test represents so.
          The reason why I posted is that I got a recommendation to use the OLS model by my professor, but I was just curious why I need to run OLS.

          In my understanding, it might be because it is good to compare between FE and OLS.

          Thank you.

          Comment


          • #6
            Kosho:
            while is good to compare pooled OLS with -xtreg,fe-, is probably more interesting to constrast -fe- vs -re- specification.
            Kind regards,
            Carlo
            (Stata 18.0 SE)

            Comment


            • #7
              Okay, I will try to do that.
              Thank you.

              Can I ask one more question?
              I'm employing the interaction term in my model to see the effect of moderator x2 on the independent variable x1as following,

              y=B0+B1x1+B2X2+B3(X1*X2)+u

              In the case of that X2 is categorical variable (i.g.1-7), I was recommended to include the moderator X2 as (Xi - ¯X). ¯X represents the median number of X2.

              So, if country A's X2 is 3, it becomes -1 when its median is 4. If X2 is 4, it becomes 0 when its median is 4.


              Do you know why I should change the form of X2 into (Xi -¯X)?

              Kosho

              Comment


              • #8
                Kosho:
                actually, I do not know.
                I would have added X2 as a categorical predictor (see -help fvvarlist-).
                Kind regards,
                Carlo
                (Stata 18.0 SE)

                Comment


                • #9
                  Okay, thank you very much.

                  Kosho

                  Comment

                  Working...
                  X