Announcement

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

  • Need help with getting results in fixed effects model

    Dear Statalist,

    I am running regression (N>T) on the determinants of economic growth of countries (DV) and one of the variables (IV) is the country`s initial level of GDP per capita.

    Code:
    xtset id year
    xtreg growth inflation(-1) trade government_consumption(-1) population_growth initial_GDPPC, fe rob cluster(id)
    As we know, the data for the initial level of GDP per capita is the same for a particular country during the whole period. And when I run the regression, STATA omits this variable because of the collinearity issue.

    Most of the research on this topic used a fixed effects model and showed the results for all independent variables (without omitting). Is there any method or command toget the result for initial level of GDP per capita?

    Thank you.
    Last edited by Ismoil Ismoilov; 25 Jan 2023, 14:55.

  • #2
    What you are showing

    Code:
    reg Y X(-1)
    is not valid Stata syntax and should generate an error.

    As you explain in fixed effects regressions everything that is time constant gets dropped.

    Maybe you have misunderstood, and the literature regresses on lagged values of some independent variables, say the lagged value of inflation?

    Comment


    • #3
      Originally posted by Joro Kolev View Post

      Maybe you have misunderstood, and the literature regresses on lagged values of some independent variables, say the lagged value of inflation?
      Dear Joro,

      Yes, authors used lag of IVs, almost all of them used lag of Government consumption and some added lag of inflation

      Comment


      • #4
        Well, those lagged values are not constant across time. So you do something like

        Code:
         
         xtreg growth l.inflation trade l.government_consumption population_growth initial_GDPPC, fe rob cluster(id)

        Comment


        • #5
          Originally posted by Joro Kolev View Post
          Well, those lagged values are not constant across time. So you do something like

          Code:
          xtreg growth l.inflation trade l.government_consumption population_growth initial_GDPPC, fe rob cluster(id)
          Joro, thank you for your response and attention!

          I`m sorry I couldn`t clarify what I need in my question.
          I need to get the results for IV with constant value within some period (Initial GDPPC). Most research has the results for this variable and I`m struggling on it

          Comment


          • #6
            Ismoil:
            I share Joro's concern about what you're actually after.
            That said, if you want to stick with -fe- the only way that might get what you want (but not always, because of collinearity) is using -regress. instead of -xtreg,fe- (an approach that rarely worths consdering):
            Code:
            . use "https://www.stata-press.com/data/r17/nlswork.dta"
            (National Longitudinal Survey of Young Women, 14-24 years old in 1968)
            
            . regress ln_wage i.year i.race i.idcode if idcode<=5
            note: 5.idcode omitted because of collinearity.
            
                  Source |       SS           df       MS      Number of obs   =        61
            -------------+----------------------------------   F(18, 42)       =      1.48
                   Model |  2.91651475        18  .162028597   Prob > F        =    0.1461
                Residual |  4.59521911        42  .109409979   R-squared       =    0.3883
            -------------+----------------------------------   Adj R-squared   =    0.1261
                   Total |  7.51173386        60  .125195564   Root MSE        =    .33077
            
            ------------------------------------------------------------------------------
                 ln_wage | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
            -------------+----------------------------------------------------------------
                    year |
                     69  |   .1847799   .3307718     0.56   0.579    -.4827446    .8523044
                     70  |   .0639881   .2909513     0.22   0.827    -.5231754    .6511516
                     71  |  -.0128146    .282324    -0.05   0.964    -.5825676    .5569384
                     72  |   .1124264    .282324     0.40   0.692    -.4573265    .6821794
                     73  |   .1928424    .282324     0.68   0.498    -.3769106    .7625954
                     75  |   .1510399    .282324     0.53   0.595     -.418713    .7207929
                     77  |   .1594544   .2908195     0.55   0.586    -.4274432     .746352
                     78  |   .3482667   .2908195     1.20   0.238    -.2386309    .9351643
                     80  |   .1820693    .282324     0.64   0.523    -.3876837    .7518222
                     82  |    .033479   .2909513     0.12   0.909    -.5536844    .6206425
                     83  |   .2247867   .2959791     0.76   0.452    -.3725232    .8220966
                     85  |   .3874729   .2959791     1.31   0.198    -.2098371    .9847828
                     87  |    .328272   .2959791     1.11   0.274    -.2690379    .9255819
                     88  |   .4046278   .2959791     1.37   0.179    -.1926821    1.001938
                         |
                    race |
                  Black  |   .1086187   .1458739     0.74   0.461    -.1857668    .4030042
                         |
                  idcode |
                      2  |  -.3498364    .136466    -2.56   0.014     -.625236   -.0744368
                      3  |  -.4278554   .1310835    -3.26   0.002    -.6923926   -.1633183
                      4  |   .0866698   .1500993     0.58   0.567    -.2162428    .3895824
                      5  |          0  (omitted)
                         |
                   _cons |   1.719945   .2433232     7.07   0.000     1.228899    2.210992
            ------------------------------------------------------------------------------
            
            . xtreg ln_wage i.year i.race if idcode<=5, fe
            note: 2.race omitted because of collinearity.
            
            Fixed-effects (within) regression               Number of obs     =         61
            Group variable: idcode                          Number of groups  =          5
            
            R-squared:                                      Obs per group:
                 Within  = 0.1714                                         min =         11
                 Between = 0.0052                                         avg =       12.2
                 Overall = 0.1263                                         max =         15
            
                                                            F(14,42)          =       0.62
            corr(u_i, Xb) = -0.0190                         Prob > F          =     0.8325
            
            ------------------------------------------------------------------------------
                 ln_wage | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
            -------------+----------------------------------------------------------------
                    year |
                     69  |   .1847799   .3307718     0.56   0.579    -.4827446    .8523044
                     70  |   .0639881   .2909513     0.22   0.827    -.5231754    .6511516
                     71  |  -.0128146    .282324    -0.05   0.964    -.5825676    .5569384
                     72  |   .1124264    .282324     0.40   0.692    -.4573265    .6821794
                     73  |   .1928424    .282324     0.68   0.498    -.3769106    .7625954
                     75  |   .1510399    .282324     0.53   0.595     -.418713    .7207929
                     77  |   .1594544   .2908195     0.55   0.586    -.4274432     .746352
                     78  |   .3482667   .2908195     1.20   0.238    -.2386309    .9351643
                     80  |   .1820693    .282324     0.64   0.523    -.3876837    .7518222
                     82  |    .033479   .2909513     0.12   0.909    -.5536844    .6206425
                     83  |   .2247867   .2959791     0.76   0.452    -.3725232    .8220966
                     85  |   .3874729   .2959791     1.31   0.198    -.2098371    .9847828
                     87  |    .328272   .2959791     1.11   0.274    -.2690379    .9255819
                     88  |   .4046278   .2959791     1.37   0.179    -.1926821    1.001938
                         |
                    race |
                  Black  |          0  (omitted)
                   _cons |   1.630989   .2401092     6.79   0.000     1.146429    2.115548
            -------------+----------------------------------------------------------------
                 sigma_u |  .19540886
                 sigma_e |  .33077179
                     rho |  .25871288   (fraction of variance due to u_i)
            ------------------------------------------------------------------------------
            F test that all u_i=0: F(4, 42) = 4.39                       Prob > F = 0.0047
            
            .
            Last edited by Carlo Lazzaro; 26 Jan 2023, 03:56.
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Originally posted by Carlo Lazzaro View Post
              Ismoil:
              I share Joro's concern about what you're actually after.
              That said, if you want to stick with -fe- the only way that might get what you want (but not always, because of collinearity) is using -regress. instead of -xtreg,fe- (an approach that rarely worths consdering):
              Thank you, Carlo!

              Comment

              Working...
              X