Announcement

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

  • Interpretation of Fixed effects on a panel data

    Hello everyone,

    I am working on my thesis project but having some difficulties in interpreting the results of my FE analysis of my state-wise data.

    Dependent variable: ln( Energy use)

    Independent variable: ln(GDP) , ln(GDP)^2, Gini coefficient, Gini coefficient^2, ln(GDP*Gini)

    Model: ln(energy use) = a + b1 ln(GDP) + b2 ln(GDP)^2 + b3 Gini coefficient + b4 Gini coefficient^2 + b5 ln(GDP*Gini)

    panel variable: state_number (strongly balanced)
    time variable: year, 2004 to 2012
    delta: 1 unit

    I did a FE analysis using different states as a dummy variable.

    code: xtreg $ylist $xlist i.state_number


    Random-effects GLS regression Number of obs = 135
    Group variable: state_number Number of groups = 15

    R-sq: Obs per group:
    within = 0.8419 min = 9
    between = 1.0000 avg = 9.0
    overall = 0.9918 max = 9

    Wald chi2(19) = 13826.99
    corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000

    ------------------------------------------------------------------------------
    l_eu | Coef. Std. Err. z P>|z| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    l_gdp | 3.360092 .8762143 3.83 0.000 1.642743 5.07744
    l_gdp2 | -.092467 .0331348 -2.79 0.005 -.15741 -.0275241
    gini | -.6812795 1.920274 -0.35 0.723 -4.444948 3.082389
    gini2 | 9.712477 2.420367 4.01 0.000 4.968644 14.45631
    log_gdpgini | -1.489559 .6413677 -2.32 0.020 -2.746617 -.2325017
    |
    state_number |
    2 | -1.039754 .0409396 -25.40 0.000 -1.119994 -.959514
    3 | -1.144571 .0526478 -21.74 0.000 -1.247759 -1.041383
    4 | -.0206329 .0472276 -0.44 0.662 -.1131972 .0719314
    5 | -.5005709 .0408877 -12.24 0.000 -.5807092 -.4204325
    6 | -.6776476 .0336392 -20.14 0.000 -.7435793 -.6117159
    7 | -1.489759 .040165 -37.09 0.000 -1.568481 -1.411037
    8 | -.2914758 .0322481 -9.04 0.000 -.3546809 -.2282707
    9 | -.6035547 .0485955 -12.42 0.000 -.6988001 -.5083092
    10 | .3899714 .0296466 13.15 0.000 .3318652 .4480776
    11 | -.4560246 .0437985 -10.41 0.000 -.541868 -.3701812
    12 | -.5504803 .0378529 -14.54 0.000 -.6246706 -.4762901
    13 | -.41948 .0491892 -8.53 0.000 -.515889 -.323071
    14 | .2451028 .0312645 7.84 0.000 .1838254 .3063801
    15 | -1.279533 .0313241 -40.85 0.000 -1.340927 -1.218139
    |
    _cons | -5.007779 2.186301 -2.29 0.022 -9.292851 -.7227068
    -------------+----------------------------------------------------------------
    sigma_u | 0
    sigma_e | .06231983
    rho | 0 (fraction of variance due to u_i)
    ------------------------------------------------------------------------------


    I know how to interpret the b coefficients but I don't know how can I use this to explain the differences in each state.

    Can someone help me? I am stuck in this for months.

  • #2
    Well, you have an ill-formed model here, in a sense. You have, on the one hand, incorporate state-level fixed effects into the model by including i.state_number as a predictor variable, and on the other hand you have used a random effects regression. It makes no sense to have both, and you can even see that the state-level indicators soaked up all the state-level variance and left you with sigma_u and rho = 0.

    So the first thing I think you should do is figure out whether you need a fixed effects model or a random effects model for your research question, or perhaps a hybrid model. Then go back and run the appropriate model.

    Next, while you say you know how to interpret the coefficients, I wonder if you really do. This model has quadratic terms and it also has a rather bizarrely designed interaction term. Frankly, there are very few people who could actually interpret these coefficients correctly--in fact, given the odd nature of the interaction term, I'm not sure it's even possible.

    So let's spend a minute on that interaction. Why are you doing ln(GDP*Gini)? Given that the variables you are using elsewhere are lnGDP and Gini themselves, I would think ln(GDP) * Gini would be the appropriate way to go. I honestly don't know what to make of a ln(GDP*Gini) term in this reaction, and I especially cannot fathom how it affects the ln GDP and Gini terms themselves. So give that some seroius thought. If you do have a good reason for this choice, I would appreciate your explaining it so I can understand it better. (And, remember, if this is for your thesis, your thesis readers, if they know what they are doing, are going to be puzzled by this, too. Also having the interaction of ln_GDP and Gini linear terms without also interacting their quadratic terms is also an improper model specification.

    Assuming you agree with my advice about the proper specification of the interaction, then I would also suggest that you redo this using factor variable notation, to simplify everything:

    Code:
    xtset state_number
    xtreg l_eu c.l_gdp##c.l_gdp##c.l_gini##c.l_gini ), // SPECIFY fe OR re HERE AS AN OPTION
    // OR USE -xthybrid- WITH THE SAME VARIABLES FOR A HYBRID MODEL
    Do read -help fvvarlist- to understand factor-variable notation. You will probably also want to run the -margins- command after this so you can properly understand the marginal effects of gdp and gini in this model. For an introduction to the -margins- command, see https://www3.nd.edu/~rwilliam/stats/Margins01.pdf.

    Comment


    • #3
      Guest:
      welcome to this forum.
      As an aside to Clyde's enlightening advice, the misspecification of your -xtreg,re- model is also highlighted by a beetween R_q=1.0000.
      Last edited by sladmin; 17 Nov 2022, 08:40. Reason: Anonymize original poster
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        Thank you, Schechter and Lazzaro, for your feedbacks. I am sorry for the late reply.

        I took up your advice Schechter and I got results on that.

        xtreg $ylist $xlist, fe

        Fixed-effects (within) regression Number of obs = 135
        Group variable: state_number Number of groups = 15

        R-sq: Obs per group:
        within = 0.8379 min = 9
        between = 0.2782 avg = 9.0
        overall = 0.3074 max = 9

        F(5,115) = 118.92
        corr(u_i, Xb) = -0.0057 Prob > F = 0.0000

        ------------------------------------------------------------------------------
        l_eu | Coef. Std. Err. t P>|t| [95% Conf. Interval]
        -------------+----------------------------------------------------------------
        l_gdp | 1.825948 .4681454 3.90 0.000 .8986425 2.753254
        l_gdp2 | -.0674415 .0323705 -2.08 0.039 -.1315613 -.0033217
        gini | -2.250728 1.710531 -1.32 0.191 -5.638961 1.137506
        gini2 | 15.19577 5.414342 2.81 0.006 4.470998 25.92054
        l_gdp_gini | -.896535 .5736639 -1.56 0.121 -2.032853 .2397827
        _cons | -2.80258 1.645946 -1.70 0.091 -6.062882 .457721
        -------------+----------------------------------------------------------------
        sigma_u | .54223491
        sigma_e | .06309806
        rho | .98663972 (fraction of variance due to u_i)
        ------------------------------------------------------------------------------
        F test that all u_i=0: F(14, 115) = 566.62 Prob > F = 0.0000

        I found gini alone not to be significant. However, I don't know how I can explain these results with regard to each state.

        Can you help me with that?

        If its just one country, I can explain the effects of each variable. I used data from 15 states. I don't know how I could explain these effects based on the different states?

        They all can't have the same effects right? \

        Comment


        • #5
          You adopted part of what I suggested, but not all of it. As a result, you are left with a mis-specified model. It is not valid to include an l_gdp_gini interaction term when l_gdp and gini are themselves introduced with quadratic terms. You must also interact the quadratic terms. While you can code the quadratic interaction between l_gdp and gini, and the cross-interactions of linear l_gdp and quadratic gini (and vice versa) by hand if you like, I strongly recommend that you instead use the factor-variable notation approach I showed you in #2. First, it's much simpler: it's quick to write out and it will not omit any of the needed terms by accident. Also, you will almost surely need to use the -margins- command to interpret the results here, as this model will be pretty complicated to interpret without it. And without factor-variable notation, -margins- will not work.

          At the moment there is nothing to interpret as the model is mis-specified.

          Comment


          • #6
            Okay. I think I will proceed with that and get back to you if I get stuck. Thank you!

            Comment

            Working...
            X