Announcement

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

  • Dummy variable

    Hi everybody
    How do I test if a time dummy is significant in a panel data?

  • #2
    The output of any variable, whether it is a "dummy" variable or not, is interpreted in the same way. Stata uses the same layout for all estimation program results. The first column gives the name of the variable. The second gives its regression coefficient (or a transform thereof such as an odds ratio or incidence rate ratio in some circumstances), the third column gives the standard error of the coefficient. The fourth column gives a test statistic, which, depending on the particular analysis, might be a t, z, or chi square statistic testing a null hypothesis (usually the null hypothesis that the coefficient is zero). Following that in the fifth column is the p-value for that hypothesis test, which you can use to assess statistical significance. The sixth and seventh columns give the lower and upper 95% confidence limits (or confidence limits at some other level if a different level was specified in the command.) It doesn't matter what type of regression was done, nor what type of variable we are referring to, the layout and the interpretation are the same.

    Comment


    • #3
      I dont think I made myself clear. I meant that I want to perform a formel test, in order to decide whether my time invariant dummy l.time is significant? I have many coefficients for the dummy as my period stretches over 20 years.

      Comment


      • #4
        You need to present your regression command to better illustrate your question. In xtreg,fe, here is how you test the joint significance of the time dummies which can also be considered a test for the choice between the one-way fixed effects model and the two-way fixed effects model


        Code:
        webuse grunfeld
        
        . qui xtreg invest mvalue kstock i.year, fe
        
        
        . testparm i.year
        
         ( 1)  1936.year = 0
         ( 2)  1937.year = 0
         ( 3)  1938.year = 0
         ( 4)  1939.year = 0
         ( 5)  1940.year = 0
         ( 6)  1941.year = 0
         ( 7)  1942.year = 0
         ( 8)  1943.year = 0
         ( 9)  1944.year = 0
         (10)  1945.year = 0
         (11)  1946.year = 0
         (12)  1947.year = 0
         (13)  1948.year = 0
         (14)  1949.year = 0
         (15)  1950.year = 0
         (16)  1951.year = 0
         (17)  1952.year = 0
         (18)  1953.year = 0
         (19)  1954.year = 0
        
               F( 19,   169) =    1.40
                    Prob > F =    0.1309

        Comment


        • #5
          Click image for larger version

Name:	Skærmbillede 2018-04-28 10.44.45.png
Views:	1
Size:	9.6 KB
ID:	1441781
          thank you so much for the reply. But how do I interpret this? Is the timedummy significant or not?

          Comment


          • #6
            So when you are interpreting any test result (in general), the first question that you should ask is what is the null hypothesis. In this case, the null is that the time dummies are jointly equal to 0 which implies that they are jointly not significant. The second step is to look at the p-value, and its significance means that you reject the null hypothesis in favor of the alternative hypothesis. In your case, the p-value is highly significant (p-value <0.0001) implying that the time dummies are jointly significant. If your goal was to choose between the one-way fixed effects model and the two-way fixed effects model based on this test, then you would go for the two-way model.

            Comment


            • #7
              so it is correct understood that a two way FE means that I perform a FE model including the time-dummy?

              Comment


              • #8
                Yes. Note that it is time dummies (plural)

                Comment


                • #9
                  Thank you so much for your help

                  Comment


                  • #10
                    can you tell me how I can export this output into a word document?

                    Comment


                    • #11
                      Look at

                      Code:
                      help esttab
                      There are examples in there.

                      Comment


                      • #12
                        is this test equivalent to testing for time fixed effects? or is just to test joint significance of time dummies?

                        Comment


                        • #13
                          Both are one and the same. To test for time effects, we test for the joint significance of the time dummies.

                          Comment


                          • #14
                            Dear all,

                            In my two-way fixed effects model, time dummies are individually not significant, but are jointly significant. I guess that it implies that the two-way fixed effects model is appropriate, but I am having trouble interpreting this result more precisely. Time does have a significant effect over the whole period, but not on a yearly scale??? Any help would be appreciated!

                            Best,
                            Anne

                            Comment


                            • #15
                              The observed coefficients are relative to the base (omitted) coefficient. It may be the case that each coefficient does not differ from the base coefficient, but you have not compared the observed coefficients to each other. In any case, the joint significance is what matters in terms of your choice. If you want to get the full range of comparisons, you can use margins.

                              Code:
                              webuse grunfeld, clear
                              xtreg invest mvalue kstock i.year, fe
                              margins year, pwcompare(pveffects)
                              Res.:

                              Code:
                              . margins year, pwcompare(pveffects)
                              
                              Pairwise comparisons of predictive margins                 Number of obs = 200
                              Model VCE: Conventional
                              
                              Expression: Linear prediction, predict()
                              
                              ------------------------------------------------------
                                            |            Delta-method    Unadjusted
                                            |   Contrast   std. err.      z    P>|z|
                              --------------+---------------------------------------
                                       year |
                              1936 vs 1935  |  -19.19741   23.67586    -0.81   0.417
                              1937 vs 1935  |  -40.69001   24.69541    -1.65   0.099
                              1938 vs 1935  |   -39.2264   23.23594    -1.69   0.091
                              1939 vs 1935  |  -69.47029   23.65607    -2.94   0.003
                              1940 vs 1935  |  -44.23507   23.80979    -1.86   0.063
                              1941 vs 1935  |  -18.80446     23.694    -0.79   0.427
                              1942 vs 1935  |  -21.13979   23.38163    -0.90   0.366
                              1943 vs 1935  |  -42.97762   23.55287    -1.82   0.068
                              1944 vs 1935  |  -43.09876    23.6102    -1.83   0.068
                              1945 vs 1935  |  -55.68303   23.89561    -2.33   0.020
                              1946 vs 1935  |  -31.16928   24.11598    -1.29   0.196
                              1947 vs 1935  |  -39.39223   23.78368    -1.66   0.098
                              1948 vs 1935  |  -43.71651   23.96965    -1.82   0.068
                              1949 vs 1935  |   -73.4951   24.18292    -3.04   0.002
                              1950 vs 1935  |  -75.89611   24.34553    -3.12   0.002
                              1951 vs 1935  |   -62.4809   24.86425    -2.51   0.012
                              1952 vs 1935  |  -64.63233    25.3495    -2.55   0.011
                              1953 vs 1935  |  -67.71796   26.61108    -2.54   0.011
                              1954 vs 1935  |  -93.52622   27.10786    -3.45   0.001
                              1937 vs 1936  |   -21.4926   23.41302    -0.92   0.359
                              1938 vs 1936  |    -20.029    23.4567    -0.85   0.393
                              1939 vs 1936  |  -50.27288   23.20539    -2.17   0.030
                              1940 vs 1936  |  -25.03767   23.20592    -1.08   0.281
                              1941 vs 1936  |   .3929452   23.24609     0.02   0.987
                              1942 vs 1936  |  -1.942385   23.57649    -0.08   0.934
                              1943 vs 1936  |  -23.78021   23.42174    -1.02   0.310
                              1944 vs 1936  |  -23.90136   23.38106    -1.02   0.307
                              1945 vs 1936  |  -36.48563   23.34652    -1.56   0.118
                              1946 vs 1936  |  -11.97187   23.40037    -0.51   0.609
                              1947 vs 1936  |  -20.19483   23.95939    -0.84   0.399
                              1948 vs 1936  |   -24.5191   24.27706    -1.01   0.313
                              1949 vs 1936  |  -54.29769   24.46878    -2.22   0.026
                              1950 vs 1936  |   -56.6987   24.48397    -2.32   0.021
                              1951 vs 1936  |  -43.28349   24.37577    -1.78   0.076
                              1952 vs 1936  |  -45.43492   24.80626    -1.83   0.067
                              1953 vs 1936  |  -48.52055   25.57849    -1.90   0.058
                              1954 vs 1936  |  -74.32881   26.28383    -2.83   0.005
                              1938 vs 1937  |   1.463603    24.2351     0.06   0.952
                              1939 vs 1937  |  -28.78028   23.51771    -1.22   0.221
                              1940 vs 1937  |  -3.545069   23.40731    -0.15   0.880
                              1941 vs 1937  |   21.88554   23.55062     0.93   0.353
                              1942 vs 1937  |   19.55021   24.30881     0.80   0.421
                              1943 vs 1937  |  -2.287612   23.92976    -0.10   0.924
                              1944 vs 1937  |  -2.408759   23.82231    -0.10   0.919
                              1945 vs 1937  |  -14.99303   23.55889    -0.64   0.525
                              1946 vs 1937  |   9.520725   23.48533     0.41   0.685
                              1947 vs 1937  |   1.297771   24.62892     0.05   0.958
                              1948 vs 1937  |  -3.026506   25.01346    -0.12   0.904
                              1949 vs 1937  |  -32.80509   25.17315    -1.30   0.193
                              1950 vs 1937  |   -35.2061   25.07969    -1.40   0.160
                              1951 vs 1937  |   -21.7909   24.52536    -0.89   0.374
                              1952 vs 1937  |  -23.94232    24.8852    -0.96   0.336
                              1953 vs 1937  |  -27.02795   25.25517    -1.07   0.285
                              1954 vs 1937  |  -52.83621   26.07413    -2.03   0.043
                              1939 vs 1938  |  -30.24389   23.34138    -1.30   0.195
                              1940 vs 1938  |  -5.008671   23.44871    -0.21   0.831
                              1941 vs 1938  |   20.42194   23.34856     0.87   0.382
                              1942 vs 1938  |   18.08661   23.17438     0.78   0.435
                              1943 vs 1938  |  -3.751214   23.24003    -0.16   0.872
                              1944 vs 1938  |  -3.872361   23.27274    -0.17   0.868
                              1945 vs 1938  |  -16.45663   23.46072    -0.70   0.483
                              1946 vs 1938  |   8.057122   23.61587     0.34   0.733
                              1947 vs 1938  |  -.1658317   23.42073    -0.01   0.994
                              1948 vs 1938  |  -4.490108   23.58715    -0.19   0.849
                              1949 vs 1938  |  -34.26869   23.74645    -1.44   0.149
                              1950 vs 1938  |   -36.6697   23.84045    -1.54   0.124
                              1951 vs 1938  |   -23.2545   24.15953    -0.96   0.336
                              1952 vs 1938  |  -25.40592   24.55653    -1.03   0.301
                              1953 vs 1938  |  -28.49156   25.60374    -1.11   0.266
                              1954 vs 1938  |  -54.29982    26.0657    -2.08   0.037
                              1940 vs 1939  |   25.23521   23.14316     1.09   0.276
                              1941 vs 1939  |   50.66583   23.13657     2.19   0.029
                              1942 vs 1939  |    48.3305   23.35672     2.07   0.039
                              1943 vs 1939  |   26.49267   23.21816     1.14   0.254
                              1944 vs 1939  |   26.37152   23.19015     1.14   0.255
                              1945 vs 1939  |   13.78726   23.17699     0.59   0.552
                              1946 vs 1939  |   38.30101   23.22489     1.65   0.099
                              1947 vs 1939  |   30.07805   23.57282     1.28   0.202
                              1948 vs 1939  |   25.75378    23.8143     1.08   0.280
                              1949 vs 1939  |  -4.024807   23.95408    -0.17   0.867
                              1950 vs 1939  |  -6.425819   23.95215    -0.27   0.788
                              1951 vs 1939  |   6.989388   23.87216     0.29   0.770
                              1952 vs 1939  |   4.837962   24.22317     0.20   0.842
                              1953 vs 1939  |    1.75233   24.94469     0.07   0.944
                              1954 vs 1939  |  -24.05593   25.52497    -0.94   0.346
                              1941 vs 1940  |   25.43061   23.14742     1.10   0.272
                              1942 vs 1940  |   23.09528    23.4584     0.98   0.325
                              1943 vs 1940  |   1.257457   23.27331     0.05   0.957
                              1944 vs 1940  |    1.13631    23.2313     0.05   0.961
                              1945 vs 1940  |  -11.44796   23.17133    -0.49   0.621
                              1946 vs 1940  |   13.06579   23.19403     0.56   0.573
                              1947 vs 1940  |   4.842839   23.66796     0.20   0.838
                              1948 vs 1940  |   .5185628   23.92638     0.02   0.983
                              1949 vs 1940  |  -29.26002   24.06167    -1.22   0.224
                              1950 vs 1940  |  -31.66103   24.03795    -1.32   0.188
                              1951 vs 1940  |  -18.24583   23.86576    -0.76   0.445
                              1952 vs 1940  |  -20.39725   24.20563    -0.84   0.399
                              1953 vs 1940  |  -23.48288   24.84901    -0.95   0.345
                              1954 vs 1940  |  -49.29115    25.4568    -1.94   0.053
                              1942 vs 1941  |  -2.335331   23.33614    -0.10   0.920
                              1943 vs 1941  |  -24.17316   23.19535    -1.04   0.297
                              1944 vs 1941  |   -24.2943   23.16868    -1.05   0.294
                              1945 vs 1941  |  -36.87857    23.1545    -1.59   0.111
                              1946 vs 1941  |  -12.36482   23.19729    -0.53   0.594
                              1947 vs 1941  |  -20.58777   23.50776    -0.88   0.381
                              1948 vs 1941  |  -24.91205    23.7315    -1.05   0.294
                              1949 vs 1941  |  -54.69063    23.8569    -2.29   0.022
                              1950 vs 1941  |  -57.09165    23.8474    -2.39   0.017
                              1951 vs 1941  |  -43.67644   23.76191    -1.84   0.066
                              1952 vs 1941  |  -45.82787   24.09014    -1.90   0.057
                              1953 vs 1941  |   -48.9135   24.78677    -1.97   0.048
                              1954 vs 1941  |  -74.72176   25.33737    -2.95   0.003
                              1943 vs 1942  |  -21.83783     23.182    -0.94   0.346
                              1944 vs 1942  |  -21.95897   23.21608    -0.95   0.344
                              1945 vs 1942  |  -34.54324   23.39232    -1.48   0.140
                              1946 vs 1942  |  -10.02949   23.52777    -0.43   0.670
                              1947 vs 1942  |  -18.25244   23.24257    -0.79   0.432
                              1948 vs 1942  |  -22.57672   23.35792    -0.97   0.334
                              1949 vs 1942  |   -52.3553   23.47278    -2.23   0.026
                              1950 vs 1942  |  -54.75632   23.54052    -2.33   0.020
                              1951 vs 1942  |  -41.34111   23.82988    -1.73   0.083
                              1952 vs 1942  |  -43.49254   24.15733    -1.80   0.072
                              1953 vs 1942  |  -46.57817   25.12082    -1.85   0.064
                              1954 vs 1942  |  -72.38643   25.49756    -2.84   0.005
                              1944 vs 1943  |   -.121147   23.13649    -0.01   0.996
                              1945 vs 1943  |  -12.70542   23.21482    -0.55   0.584
                              1946 vs 1943  |   11.80834   23.29775     0.51   0.612
                              1947 vs 1943  |   3.585383   23.27433     0.15   0.878
                              1948 vs 1943  |   -.738894   23.42551    -0.03   0.975
                              1949 vs 1943  |  -30.51748   23.52974    -1.30   0.195
                              1950 vs 1943  |  -32.91849   23.54942    -1.40   0.162
                              1951 vs 1943  |  -19.50328   23.64171    -0.82   0.409
                              1952 vs 1943  |  -21.65471    23.9445    -0.90   0.366
                              1953 vs 1943  |  -24.74034   24.74625    -1.00   0.317
                              1954 vs 1943  |   -50.5486   25.17805    -2.01   0.045
                              1945 vs 1944  |  -12.58427   23.18086    -0.54   0.587
                              1946 vs 1944  |   11.92948   23.24892     0.51   0.608
                              1947 vs 1944  |    3.70653   23.31252     0.16   0.874
                              1948 vs 1944  |   -.617747   23.47821    -0.03   0.979
                              1949 vs 1944  |  -30.39633   23.58234    -1.29   0.197
                              1950 vs 1944  |  -32.79734   23.58928    -1.39   0.164
                              1951 vs 1944  |  -19.38214   23.62328    -0.82   0.412
                              1952 vs 1944  |  -21.53356   23.92339    -0.90   0.368
                              1953 vs 1944  |  -24.61919   24.68081    -1.00   0.319
                              1954 vs 1944  |  -50.42746   25.13577    -2.01   0.045
                              1946 vs 1945  |   24.51375   23.14732     1.06   0.290
                              1947 vs 1945  |    16.2908   23.47541     0.69   0.488
                              1948 vs 1945  |   11.96652   23.67736     0.51   0.613
                              1949 vs 1945  |  -17.81206   23.77224    -0.75   0.454
                              1950 vs 1945  |  -20.21308   23.73292    -0.85   0.394
                              1951 vs 1945  |  -6.797868   23.57166    -0.29   0.773
                              1952 vs 1945  |  -8.949295   23.84817    -0.38   0.707
                              1953 vs 1945  |  -12.03493   24.44082    -0.49   0.622
                              1954 vs 1945  |  -37.84319   24.95347    -1.52   0.129
                              1947 vs 1946  |  -8.222954   23.58158    -0.35   0.727
                              1948 vs 1946  |  -12.54723   23.79339    -0.53   0.598
                              1949 vs 1946  |  -42.32582   23.87597    -1.77   0.076
                              1950 vs 1946  |  -44.72683   23.80845    -1.88   0.060
                              1951 vs 1946  |  -31.31162   23.54054    -1.33   0.183
                              1952 vs 1946  |  -33.46305   23.79217    -1.41   0.160
                              1953 vs 1946  |  -36.54868   24.28162    -1.51   0.132
                              1954 vs 1946  |  -62.35694   24.80931    -2.51   0.012
                              1948 vs 1947  |  -4.324277   23.15932    -0.19   0.852
                              1949 vs 1947  |  -34.10286   23.20028    -1.47   0.142
                              1950 vs 1947  |  -36.50387   23.22728    -1.57   0.116
                              1951 vs 1947  |  -23.08867   23.47939    -0.98   0.325
                              1952 vs 1947  |  -25.24009   23.68945    -1.07   0.287
                              1953 vs 1947  |  -28.32572   24.51678    -1.16   0.248
                              1954 vs 1947  |  -54.13398    24.7417    -2.19   0.029
                              1949 vs 1948  |  -29.77858   23.14476    -1.29   0.198
                              1950 vs 1948  |   -32.1796    23.1752    -1.39   0.165
                              1951 vs 1948  |  -18.76439   23.49811    -0.80   0.425
                              1952 vs 1948  |  -20.91582   23.66672    -0.88   0.377
                              1953 vs 1948  |  -24.00145   24.50339    -0.98   0.327
                              1954 vs 1948  |  -49.80971   24.63549    -2.02   0.043
                              1950 vs 1949  |  -2.401012   23.14625    -0.10   0.917
                              1951 vs 1949  |   11.01419   23.44705     0.47   0.639
                              1952 vs 1949  |   8.862769   23.57354     0.38   0.707
                              1953 vs 1949  |   5.777137   24.35359     0.24   0.812
                              1954 vs 1949  |  -20.03112   24.43391    -0.82   0.412
                              1951 vs 1950  |   13.41521   23.33481     0.57   0.565
                              1952 vs 1950  |   11.26378   23.43051     0.48   0.631
                              1953 vs 1950  |   8.178149   24.11129     0.34   0.734
                              1954 vs 1950  |  -17.63011   24.19119    -0.73   0.466
                              1952 vs 1951  |  -2.151426   23.16899    -0.09   0.926
                              1953 vs 1951  |  -5.237058   23.49494    -0.22   0.824
                              1954 vs 1951  |  -31.04532   23.67891    -1.31   0.190
                              1953 vs 1952  |  -3.085631   23.33629    -0.13   0.895
                              1954 vs 1952  |  -28.89389   23.43739    -1.23   0.218
                              1954 vs 1953  |  -25.80826   23.22233    -1.11   0.266
                              ------------------------------------------------------

                              Comment

                              Working...
                              X