Announcement

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

  • rhausman test bootstrap warning

    Hi everyone,

    This is my first post. So ı may make mistakes. I am ran panel analysis. My model have 264 observations, 5 independent variable and strongly balanced. However, while choosing the model, I came across the following warning. What can I do?

    Note: I use stata 17.0 .
    Click image for larger version

Name:	Ekran görüntüsü 2023-11-07 222835.png
Views:	1
Size:	26.0 KB
ID:	1733100

    Last edited by Elif Imzali; 07 Nov 2023, 13:14.

  • #2
    That's a strange warning, and clearly not what's really going on. Can you show the estimates from FE and RE?

    Do any of those variables change only across time (without cross-sectional variation). If so, there's always a degeneracy in comparing FE and RE. This always happens with time dummies on a balanced panel.

    As per FAQ, using -dataex- to show a sample of your data is desirable and helpful.

    There are easier ways to obtain a cluster-robust Hausman test. Using the Mundlak equation is one, and it won't lead to the degrees-of-freedom problem.

    Comment


    • #3
      Dear Jeff Wooldridge thank you for your answer.


      my dataex is below but i have 12 country and 264 observations.

      yıl=year
      ulke=country
      ca=current account balances($)
      ea=primary energy production-final consumption(ktoe)
      yek= renewable energy production
      redk=real effective exchange (2015=100)
      brent=crude oil prices( brent, $)
      gsyih= GDP


      Code:
      * Example generated by -dataex-. For more info, type help dataex
      clear
      input int yıl byte ulke double(ca ea) float(redk brent yek) double gsyih
      2000 1   -9.920e+09       35138  92.15719  28.49545      3633 2.74295e+11
      2001 1    3.760e+09       30914   73.2093  24.44389      3121 2.01753e+11
      2002 1   -6.260e+08       35056  82.82148 25.023256      4039 2.40249e+11
      2003 1   -7.554e+09       40063  90.47211 28.830704      4254 3.14596e+11
      2004 1  -1.4198e+10       43989   94.2322    38.265      5234 4.08865e+11
      2005 1   -2.098e+10       46090 104.15483  54.52109      4799 5.06315e+11
      2006 1  -3.1161e+10       48549 102.41817 65.144066      5126 5.57076e+11
      2007 1  -3.6946e+10       52271 110.88652  72.38908      4474 6.81321e+11
      2008 1  -3.9425e+10 49003.29946 112.61688  97.25597      4522 7.70449e+11
      2009 1   -1.136e+10 48757.66603 106.31525  61.67126      5283 6.49289e+11
      2010 1   -4.462e+10  48282.4919   117.598  79.49554      7109 7.76967e+11
      2011 1  -7.4402e+10 54139.98215 103.39072  111.2556      7615 8.38786e+11
      2012 1  -4.7278e+10  58396.6387 107.75486  111.6697      8508 8.80556e+11
      2013 1  -5.5092e+10 58968.26934 106.28954 108.65852      9242 9.57799e+11
      2014 1   -3.802e+10 60657.30009 101.05545  98.94601      8636 9.38934e+11
      2015 1  -2.6625e+10 68531.64333       100  52.38676     15354 8.64314e+11
      2016 1  -2.6668e+10 69199.41306  98.56945  43.73417     16909 8.69683e+11
      2017 1  -3.9955e+10 76293.42464   88.1853  54.19244     17298 8.58989e+11
      2018 1  -2.0151e+10 69763.49738  73.81125  71.31006     19775 7.78477e+11
      2019 1   1.0796e+10  65827.9719  74.51665  64.21057     23938 7.59935e+11
      2020 1  -3.1888e+10 69631.47609  66.94376  41.83834     24608 7.20289e+11
      2021 1   -7.232e+09 77139.21031  59.20414 70.911896     24905 8.19034e+11
      2000 2  -3106733996   96643.483   96.5514  28.49545  9597.177 1.14668e+12
      2001 2   1814148808   99331.777  97.08913  24.44389  9774.572 1.16802e+12
      2002 2  -6277210864    98193.68  99.29518 25.023256 10178.864 1.27677e+12
      2003 2 -12128604342  103434.589  105.9516 28.830704 12130.063 1.57762e+12
      2004 2  -8978989363  104655.274 107.68027    38.265  12192.97 1.80654e+12
      2005 2 -16714795195  107007.619 105.95556  54.52109 13328.415 1.85822e+12
      2006 2 -28321585639  105584.709 105.47578 65.144066  14200.85 1.94955e+12
      2007 2 -30129935945   103487.39 106.39691  72.38908 15953.013  2.2131e+12
      2008 2 -66400853363  101400.911 107.93314  97.25597 18787.371 2.40866e+12
      2009 2 -40410770649   94551.516 109.31352  61.67126 19294.568 2.19993e+12
      2010 2 -70819281580   95561.145  104.3373  79.49554 19394.799  2.1361e+12
      2011 2 -64808125979   91267.035 104.48255  111.2556 18223.582 2.29499e+12
      2012 2  -5129312523   86852.072 102.51107  111.6697  21104.43 2.08696e+12
      2013 2  24764660544   81787.445  104.4103 108.65852 23499.705 2.14192e+12
      2014 2  40309629204   76615.267  104.6746  98.94601  23644.16 2.16201e+12
      2015 2  26369229238   80126.306       100  52.38676 23563.814 1.83664e+12
      2016 2  49686018258   82401.643  100.8403  43.73417 23568.715 1.87707e+12
      2017 2  53102122703   78518.846  101.4173  54.19244 26540.396  1.9618e+12
      2018 2  53985858785    78983.46 103.37186  71.31006  26656.74 2.09193e+12
      2019 2  66338542372   78445.764 101.07948  64.21057  27088.26  2.0113e+12
      2020 2  74502213527   65258.558 101.92516  41.83834 27339.285 1.89721e+12
      2021 2  65314786120   76595.613 101.52102 70.911896  27698.06 2.11436e+12
      2000 3 -25928189733    48714.55  91.99219  28.49545  6741.828 5.98363e+11
      2001 3 -27555477892   50808.002  93.11381  24.44389  8082.714  6.2783e+11
      2002 3 -26251685129   53930.364  95.76795 25.023256  6846.587 7.08757e+11
      2003 3 -35103881712   57976.687  101.1051 28.830704  9192.514 9.07492e+11
      2004 3 -58677027283   62710.749 103.08232    38.265  8808.978 1.06906e+12
      2005 3 -83915470590   68116.678  103.1746  54.52109   8392.96 1.15372e+12
      2006 3 -1.11532e+11   64649.934 104.21236 65.144066   9156.91  1.2604e+12
      2007 3 -1.39288e+11   68339.186  105.8644  72.38908   9995.92   1.474e+12
      2008 3 -1.45716e+11   64820.714  108.5638  97.25597  10305.36 1.63186e+12
      2009 3 -60418930687     57627.3  109.0497  61.67126 12376.197 1.49147e+12
      2010 3 -52249545356   55029.323  105.5756  79.49554 14626.187 1.42211e+12
      2011 3 -39975229878   54923.705 105.85408  111.2556 13926.016 1.48071e+12
      2012 3    735150583   49930.795 103.28827  111.6697 14615.234 1.32475e+12
      2013 3  27588004255   46216.626 105.24082 108.65852 17533.426 1.35558e+12
      2014 3  22662337679   43985.183 104.75703  98.94601 18307.205 1.37182e+12
      2015 3  24107676878   46370.169       100  52.38676 17266.512 1.19616e+12
      2016 3  39298651172   47824.528  100.6997  43.73417 17744.656 1.23355e+12
      2017 3  36857922351   50790.333 102.09117  54.19244 17085.512 1.31325e+12
      2018 3  26481556490   52381.733  104.1833  71.31006  18265.91  1.4217e+12
      2019 3  29247197810   51811.407 102.42796  64.21057 18771.305 1.39432e+12
      2020 3   8044556209   38338.822  103.0662  41.83834 19634.664 1.27696e+12
      2021 3  13445134647   44057.221 103.67112 70.911896  20989.56 1.42738e+12
      2000 4  -1.0343e+10  -23574.514  98.20818  28.49545  3808.436  1.7222e+11
      2001 4   -5.946e+09  -24070.844 109.85765  24.44389  4070.756 1.90905e+11
      2002 4   -5.544e+09  -24380.006 105.00015 25.023256  4140.609  1.9907e+11
      2003 4   -5.473e+09  -22286.403  93.58376 28.830704  4150.043 2.17829e+11
      2004 4  -1.5297e+10  -20027.254  92.51904    38.265  4320.713 2.55107e+11
      2005 4  -1.0146e+10  -19435.314 102.85096  54.52109  4549.392 3.06146e+11
      2006 4  -1.6081e+10  -15655.667 104.34894 65.144066  4765.733 3.44627e+11
      2007 4  -2.8722e+10  -10119.248  107.6175  72.38908  4850.161 4.29021e+11
      2008 4  -3.6135e+10   -8197.258 117.11584  97.25597  5402.278   5.336e+11
      2009 4  -1.7394e+10   -5377.332 100.09376  61.67126  6058.596 4.39732e+11
      2010 4  -2.4627e+10    -551.636 106.21946  79.49554  6892.299 4.75697e+11
      2011 4  -2.6868e+10   -3133.619 103.72767  111.2556   7497.33 5.24374e+11
      2012 4  -2.0344e+10   -6671.819 101.46102  111.6697  8535.587 4.95231e+11
      2013 4  -1.0095e+10   -7491.563 101.67303 108.65852  8607.561 5.15762e+11
      2014 4  -1.5923e+10   -5535.859 102.70433  98.94601   8181.51 5.39081e+11
      2015 4   -6.170e+09   -5460.981       100  52.38676   8970.19 4.77111e+11
      2016 4   -4.808e+09        .285  96.50712  43.73417  9166.965 4.70025e+11
      2017 4   -6.016e+09    6733.208   99.1437  54.19244  9228.399 5.24641e+11
      2018 4  -1.1352e+10   10258.483 100.09654  71.31006 12076.073  5.8878e+11
      2019 4   -1.445e+09   11587.779  99.14514  64.21057 12267.656 5.96058e+11
      2020 4   1.4764e+10   13168.038 100.20245  41.83834 12518.223 5.99443e+11
      2021 4   -9.562e+09   15046.593  99.67339 70.911896  12796.21 6.79442e+11
      2000 5  -2689755314   -5757.371  75.48755  28.49545  1613.542 61823494487
      2001 5  -3272573494   -6014.594  80.01455  24.44389  1760.093 67808695574
      2002 5  -4264835726   -6715.005  88.57081 25.023256  1988.066 82196206090
      2003 5  -5785485093   -7530.938  86.65413 28.830704   1967.82  1.0009e+11
      2004 5  -4457211225   -6988.395  87.14063    38.265  2163.514 1.19815e+11
      2005 5  -2809704226   -7084.524  91.49528  54.52109  2287.482 1.37143e+11
      2006 5  -3996084353   -7337.443  95.48225 65.144066  2459.239 1.56264e+11
      2007 5  -8945618936   -7911.206  97.96303  72.38908  2569.558 1.90184e+11
      2008 5  -4407952631    -7243.24 112.66393  97.25597  2755.258 2.36817e+11
      2009 5  -4869768333   -6640.065 108.41588  61.67126  3048.063 2.07434e+11
      2010 5  -7351204484   -6609.212  109.8289  79.49554  3298.911  2.0907e+11
      2011 5  -5020059122   -7923.084 112.07775  111.2556   3537.98 2.29563e+11
      end
      FE and RE test

      Code:
      xtreg ca ea redk brent yek gsyih, fe
      
      Fixed-effects (within) regression               Number of obs     =        264
      Group variable: ulke                            Number of groups  =         12
      
      R-squared:                                      Obs per group:
           Within  = 0.6685                                         min =         22
           Between = 0.0274                                         avg =       22.0
           Overall = 0.0966                                         max =         22
      
                                                      F(5,247)          =      99.64
      corr(u_i, Xb) = -0.9263                         Prob > F          =     0.0000
      
      ------------------------------------------------------------------------------
                ca | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
      -------------+----------------------------------------------------------------
                ea |   -1338733   125829.1   -10.64   0.000     -1586568    -1090898
              redk |   2.46e+08   1.08e+08     2.28   0.024     3.31e+07    4.59e+08
             brent |  -4.05e+07   3.68e+07    -1.10   0.272    -1.13e+08    3.19e+07
               yek |    5741210   329099.7    17.45   0.000      5093011     6389410
             gsyih |  -.0787627   .0080341    -9.80   0.000    -.0945868   -.0629386
             _cons |  -4.37e+09   1.04e+10    -0.42   0.675    -2.48e+10    1.61e+10
      -------------+----------------------------------------------------------------
           sigma_u |  5.288e+10
           sigma_e |  1.311e+10
               rho |  .94209008   (fraction of variance due to u_i)
      ------------------------------------------------------------------------------
      F test that all u_i=0: F(11, 247) = 35.15                    Prob > F = 0.0000

      Code:
       xtreg ca ea redk brent yek gsyih, re
      
      Random-effects GLS regression                   Number of obs     =        264
      Group variable: ulke                            Number of groups  =         12
      
      R-squared:                                      Obs per group:
           Within  = 0.5970                                         min =         22
           Between = 0.0074                                         avg =       22.0
           Overall = 0.2080                                         max =         22
      
                                                      Wald chi2(5)      =     290.15
      corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.0000
      
      ------------------------------------------------------------------------------
                ca | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
      -------------+----------------------------------------------------------------
                ea |  -754571.8   122988.7    -6.14   0.000    -995625.2   -513518.3
              redk |   2.17e+08   1.26e+08     1.72   0.085    -3.01e+07    4.63e+08
             brent |  -1.25e+08   4.12e+07    -3.05   0.002    -2.06e+08   -4.47e+07
               yek |    5351220   380903.4    14.05   0.000      4604663     6097777
             gsyih |  -.0468316   .0081543    -5.74   0.000    -.0628137   -.0308495
             _cons |  -1.83e+10   1.24e+10    -1.48   0.140    -4.26e+10    6.00e+09
      -------------+----------------------------------------------------------------
           sigma_u |  1.009e+10
           sigma_e |  1.311e+10
               rho |  .37184667   (fraction of variance due to u_i)
      ------------------------------------------------------------------------------

      Comment


      • #4
        You're very limited in what you can do with N = 12 and T = 22. You should've even think of RE for this kind of data. The default should be to use FE as it's more robust. And the test you're using is not valid with small N -- especially when T is larger.

        I have some suggestions. Note how large some coefficients are. You should probably divide the variable ca by something such as GDP, and then take logs of the strictly positive variables. Moreover, you almost certainly need time dummies to be convincing. So use xtreg y x1 ... xK i.year, fe.

        For robust standard errors, you should use Driscoll-Kraay, which are probably not great standard errors but maybe better than than the nonrobust ones. These are gotten from the user-written command xtscc, and you have to choose a lag. Probably no more than three for your data set.

        First thing is to get a model specification where the coefficients are easy to interpret and where you have controlled for time effects.

        Comment

        Working...
        X