Announcement

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

  • Time fixed effects as dummies change significance

    Dear Statalist,
    I am doing research on using nighttime light (radiances per area) to predict real regional GDP (fixed effect model). I have a dataset of 34 provinces in Indonesia for the period 2012-2020 (quarterly data). My mentor suggested I include time fixed effects (i.qdate) as dummies. But when I do so, the significance of my interest variable (ln_nli) become insignificance. Here's my result before and after adding the time dummy:

    HTML Code:
    . xtreg ln_pdrb ln_nli, fe ro
    
    Fixed-effects (within) regression               Number of obs     =      1,122
    Group variable: id                              Number of groups  =         34
    
    R-sq:                                           Obs per group:
         within  = 0.3997                                         min =         33
         between = 0.5016                                         avg =       33.0
         overall = 0.4384                                         max =         33
    
                                                    F(1,33)           =     164.09
    corr(u_i, Xb)  = 0.5619                         Prob > F          =     0.0000
    
                                        (Std. Err. adjusted for 34 clusters in id)
    ------------------------------------------------------------------------------
                 |               Robust
         ln_pdrb |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
          ln_nli |   .1354336   .0105727    12.81   0.000     .1139234    .1569438
           _cons |   17.57699   .0132365  1327.91   0.000     17.55006    17.60392
    -------------+----------------------------------------------------------------
         sigma_u |  1.0395109
         sigma_e |  .09782348
             rho |  .99122193   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    
    . xtreg ln_pdrb ln_nli i.qdate, fe ro
    
    Fixed-effects (within) regression               Number of obs     =      1,122
    Group variable: id                              Number of groups  =         34
    
    R-sq:                                           Obs per group:
         within  = 0.8764                                         min =         33
         between = 0.5016                                         avg =       33.0
         overall = 0.0234                                         max =         33
    
                                                    F(33,33)          =    2325.52
    corr(u_i, Xb)  = 0.0511                         Prob > F          =     0.0000
    
                                        (Std. Err. adjusted for 34 clusters in id)
    ------------------------------------------------------------------------------
                 |               Robust
         ln_pdrb |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
          ln_nli |   .0071749   .0077611     0.92   0.362    -.0086152     .022965
                 |
           qdate |
            210  |   .0281132   .0041704     6.74   0.000     .0196284     .036598
            211  |   .0285663   .0122469     2.33   0.026     .0036498    .0534829
            212  |    .024168    .005581     4.33   0.000     .0128133    .0355227
            213  |   .0488249   .0061412     7.95   0.000     .0363305    .0613193
            214  |   .0875023   .0051872    16.87   0.000     .0769489    .0980558
            215  |   .0941612   .0083881    11.23   0.000     .0770956    .1112268
            216  |   .0838755   .0067473    12.43   0.000      .070148    .0976031
            217  |   .1006991   .0075333    13.37   0.000     .0853726    .1160257
            218  |   .1361169   .0075222    18.10   0.000     .1208129     .151421
            219  |   .1439286   .0096934    14.85   0.000     .1242073    .1636499
            220  |   .1285819   .0108631    11.84   0.000     .1064807    .1506831
            221  |   .1559425   .0114074    13.67   0.000     .1327339    .1791511
            222  |   .1867966   .0137596    13.58   0.000     .1588025    .2147908
            223  |   .1943102   .0123963    15.67   0.000     .1690897    .2195306
            224  |   .1819726   .0131942    13.79   0.000     .1551288    .2088164
            225  |   .2012336   .0147666    13.63   0.000     .1711906    .2312765
            226  |   .2399893   .0158784    15.11   0.000     .2076846    .2722941
            227  |   .2516112   .0157364    15.99   0.000     .2195952    .2836271
            228  |    .226623   .0139323    16.27   0.000     .1982774    .2549686
            229  |   .2448326   .0165766    14.77   0.000     .2111072     .278558
            230  |   .2867302    .017884    16.03   0.000     .2503448    .3231156
            231  |   .2939583   .0178568    16.46   0.000     .2576285    .3302882
            232  |   .2795545   .0156349    17.88   0.000     .2477451    .3113639
            233  |   .3027815   .0186151    16.27   0.000     .2649088    .3406543
            234  |   .3326927   .0192472    17.29   0.000      .293534    .3718515
            235  |   .3371736   .0174018    19.38   0.000     .3017693    .3725779
            236  |   .3191344   .0175763    18.16   0.000     .2833752    .3548936
            237  |   .3431905   .0194555    17.64   0.000     .3036079    .3827731
            238  |    .378396   .0187595    20.17   0.000     .3402295    .4165625
            239  |   .3853209    .020027    19.24   0.000     .3445757    .4260661
            240  |   .3490189   .0187365    18.63   0.000     .3108993    .3871385
            241  |   .3074161   .0198125    15.52   0.000     .2671072     .347725
                 |
           _cons |   17.21329   .0166101  1036.32   0.000     17.17949    17.24708
    -------------+----------------------------------------------------------------
         sigma_u |  1.1418697
         sigma_e |  .04505634
             rho |  .99844546   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    Last edited by Lediana Safira; 28 Nov 2020, 19:29.

  • #2
    For additional information, all the variables are in log natural form (because we want to focus on growth). I've already check VIF,uncentered but everything looks okay. When I checked the correlation of regional GDP (ln_pdrb) and night light (ln_nli) I've got 0.662. Do you have any idea why this happened?

    Comment


    • #3
      Lediana Safira that's not too surprising if both the independent and dependent variables were changing over time. It just means that once you account for these changes over time, a change in X is not related to a change in Y. Try plotting both your IV and DV over time and you should be able to see the relationship. Could provinces that make more money invest more in nightime lighting (or have more because there are more nighttime businesses or something)? You might want to test for a reciprocal relationship and account for temporal order.

      Comment


      • #4
        Yes, what you have is an extremely strong secular trend in GDP. Look at those qdate coefficients marching rapidly up with each passing quarter. Notice that the within-R2 has skyrocketed from about .40 to about 0.88. This time trend is sucking up all the oxygen. It seems then that the correlation between night light and regional GDP within regions is largely attributable to both of them growing over time--which doesn't seem very surprising to me.

        Added: Crossed with #3 which raises the same point and provides some additional helpful suggestions.

        Comment


        • #5
          Tom Scott Thank you for your suggestions.

          Try plotting both your IV and DV over time and you should be able to see the relationship.
          I've tried to plot the IV and DV and here's the result:
          Click image for larger version

Name:	nli.png
Views:	1
Size:	7.2 KB
ID:	1583874

          It seems that on average, the higher the night lights intensity in a province corresponds with higher real regional GDP.

          You might want to test for a reciprocal relationship and account for temporal order.
          Could you elaborate on how we can test the reciprocal relationship, especially with the stata command example? Can I do this by reversing the IV and DV position (ln_pdrb as DV) in my regression? I've searched in the help section, but it gave me "simple correspondence analysis" as a result.

          And for accounting for the temporal order, isn't it already solved when we set the data into panel data with xtset?

          Thank you.

          Comment


          • #6
            Thank you very much for your insights, Clyde Schechter. I agree that apparently the time trend playing a major role in affecting my regression result. Both night light and regional GDP indeed growing overtime. Does it mean that over time, because the change in X is not significantly related to a change in Y, it can not support my argument that we can use night light as a proxy for the regional GDP?

            Comment


            • #7
              Lediana Safira

              1) That is not the plot I was talking about. Try this command to visualize the slopes of your dependent variable and your independent variable over a continuous time x-axis: Insert your continuous time measure for 'time'

              Code:
              twoway (line ln_pdrb time) (line ln_nli time)
              2) No, to account for temporal order you need to regress a lagged x on y. So create the lag using the following code. Importantly, this will create a one-quarter lag, which might not make sense in practice. You can increase the lag by changing the L1.var to L2.var for a two-period lag and so on. How long do you think it will take for a change in nightime lighting to have an effect on GDP? You might not want to go down this rabbit hole, but if you don't establish the correct temporal order, you can't know whether the relationship is due to a change in nightime lighting on GDP during the quarter or a change in GDP on nightime lighting during the quarter.

              Code:
               xtreg ln_pdrb L1.ln_nli, fe ro
              3) The first step is to regress lagged X on Y and then lagged Y on X. Since it doesn't look like there is a statistically significant effect of X on Y, you might not need to worry about this. Though I do think you should think about the lag structure and see if there is a lagged relationship. If there were a relationship, there are different ways to account for the reciprocal relationship when estimating the effect of X on Y. In your case, I think you would want to do something like a cross-lagged fixed effects regression model. I do these types of models in sem/gsem or using xtdpdml.
              Last edited by Tom Scott; 28 Nov 2020, 22:41.

              Comment


              • #8
                Does it mean that over time, because the change in X is not significantly related to a change in Y, it can not support my argument that we can use night light as a proxy for the regional GDP?
                Well, given that, in the absence of the time variable, there is a strong correlation between night light and GDP within a given region, you can use night light as a proxy for GDP. But since you have the GDP data anyway, why would you use a proxy? If you are thinking of using this relationship in other regions for which you do not have GDP data but can access night light data, that is problematic. There is no assurance that the same relationship between the variables obtains out of sample. Moreover, since your analysis is a within-region analysis, the most you could say about your proxy relationship is that because night light changed by a certain amount, you think that GDP changed by some other certain amount over the same time period. But you could not use this model (even if there were not problem of confounding by time) to estimate the level of GDP in any other region. And what your data really suggest is that if you want to use a proxy for GDP changes over time within a region, the calendar date would be the most effective proxy of all.

                Comment

                Working...
                X