Announcement

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

  • Unbalanced panel data with N>T

    Hi Everyone,

    I have unbalanced panel data with N=432 and T=5; I use these following command to set the panel data:

    Code:
    egen float cid = group(ciq_id)
    by cid (event_date), sort: gen int event_num = _n
    xtset cid event_num
    xtpcse gw pr_vlow pr_low pr_mod act_ins pass_ins tobinq ln_tasset trans_psize earn_vol, correlation(psar1) rhotype(tscorr)
    So far the reading on the forum discussion; I found that for large N and smaller T; xtpcse is not recommended. However, xtpcse giving me the expected result than xtreg. So can I used xtpcse ??


    Also, as I am checking the GW capitalisation in M&A; which might have vary industry to industry. For example IT industry have higher intangibles than manufacture industry. So, do I need to control for industry in xtpcse; if the answer of using xtpcse is yes.

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float gw byte(pr_vlow pr_low pr_mod act_ins pass_ins) float(tobinq ln_tasset trans_psize earn_vol) int year str10 event_date str11 ciq_id float cid int event_num byte(ind1 ind2 ind3 ind4 ind5 ind6 ind7 ind8 ind9 ind10 ind11)
     45.09632  3  3 0  5 1          0  10.94074  .7068703  .04632137 2017 "01/11/2017" "IQ108478"     1  1 0 0 0 0 0 0 0 0 1 0 0
    -14.77466  7  7 0 13 2  1.2749357  8.715349 .56495875 .010436605 2017 "05/04/2017" "IQ10865062"   2  1 0 1 0 0 0 0 0 0 0 0 0
     45.62962  2 14 1 20 0  2.9791374  5.100787  .6840889  .15059853 2018 "20/11/2018" "IQ109237360"  3  1 0 0 0 0 0 0 1 0 0 0 0
     43.34332  5  8 5 16 4    .741592  8.207647  .7195947  .16023184 2016 "10/02/2017" "IQ11323462"   4  1 0 0 1 0 0 0 0 0 0 0 0
     21.19874  5 12 1 14 4  4.5862775  5.655292 1.0900174  .03847843 2016 "10/06/2016" "IQ125070"     5  1 0 0 0 0 0 0 0 0 0 1 0
            0  3 13 0 12 5   6.445186  7.821641  .6120828  .11832643 2017 "01/08/2016" "IQ12701813"   6  1 0 0 0 0 0 0 1 0 0 0 0
            0  3 12 1 12 5  1.2524964  8.074779  .8069388   .1719883 2014 "04/09/2014" "IQ12701813"   6  2 0 0 0 0 0 0 1 0 0 0 0
            0  3 12 1 12 5  2.3486466  8.048149  .6583275  .04865163 2018 "24/04/2018" "IQ12701813"   6  3 0 0 0 0 0 0 1 0 0 0 0
            0  3 12 1 12 5   4.107602  7.641084  .4760563   .1594351 2016 "28/04/2016" "IQ12701813"   6  4 0 0 0 0 0 0 1 0 0 0 0
            0  3 13 0 12 5  2.6877005  8.167352  .6535212 .036284003 2018 "29/11/2018" "IQ12701813"   6  5 0 0 0 0 0 0 1 0 0 0 0
    33.333332  2  5 4 13 2  2.0798388  7.435119 .51108444  .06770538 2018 "05/10/2017" "IQ127549"     7  1 0 1 0 0 0 0 0 0 0 0 0
    28.320526  2  5 5 13 2  4.0743504  6.632397     .7848  .09842006 2015 "07/01/2015" "IQ127549"     7  2 0 1 0 0 0 0 0 0 0 0 0
     41.94373  2  5 4 13 2   2.922854  7.046473  .5202776  .08406912 2016 "15/06/2016" "IQ127549"     7  3 0 1 0 0 0 0 0 0 0 0 0
      87.4477  7  8 2 16 3  2.0726833  6.558056 .48396635   .0989163 2017 "23/05/2016" "IQ12786753"   8  1 0 0 0 0 0 1 0 0 0 0 0
            0  8 10 0 18 2   1.735604  8.513006 .26132056 .012381244 2014 "27/02/2015" "IQ128346"     9  1 0 0 0 0 0 1 0 0 0 0 0
     43.03898  7 11 0 14 4   2.200085   7.36916  .6559633  .05362834 2016 "01/09/2016" "IQ128363"    10  1 0 0 0 0 0 0 0 0 1 0 0
     50.79365  9  9 0 14 4   2.575897  7.140532 .53027695  .15260392 2014 "10/12/2014" "IQ128363"    10  2 0 0 0 0 0 0 0 0 1 0 0
     64.86487  7 11 0 14 4  1.9081098  7.285575 .36985785   .0729919 2016 "17/06/2016" "IQ128363"    10  3 0 0 0 0 0 0 0 0 1 0 0
     44.11765  8 10 0 14 4   2.437931   7.41986  .4271894  .02359144 2017 "17/10/2017" "IQ128363"    10  4 0 0 0 0 0 0 0 0 1 0 0
     51.91638  9  9 0 14 4   3.004004  7.140532  .4701186  .15447624 2014 "22/07/2014" "IQ128363"    10  5 0 0 0 0 0 0 0 0 1 0 0
     55.92105  8 10 0 14 4   2.880259  7.248859  .4710317   .1375902 2015 "23/01/2015" "IQ128363"    10  6 0 0 0 0 0 0 0 0 1 0 0
     41.66667  7 11 0 14 4  2.1084511  7.285575  .3410721  .09040423 2016 "23/02/2016" "IQ128363"    10  7 0 0 0 0 0 0 0 0 1 0 0
     48.95833  9  9 0 14 4   2.969656  7.140532  .3167499  .15447624 2014 "23/07/2014" "IQ128363"    10  8 0 0 0 0 0 0 0 0 1 0 0
      63.2115  8 10 0 14 4   2.566206  7.494931  .6827808  .03826413 2017 "26/01/2018" "IQ128363"    10  9 0 0 0 0 0 0 0 0 1 0 0
     59.80392  7 11 0 14 4  2.1565263   7.36916 .40921015  .05362834 2016 "26/07/2016" "IQ128363"    10 10 0 0 0 0 0 0 0 0 1 0 0
     77.42664  8  8 1 13 4   8.777114  6.787958 .55848676   .6119792 2015 "04/12/2014" "IQ128420"    11  1 0 0 0 0 0 1 0 0 0 0 0
     86.86806  5 10 0 13 4   1.105569  8.404226  .6055085  .18826684 2014 "01/09/2014" "IQ128711"    12  1 0 0 0 0 0 0 1 0 0 0 0
    125.09789  6 10 0 13 4   .5493683   8.30395  .9562588  .19011395 2017 "06/10/2017" "IQ128711"    12  2 0 0 0 0 0 0 1 0 0 0 0
      56.8082  6 10 0 13 4  1.2936165  8.301397  .5088191   .1500267 2017 "23/05/2017" "IQ128711"    12  3 0 0 0 0 0 0 1 0 0 0 0
    37.063953  3  9 2 12 2  2.1642492  5.479805  .7721449  .07526188 2018 "23/11/2017" "IQ128773"    13  1 0 0 0 0 0 0 1 0 0 0 0
     35.61644  2 10 2 12 2  2.3229728  5.185709 .59519094  .09872203 2015 "25/06/2015" "IQ128773"    13  2 0 0 0 0 0 0 1 0 0 0 0
     115.6178  7  5 1 12 3  4.7565603  7.534709  .7383147   .1612532 2015 "08/06/2015" "IQ129432"    14  1 0 0 0 0 0 0 1 0 0 0 0
    162.73764  5  7 1 12 3   2.257098  7.928982  .4123567    .310837 2018 "12/07/2017" "IQ129432"    14  2 0 0 0 0 0 0 1 0 0 0 0
     86.82569  8 10 1 15 5  226.18066  6.324578 1.3233376   .3290654 2015 "02/02/2016" "IQ1303244"   15  1 0 0 0 0 0 0 1 0 0 0 0
    23.908216  8 10 2 16 4  2.1114342         0         0          0 2015 "01/09/2015" "IQ131475881" 16  1 0 0 0 0 0 0 1 0 0 0 0
    124.09593  4 11 0 15 2  3.1071374  7.249357 1.1343791  .13483274 2017 "28/02/2018" "IQ133094"    17  1 0 1 0 0 0 0 0 0 0 0 0
     164.0078  4  5 6 15 2   4.660632  6.816845  .7812899  .06999147 2017 "28/02/2017" "IQ134228"    18  1 0 0 0 0 0 0 0 1 0 0 0
     63.11611  6 11 2 15 5  2.2338889  5.445444 1.3440043   .3518517 2015 "01/02/2016" "IQ13759215"  19  1 0 0 0 0 0 1 0 0 0 0 0
     86.53846  6 12 1 15 5  2.1046946  7.433109  .4628505  .13973218 2017 "01/10/2017" "IQ13759215"  19  2 0 0 0 0 0 1 0 0 0 0 0
     26.24585  6 12 1 15 5  1.9201174  7.404706  .4597786  .10747407 2017 "09/08/2017" "IQ13759215"  19  3 0 0 0 0 0 1 0 0 0 0 0
    67.234726  6 12 1 15 5   2.454017  7.433109 1.0917548   .1509565 2018 "28/03/2018" "IQ13759215"  19  4 0 0 0 0 0 1 0 0 0 0 0
    32.936253  8  9 0 15 4   7.303023  6.455566  .8889237   .1726787 2018 "13/02/2018" "IQ137717"    20  1 0 1 0 0 0 0 0 0 0 0 0
     28.93868  8  9 1 15 4  4.4508476  6.320459 .55899924  .21420245 2017 "14/10/2016" "IQ137717"    20  2 0 1 0 0 0 0 0 0 0 0 0
     51.72414  8  9 0 15 4  4.3016515  6.924907   .512587  .07506222 2019 "18/12/2018" "IQ137717"    20  3 0 . 0 0 0 0 0 0 0 0 0
    16.667912  8  9 1 15 4  4.0091543   5.68197  .5787039   .4735217 2016 "20/10/2015" "IQ137717"    20  4 0 1 0 0 0 0 0 0 0 0 0
    36.745113  8  9 1 15 4   3.813961  5.828699   .840543   .4870552 2016 "22/04/2016" "IQ137717"    20  5 0 1 0 0 0 0 0 0 0 0 0
     59.66189 10  9 0 16 3  1.4620914  6.412094   .397319  .14755143 2014 "08/08/2014" "IQ139028"    21  1 0 0 0 0 0 0 0 1 0 0 0
       58.188 10  9 0 16 3   1.240803  6.437489  .4267214  .14844026 2015 "11/02/2015" "IQ139028"    21  2 0 0 0 0 0 0 0 1 0 0 0
    102.59841  8 11 0 16 3  1.1794367  6.434023  .3422589  .11519176 2016 "25/04/2016" "IQ139028"    21  3 0 0 0 0 0 0 0 1 0 0 0
     73.16337  9 10 0 16 3   1.408955  6.457744  .4183654  .12523067 2015 "28/10/2015" "IQ139028"    21  4 0 0 0 0 0 0 0 1 0 0 0
     69.29979 10  9 0 16 3    1.35794  6.437489  .4814215  .14733094 2015 "29/04/2015" "IQ139028"    21  5 0 0 0 0 0 0 0 1 0 0 0
      60.4904  9 10 0 16 3  1.3944824  6.457744  .3340326  .12523067 2015 "30/10/2015" "IQ139028"    21  6 0 0 0 0 0 0 0 1 0 0 0
     51.23967  8  8 0 15 3  1.4340242  6.794475  .4689623  .04738871 2016 "01/12/2016" "IQ140988979" 22  1 0 0 1 0 0 0 0 0 0 0 0
     76.74419  8  8 0 15 3  1.1392905  6.725394  .4230101 .023749994 2015 "03/03/2016" "IQ140988979" 22  2 0 0 1 0 0 0 0 0 0 0 0
     61.61616  8  8 0 15 3  1.1826544  6.725394  .3408774 .023749994 2015 "04/03/2016" "IQ140988979" 22  3 0 0 1 0 0 0 0 0 0 0 0
    20.454546  8  8 1 15 3          0  6.508024  .4406712  .07705548 2015 "23/01/2015" "IQ140988979" 22  4 0 0 1 0 0 0 0 0 0 0 0
         80.8  8  8 0 15 3  1.6233526  6.771133 .37301415  .05949943 2017 "26/05/2017" "IQ140988979" 22  5 0 0 1 0 0 0 0 0 0 0 0
            0  6 10 2 15 3  1.1844574  6.273256 .47754025          0 2016 "10/03/2016" "IQ144617841" 23  1 1 0 0 0 0 0 0 0 0 0 0
     82.10876  7  9 0 13 4   5.322278  5.118718  .5086821  .14184272 2015 "19/01/2015" "IQ159857"    24  1 0 0 0 0 0 0 1 0 0 0 0
     75.57429  6 10 0 13 4  3.6900694  5.634665  .8060394   .0856735 2016 "27/11/2015" "IQ159857"    24  2 0 0 0 0 0 0 1 0 0 0 0
     62.82051  7 10 0 13 4  3.4636676  5.999681 .45790285 .069276854 2017 "28/09/2016" "IQ159857"    24  3 0 0 0 0 0 0 1 0 0 0 0
      98.2421  7  9 0 13 4  3.2941134  5.118718  .7738124  .14430177 2015 "30/04/2015" "IQ159857"    24  4 0 0 0 0 0 0 1 0 0 0 0
     91.19497  6  7 3 15 4   7.649644  6.894062 .50180376  .20565496 2016 "03/12/2015" "IQ159951597" 25  1 0 0 0 0 0 0 0 1 0 0 0
    74.117645  6  7 3 15 4          0  6.941867  .4081342  .19605495 2016 "05/06/2015" "IQ159951597" 25  2 0 0 0 0 0 0 0 1 0 0 0
     83.68056  6  7 3 15 4   9.930466  6.961106  .6818843  .21359757 2017 "22/03/2017" "IQ159951597" 25  3 0 0 0 0 0 0 0 1 0 0 0
    1.9417475  6  8 2 15 4          0  6.941867  .3359534   .1562892 2015 "610/2014"   "IQ159951597" 25  4 0 0 0 0 0 0 0 1 0 0 0
     41.81818  4  8 1 13 2 -19.281736  6.477434 .56359637  .04259192 2015 "13/07/2015" "IQ1612223"   26  1 0 0 1 0 0 0 0 0 0 0 0
            0  4 13 0 15 3  2.8224194  6.182901 .48684725  .21491793 2019 "01/01/2019" "IQ163883"    27  1 0 0 0 0 0 0 0 0 1 0 0
            0  8  9 1 15 4  1.5030514  6.805107  .6711062 .005908147 2015 "01/12/2014" "IQ1661655"   28  1 1 0 0 0 0 0 0 0 0 0 0
     58.60906  6  9 1 13 5  17.084677 10.143016  .9171839  .03825172 2016 "29/01/2016" "IQ171577"    29  1 0 1 0 0 0 0 0 0 0 0 0
            4  5 10 3 16 3   5.879874  5.739793  .5219234  1.6568766 2017 "08/09/2017" "IQ22353222"  30  1 0 0 0 1 0 0 0 0 0 0 0
      9.22797  7 10 1 14 5  1.0232966 12.927017  .6385888  .23064737 2017 "01/05/2017" "IQ22385966"  31  1 0 0 0 0 0 0 0 1 0 0 0
    19.139967  6  9 1 14 4   1.457052  7.132421  .4035988  .06939473 2016 "28/04/2016" "IQ22637298"  32  1 0 0 0 0 0 0 1 0 0 0 0
     74.58163  6 11 1 15 5    1.29154  8.397892  1.045707  .09281812 2018 "01/09/2017" "IQ23046303"  33  1 0 0 0 0 0 0 1 0 0 0 0
    136.77954  6 11 1 15 5  2.1938803  8.441541  .6664875  .03917558 2016 "02/05/2016" "IQ23046303"  33  2 0 0 0 0 0 0 1 0 0 0 0
    152.45636  7 11 0 15 5  -821.0311  6.348773 1.1394833  .07741594 2015 "20/11/2014" "IQ23046303"  33  3 0 0 0 0 0 0 1 0 0 0 0
      77.6251  6 11 1 15 5  3.1849635  8.441541 .33170995  .05835354 2017 "30/09/2016" "IQ23046303"  33  4 0 0 0 0 0 0 1 0 0 0 0
    34.210526  5 12 0 14 4   3.696166  7.826842  .4647578  .12923749 2016 "08/09/2015" "IQ23049465"  34  1 0 0 0 0 0 1 0 0 0 0 0
     22.27074  5 12 0 14 4   2.857201  7.631917  .7119735  .12683764 2014 "15/07/2014" "IQ23049465"  34  2 0 0 0 0 0 1 0 0 0 0 0
      23.5942  5 12 0 14 4   3.625462  7.826842  .9522336  .12923749 2016 "28/07/2015" "IQ23049465"  34  3 0 0 0 0 0 1 0 0 0 0 0
    108.42105  7 10 0 15 5   3.543067   5.88666 .56906706   .1568422 2018 "11/12/2018" "IQ23649699"  35  1 1 0 0 0 0 0 0 0 0 0 0
     45.72649  7 11 0 14 5  2.0538359  7.152973  .4407588    .134699 2017 "12/12/2017" "IQ23723165"  36  1 0 0 1 0 0 0 0 0 0 0 0
      84.9518  3 12 2 15 2   3.785996  7.085143  .3593769  .00299331 2017 "01/12/2017" "IQ246118617" 37  1 1 0 0 0 0 0 0 0 0 0 0
     62.35944  2 12 3 15 2   2.907872  6.649241  .6173817 .001089424 2016 "04/05/2016" "IQ246118617" 37  2 1 0 0 0 0 0 0 0 0 0 0
    11.234042  7 10 1 18 1  13.721142  4.984846  .4942687    .366169 2017 "25/05/2017" "IQ24767267"  38  1 0 1 0 0 0 0 0 0 0 0 0
      84.9631  6 10 1 15 5   4.816336  6.800282  .6890638  .09439363 2016 "14/12/2016" "IQ25039170"  39  1 0 0 0 0 0 0 1 0 0 0 0
     90.87098  5 10 1 15 5   4.643522  5.574433 1.0875347  .15236424 2015 "15/06/2015" "IQ25039170"  39  2 0 0 0 0 0 0 1 0 0 0 0
     83.92484  7  7 4 15 5   7.495785  6.922348  .7914299   .1251474 2017 "31/01/2018" "IQ25039170"  39  3 0 0 0 0 0 0 1 0 0 0 0
     44.17879  8  7 1 13 5  1.8282033  8.308618 .54960155  .03919857 2018 "02/07/2018" "IQ25438"     40  1 1 0 0 0 0 0 0 0 0 0 0
     26.70001  9  6 1 13 5   .7487206  8.124002  .9404028  .05209268 2016 "03/02/2016" "IQ25438"     40  2 1 0 0 0 0 0 0 0 0 0 0
    31.827515  8  7 1 13 5   1.275575  8.308618  .5510936  .04277435 2018 "26/11/2018" "IQ25438"     40  3 1 0 0 0 0 0 0 0 0 0 0
            0  4  7 3 14 1  .58714914  7.606529  .7608331          0 2015 "02/03/2015" "IQ25614355"  41  1 0 0 0 0 0 0 1 0 0 0 0
     71.15385  8  9 1 14 5  1.9351708  7.108817 .54100186  .09165671 2019 "17/10/2018" "IQ25667953"  42  1 0 0 0 0 0 0 0 1 0 0 0
      51.0917  8  9 1 14 5  1.8921824  7.108817  .4404582  .09165671 2019 "20/11/2018" "IQ25667953"  42  2 0 0 0 0 0 0 0 1 0 0 0
     40.63018  7  9 2 14 5    4.77439  6.612175  .6199672   .4988415 2017 "21/12/2016" "IQ25667953"  42  3 0 0 0 0 0 0 0 1 0 0 0
      52.7027  7  9 2 14 5    4.84305  6.612175  .3026961   .4785642 2017 "31/01/2017" "IQ25667953"  42  4 0 0 0 0 0 0 0 1 0 0 0
     40.66194  7 13 0 16 4  1.6317124 10.361957  .7714067  .11112481 2018 "24/06/2018" "IQ257151"    43  1 0 1 0 0 0 0 0 0 0 0 0
     57.64962  7 10 1 17 3  1.8082197  7.763976  .3537576   .0714347 2018 "01/03/2018" "IQ26363497"  44  1 0 0 0 0 0 0 1 0 0 0 0
     90.35305  8  9 2 17 3   1.604006  7.763976  .4323369  .07560599 2018 "01/04/2018" "IQ26363497"  44  2 0 0 0 0 0 0 1 0 0 0 0
     83.23645  7 10 1 17 3  2.1170616  7.647356 .56487745  .07775287 2017 "02/10/2017" "IQ26363497"  44  3 0 0 0 0 0 0 1 0 0 0 0
    end



  • #2
    Enayet:
    -xtpcsse- is for small N, large T panel dataset (that does not seem to be your case).
    Your first choice should be -xtreg- with -fe- or -re- specification.
    The fact that you did not obtain the expected results (whatever that means) under -xtreg- is by no means a sound methodological reason to hunt for the Stata command that may give you back coefficients more in line with your expectations (but that may well be totally biased).
    Eventually, I would advise you to be more detailed in what you're after, so that interested listers can reply more positively. Thanks.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Dear Carlo

      Thank you for your reply. I am sorry that my post did not explain more details. As you can see that, I have unbalanced panel data with large N and Small T. So, I was searching which regression is more suitable for my data set; which you already answered. However, i have few question; firstly when I did Husman test I use following command and output is following:

      Code:
      quietly xtreg gw pr_vlow pr_low pr_mod act_ins pass_ins tobinq ln_tasset earn_vol, re
      
      eststo re_reg
      
      quietly xtreg gw pr_vlow pr_low pr_mod act_ins pass_ins tobinq ln_tasset earn_vol, fe
      
      eststo fe_reg
      
      hausman fe_reg re_reg
      
                       ---- Coefficients ----
                   |      (b)          (B)            (b-B)     sqrt(diag(V_b-V_B))
                   |     fe_reg       re_reg       Difference          S.E.
      -------------+----------------------------------------------------------------
           pr_vlow |   -4.101229    -3.094235       -1.006994        3.529858
            pr_low |   -9.904207    -4.777873       -5.126334           3.838
            pr_mod |   -8.192089    -4.099535       -4.092554        3.793448
            tobinq |   -.0587443    -.0034403        -.055304        .0381166
         ln_tasset |   -2.450472    -2.287014       -.1634585        5.358397
          earn_vol |   -1.129434    -.4506967       -.6787368        3.036304
      ------------------------------------------------------------------------------
                                 b = consistent under Ho and Ha; obtained from xtreg
                  B = inconsistent under Ha, efficient under Ho; obtained from xtreg
      
          Test:  Ho:  difference in coefficients not systematic
      
                        chi2(6) = (b-B)'[(V_b-V_B)^(-1)](b-B)
                                =        6.72
                      Prob>chi2 =      0.3477
      
      .

      Which indicate that random effect is the suitable method for me. Now, my data is from different industry and my depended variable magnitude vary significantly across the different industry. So, how can I consider that effect with the random effect regression? Also, I in my sample the maximum observation from one company is 17 and minimum is 1 (so for some companies there are multiple observation in one year). For unbalanced regression with more than one event in a year, I followed these following command during xtset:

      Code:
      egen float cid = group(ciq_id)
      by cid (event_date), sort: gen int event_num = _n
      xtset cid event_num

      So with the property of these dynamism in data; there are some time series data property for individual sample. So my question is that, declaring it as a panel data am I controlling for these property? if not than what command can I use to capture the time series property for individual sample of data. I am happy to provide more explanation if necessary and sorry if it does not make sense to you.

      Thanks once again for reply.

      Enayet Karim

      Comment


      • #4
        Enayet:
        your interpretation of the -hausman- outcome is correct: go -re-;
        the issue of multiple observation during the same year for the same unit frequenty appears on this forum.
        Provided that you do not plan to use time series related commands, such as lags and leads, you can simply -xtset- your dataset with -panelid- only.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Dear Carlo

          Thank you very much and I do apologies for late reply; as I was learning and implementing my novice knowledge in econometric and Stata. I did run xtreg command from my data set. However, regarding to your comment xtset with panelid only; my answer is that I have plan to use the lag. However, I have some issue in the data to set that up. My data is consist of UK FTSE companies acquisition last five year. So, some company have more than one acquisition in one year. Because of that, if I try to set up xtset with pannel_id time it shows me error:

          Code:
           xtset cid event_date2
          repeated time values within panel
          r(451);

          Because of that I did use:

          Code:
          by cid (event_date), sort: gen int event_num = _n
          xtset cid event_num
          in that way in a group event was identified by number and I did avoid the repeated time value problem. First I tried normal regression:


          Code:
          regress gw pr_vlow pr_lomod act_ins pass_ins int_pct_tasset ex_gw_pct_int beta vol fcf tobinq ln_tasset t
          > rans_psize earn_vol b_seg
          
                Source |       SS           df       MS      Number of obs   =       412
          -------------+----------------------------------   F(14, 397)      =      9.98
                 Model |  86081.4678        14  6148.67627   Prob > F        =    0.0000
              Residual |  244515.279       397  615.907503   R-squared       =    0.2604
          -------------+----------------------------------   Adj R-squared   =    0.2343
                 Total |  330596.746       411  804.371646   Root MSE        =    24.817
          
          --------------------------------------------------------------------------------
                      gw |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
          ---------------+----------------------------------------------------------------
                 pr_vlow |  -3.023729   1.540615    -1.96   0.050    -6.052513    .0050548
                pr_lomod |  -2.132025   1.392373    -1.53   0.127    -4.869371    .6053217
                 act_ins |    3.07053   1.730216     1.77   0.077    -.3310014    6.472061
                pass_ins |   6.598318    2.21791     2.98   0.003     2.238001    10.95863
          int_pct_tasset |   41.60218   5.979576     6.96   0.000     29.84659    53.35778
           ex_gw_pct_int |   6.987355    3.69213     1.89   0.059    -.2712154    14.24593
                    beta |  -1.288831   2.696633    -0.48   0.633    -6.590296    4.012634
                     vol |  -5.964306   5.287338    -1.13   0.260    -16.35899    4.430376
                     fcf |   -10.4547   6.268451    -1.67   0.096    -22.77821    1.868807
                  tobinq |  -.0012959   .0018586    -0.70   0.486    -.0049499    .0023581
               ln_tasset |  -5.690282   1.067337    -5.33   0.000    -7.788622   -3.591942
             trans_psize |    8.22717   5.986025     1.37   0.170      -3.5411    19.99544
                earn_vol |   .7407625   1.651752     0.45   0.654    -2.506512    3.988037
                   b_seg |   .8840523   .2266525     3.90   0.000     .4384632    1.329641
                   _cons |   31.30228   18.48199     1.69   0.091    -5.032535    67.63709
          --------------------------------------------------------------------------------
          Note: I added some new control variables in my model.

          Than I check is there any heteroskedasticity in data:


          Code:
           hettest
          
          Breusch-Pagan / Cook-Weisberg test for heteroskedasticity 
                   Ho: Constant variance
                   Variables: fitted values of gw
          
                   chi2(1)      =     0.02
                   Prob > chi2  =   0.8852

          After that I run xtreg regression to check it the output is same:


          Code:
           xtreg gw pr_vlow pr_lomod act_ins pass_ins int_pct_tasset ex_gw_pct_int beta vol fcf tobinq ln_tasset tra
          > ns_psize earn_vol b_seg
          
          Random-effects GLS regression                   Number of obs     =        412
          Group variable: cid                             Number of groups  =        163
          
          R-sq:                                           Obs per group:
               within  = 0.0328                                         min =          1
               between = 0.2443                                         avg =        2.5
               overall = 0.2468                                         max =         17
          
                                                          Wald chi2(14)     =      57.79
          corr(u_i, X)   = 0 (assumed)                    Prob > chi2       =     0.0000
          
          --------------------------------------------------------------------------------
                      gw |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
          ---------------+----------------------------------------------------------------
                 pr_vlow |  -3.769136   1.974186    -1.91   0.056    -7.638469    .1001983
                pr_lomod |  -3.650566   1.818775    -2.01   0.045    -7.215299   -.0858332
                 act_ins |    4.25722   2.332989     1.82   0.068    -.3153542    8.829794
                pass_ins |   6.555024    2.98287     2.20   0.028     .7087052    12.40134
          int_pct_tasset |    34.9863   8.270717     4.23   0.000     18.77599    51.19661
           ex_gw_pct_int |   1.874088   3.953011     0.47   0.635     -5.87367    9.621847
                    beta |   -.709102    2.58316    -0.27   0.784    -5.772003    4.353798
                     vol |  -6.022903   5.967047    -1.01   0.313     -17.7181    5.672293
                     fcf |  -2.218796   7.403689    -0.30   0.764    -16.72976    12.29217
                  tobinq |  -.0013838   .0024809    -0.56   0.577    -.0062463    .0034787
               ln_tasset |   -5.80216   1.550319    -3.74   0.000     -8.84073   -2.763591
             trans_psize |   12.63414   5.817552     2.17   0.030     1.231951    24.03633
                earn_vol |  -.0744254   2.083704    -0.04   0.972     -4.15841    4.009559
                   b_seg |   .8875546   .3601279     2.46   0.014     .1817169    1.593392
                   _cons |   35.35014   25.72001     1.37   0.169    -15.06015    85.76044
          ---------------+----------------------------------------------------------------
                 sigma_u |  20.504456
                 sigma_e |   17.99787
                     rho |  .56482743   (fraction of variance due to u_i)
          --------------------------------------------------------------------------------
          
          .


          After that I run the Hausman test :

          Code:
           quietly xtreg gw pr_vlow pr_lomod act_ins pass_ins int_pct_tasset ex_gw_pct_int beta vol fcf tobinq ln_ta
          > sset trans_psize earn_vol b_seg, re
          
          . eststo re_reg
          
          . quietly xtreg gw pr_vlow pr_lomod act_ins pass_ins int_pct_tasset ex_gw_pct_int beta vol fcf tobinq ln_ta
          > sset trans_psize earn_vol b_seg, fe
          
          . eststo fe_reg
          
          . hausman fe_reg re_reg
          
                           ---- Coefficients ----
                       |      (b)          (B)            (b-B)     sqrt(diag(V_b-V_B))
                       |     fe_reg       re_reg       Difference          S.E.
          -------------+----------------------------------------------------------------
               pr_vlow |   -5.964603    -3.769136       -2.195468        2.642701
              pr_lomod |   -8.911166    -3.650566         -5.2606        2.776373
          int_pct_ta~t |    15.57781      34.9863       -19.40849        19.21384
          ex_gw_pct_~t |   -.1164338     1.874088       -1.990522        3.335584
                  beta |    -2.98483     -.709102       -2.275728        1.789597
                   vol |   -57.85267    -6.022903       -51.82976        38.48459
                   fcf |    5.878466    -2.218796        8.097262        8.747393
                tobinq |   -.7378772    -.0013838       -.7364934        .4590893
             ln_tasset |   -4.075726     -5.80216        1.726435        4.656398
           trans_psize |    8.153455     12.63414       -4.480688         4.64215
              earn_vol |    6.181696    -.0744254        6.256122        4.927845
                 b_seg |    85.43527     .8875546        84.54772        21.07723
          ------------------------------------------------------------------------------
                                     b = consistent under Ho and Ha; obtained from xtreg
                      B = inconsistent under Ha, efficient under Ho; obtained from xtreg
          
              Test:  Ho:  difference in coefficients not systematic
          
                           chi2(12) = (b-B)'[(V_b-V_B)^(-1)](b-B)
                                    =       28.28
                          Prob>chi2 =      0.0050
          
          .
          So, it shows me that I should use random effect model. Also I did Breusch and Pagan test:

          Code:
          xttest0
          
          Breusch and Pagan Lagrangian multiplier test for random effects
          
                  gw[cid,t] = Xb + u[cid] + e[cid,t]
          
                  Estimated results:
                                   |       Var     sd = sqrt(Var)
                          ---------+-----------------------------
                                gw |   804.3716       28.36145
                                 e |   323.9233       17.99787
                                 u |   420.4327       20.50446
          
                  Test:   Var(u) = 0
                                       chibar2(01) =    58.13
                                    Prob > chibar2 =   0.0000

          Than I did Wooldridge test for auto-correlation:

          Code:
          xtserial gw pr_vlow pr_lomod act_ins pass_ins int_pct_tasset ex_gw_pct_int beta vol fcf tobinq ln_tasset 
          > trans_psize earn_vol b_seg
          
          Wooldridge test for autocorrelation in panel data
          H0: no first-order autocorrelation
              F(  1,      59) =      0.538
                     Prob > F =      0.4660
          which showed me that, I there is no auto-correlation. So finally I run the xtreg re with robust to avoid heteroscedasticity:

          Code:
           xtreg gw pr_vlow pr_lomod act_ins pass_ins int_pct_tasset ex_gw_pct_int beta vol fcf tobinq ln_tasset tra
          > ns_psize earn_vol b_seg, re vce(robust)
          (3 missing values generated)
          
          Random-effects GLS regression                   Number of obs     =        412
          Group variable: cid                             Number of groups  =        163
          
          R-sq:                                           Obs per group:
               within  = 0.0328                                         min =          1
               between = 0.2443                                         avg =        2.5
               overall = 0.2468                                         max =         17
          
                                                          Wald chi2(14)     =     384.83
          corr(u_i, X)   = 0 (assumed)                    Prob > chi2       =     0.0000
          
                                              (Std. Err. adjusted for 163 clusters in cid)
          --------------------------------------------------------------------------------
                         |               Robust
                      gw |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
          ---------------+----------------------------------------------------------------
                 pr_vlow |  -3.769136   2.195983    -1.72   0.086    -8.073184    .5349127
                pr_lomod |  -3.650566   1.922045    -1.90   0.058    -7.417705    .1165733
                 act_ins |    4.25722   2.247553     1.89   0.058    -.1479036    8.662343
                pass_ins |   6.555024    3.37342     1.94   0.052    -.0567583    13.16681
          int_pct_tasset |    34.9863   7.702116     4.54   0.000     19.89043    50.08217
           ex_gw_pct_int |   1.874088   3.726073     0.50   0.615    -5.428881    9.177058
                    beta |   -.709102   3.230323    -0.22   0.826    -7.040418    5.622214
                     vol |  -6.022903   2.936587    -2.05   0.040    -11.77851   -.2672984
                     fcf |  -2.218796   7.809908    -0.28   0.776    -17.52593    13.08834
                  tobinq |  -.0013838   .0015874    -0.87   0.383     -.004495    .0017275
               ln_tasset |   -5.80216   1.557833    -3.72   0.000    -8.855458   -2.748863
             trans_psize |   12.63414   5.857725     2.16   0.031     1.153214    24.11507
                earn_vol |  -.0744254    .876467    -0.08   0.932    -1.792269    1.643418
                   b_seg |   .8875546   .3352812     2.65   0.008     .2304156    1.544694
                   _cons |   35.35014   23.77105     1.49   0.137    -11.24026    81.94055
          ---------------+----------------------------------------------------------------
                 sigma_u |  20.504456
                 sigma_e |   17.99787
                     rho |  .56482743   (fraction of variance due to u_i)
          --------------------------------------------------------------------------------

          I am very new in econometric and just over a week in Stata; so when I was trying to interpret that xtreg output; I found that the Within r2 of the model is very low. I could not figure out what might be the reason; or do I have to worried at all about that?

          Now, coming back to the lag effect; from my understanding the Depended variable might have lag effect; and I want to make sure that I am not missing that. So model can be:

          Yt=a+b1.Yt-1+b2.X1t+b3.X2t+.......+error

          However, now the issue come that inside my pannel have repeated time value. I am not very good in this type of model and pannel data. Would you please suggest me what should I do in that case . Also the above analysis I did, was it right ?? Do I need to do anything else??

          Comment


          • #6
            Sorry just to make it more sensible, uploaded the updated variable set

            Code:
            * Example generated by -dataex-. To install: ssc install dataex
            clear
            input float gw byte(pr_vlow pr_lomod act_ins pass_ins) float(int_pct_tasset ex_gw_pct_int beta vol fcf tobinq ln_tasset trans_psize earn_vol) byte b_seg str11 ciq_id int cid str10 event_date byte event_num
            -14.77466 7  7 13 2 .022830427         0   .0888 .004449031   -.010902 1.2749357 8.715349 .56495875 .010436605 11 "IQ10865062"   2 "05/04/2017" 1
             45.62962 2 15 20 0   .6510044  .7147679  .62074  .02978902 -.03784008 2.9791374 5.100787  .6840889  .15059853  2 "IQ109237360"  3 "20/11/2018" 1
             43.34332 5 13 16 4 .009866718  .4005525 1.30537 .003354338 .004137216   .741592 8.207647  .7195947  .16023184  9 "IQ11323462"   4 "10/02/2017" 1
             21.19874 5 13 14 4    .523443 .38368985 -.14331  .02421043   .1857172 4.5862775 5.655292 1.0900174  .03847843  1 "IQ125070"     5 "10/06/2016" 1
                    0 3 13 12 5  .00935775         1  .83249  .01191003   .1634296 1.2524964 8.074779  .8069388   .1719883 19 "IQ12701813"   6 "04/09/2014" 1
                    0 3 13 12 5 .006308353         1  .67626 .012443652  .54399747  4.107602 7.641084  .4760563   .1594351 19 "IQ12701813"   6 "28/04/2016" 2
                    0 3 13 12 5 .006308353         1    .757 .019880274   .3211666  6.445186 7.821641  .6120828  .11832643 19 "IQ12701813"   6 "01/08/2016" 3
                    0 3 13 12 5 .004540295         1  .99316 .004313636    .239159 2.3486466 8.048149  .6583275  .04865163 19 "IQ12701813"   6 "24/04/2018" 4
                    0 3 13 12 5 .004540295         1  .56379 .009317934  .24049945 2.6877005 8.167352  .6535212 .036284003 19 "IQ12701813"   6 "29/11/2018" 5
            28.320526 2 10 13 2   .7473946 .23512857  .59273 .007654564  .25084636 4.0743504 6.632397     .7848  .09842006 13 "IQ127549"     7 "07/01/2015" 1
             41.94373 2  9 13 2   .6851497 .23872443  .12995 .012632436  .24420168  2.922854 7.046473  .5202776  .08406912 13 "IQ127549"     7 "15/06/2016" 2
            33.333332 2  9 13 2   .6360849 .26027232  .64076 .008308617  .18327276 2.0798388 7.435119 .51108444  .06770538 13 "IQ127549"     7 "05/10/2017" 3
              87.4477 7 10 16 3   .5148248   .918986  .79801 .026200047  .21245207 2.0726833 6.558056 .48396635   .0989163  4 "IQ12786753"   8 "23/05/2016" 1
                    0 8 10 18 2  .06754602 .02940363   .6043    .011479  .08793304  1.735604 8.513006 .26132056 .012381244 10 "IQ128346"     9 "27/02/2015" 1
             51.91638 9  9 14 4   .5371207  .7521758 1.14819  .00472412  .30002475  3.004004 7.140532  .4701186  .15447624 14 "IQ128363"    10 "22/07/2014" 1
             48.95833 9  9 14 4   .5371207  .7521758 1.14819  .00472412  .30002475  2.969656 7.140532  .3167499  .15447624 14 "IQ128363"    10 "23/07/2014" 2
             50.79365 9  9 14 4    .553075  .7319707 1.28126 .002496679   .2995301  2.575897 7.140532 .53027695  .15260392 14 "IQ128363"    10 "10/12/2014" 3
             55.92105 8 10 14 4    .553075  .7319707 1.14275 .000518723  .27721184  2.880259 7.248859  .4710317   .1375902 14 "IQ128363"    10 "23/01/2015" 4
             41.66667 7 11 14 4  .53909945    .74358 1.08072 .000476884  .25869566 2.1084511 7.285575  .3410721  .09040423 14 "IQ128363"    10 "23/02/2016" 5
             64.86487 7 11 14 4  .55355227  .7519644  .97223 .000920562  .25626895 1.9081098 7.285575 .36985785   .0729919 14 "IQ128363"    10 "17/06/2016" 6
            end

            Comment


            • #7
              Enayet:
              some comments about your query:
              - unfortunately, your data excerpt does not allow to reproduce your analysis:
              - why stariing off with -regress- if you have panel data (start with -xtreg-, instead):
              -if you detect heteroskedastcity and/or autocorrelation, you should impose clustered standard errors before -hausman-. This makes -hausman- unfeasible, and you should switch to the user-written command -xtoverid- that, in turn, does not support -fvvarlist- notation That said:
              Code:
               
               hausman fe_reg re_reg
              pointed you towards -fe- (not -re-) specification because the null is rejected.

              As an aside, I think you should make up your mind about your research strategy: I'm obviously symphatetic with your laudable efforts aimed at playing fruitfully on two tables (learning Stata and panel data econometrics) at the same time, but please consider that all the contributors to this forum were beginners (and I still feel this way for some Stata commands and/or statistical analysis I'm not that familiar with) when they started their Stata journey.
              Kind regards,
              Carlo
              (Stata 19.0)

              Comment


              • #8
                Carlo

                Thank you very much for your response. I agree, I miss interpret Hausman. So, I followed -fe- model.

                Code:
                 xtreg gw pr_vlow pr_lomod act_ins pass_ins vol fcf tobinq ln_tasset trans_psize earn_vol b_seg int_pct_ta
                > sset ex_gw_pct_int beta, fe
                note: act_ins omitted because of collinearity
                note: pass_ins omitted because of collinearity
                
                Fixed-effects (within) regression               Number of obs     =        408
                Group variable: cid                             Number of groups  =        161
                
                R-sq:                                           Obs per group:
                     within  = 0.1199                                         min =          1
                     between = 0.0221                                         avg =        2.5
                     overall = 0.0265                                         max =         17
                
                                                                F(12,235)         =       2.67
                corr(u_i, Xb)  = -0.9994                        Prob > F          =     0.0022
                
                --------------------------------------------------------------------------------
                            gw |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                ---------------+----------------------------------------------------------------
                       pr_vlow |  -6.400684   3.305915    -1.94   0.054     -12.9137    .1123324
                      pr_lomod |  -8.648989   3.317694    -2.61   0.010    -15.18521   -2.112767
                       act_ins |          0  (omitted)
                      pass_ins |          0  (omitted)
                           vol |  -55.49546    38.9151    -1.43   0.155    -132.1625    21.17157
                           fcf |   7.397993   11.50035     0.64   0.521    -15.25896    30.05494
                        tobinq |  -.7006893    .459304    -1.53   0.128    -1.605569    .2041903
                     ln_tasset |  -3.187761   4.934042    -0.65   0.519    -12.90837    6.532844
                   trans_psize |   9.181296   7.479865     1.23   0.221    -5.554862    23.91745
                      earn_vol |   6.051856   5.343489     1.13   0.259    -4.475406    16.57912
                         b_seg |   85.10051   21.05065     4.04   0.000     43.62841    126.5726
                int_pct_tasset |   13.45574   20.93649     0.64   0.521    -27.79144    54.70292
                 ex_gw_pct_int |  -.2923381   5.169289    -0.06   0.955    -10.47641    9.891731
                          beta |  -3.108831    3.14994    -0.99   0.325    -9.314559    3.096898
                         _cons |  -953.3749   284.3676    -3.35   0.001     -1513.61   -393.1394
                ---------------+----------------------------------------------------------------
                       sigma_u |  790.49526
                       sigma_e |  17.969642
                           rho |  .99948352   (fraction of variance due to u_i)
                --------------------------------------------------------------------------------
                F test that all u_i=0: F(160, 235) = 3.34                    Prob > F = 0.0000

                However, two of my variables was omitted because of collinearity. Also corr(u_i, Xb) = -0.9994 is suspicious. So, I checked the correlation and below is the table

                Code:
                 corr gw pr_vlow pr_lomod act_ins pass_ins vol fcf tobinq ln_tasset trans_psize earn_vol b_seg int_pct_tas
                > set ex_gw_pct_int beta
                (obs=408)
                
                             |       gw  pr_vlow pr_lomod  act_ins pass_ins      vol      fcf   tobinq ln_tas~t trans_~e
                -------------+------------------------------------------------------------------------------------------
                          gw |   1.0000
                     pr_vlow |  -0.0025   1.0000
                    pr_lomod |   0.0255  -0.6151   1.0000
                     act_ins |   0.0781   0.0166   0.5243   1.0000
                    pass_ins |  -0.0161   0.3929  -0.2473  -0.5392   1.0000
                         vol |   0.0260  -0.0899   0.0677   0.0385  -0.0343   1.0000
                         fcf |   0.0717   0.1563   0.0054   0.0615   0.1502  -0.1098   1.0000
                      tobinq |  -0.0750  -0.0349   0.1373   0.1286   0.0291   0.0091   0.0728   1.0000
                   ln_tasset |  -0.2610   0.1932  -0.0496  -0.2239   0.5141  -0.2563   0.0768   0.4080   1.0000
                 trans_psize |   0.0726  -0.0240   0.0219   0.0121   0.0349  -0.0386   0.0161   0.4102   0.0639   1.0000
                    earn_vol |   0.0539  -0.1053   0.0528   0.0252  -0.0512   0.2271  -0.2456   0.0203  -0.2353   0.2562
                       b_seg |   0.1416   0.1412  -0.0015  -0.0726   0.2944  -0.0293  -0.0016   0.1440   0.3131   0.0462
                int_pct_ta~t |   0.3423   0.1460   0.0508   0.1845   0.0104  -0.0390   0.4695   0.1101  -0.0256   0.0325
                ex_gw_pct_~t |   0.1290   0.0657  -0.0607  -0.0520   0.0706  -0.1119   0.0436   0.1079   0.0210   0.0049
                        beta |  -0.1277   0.1682  -0.0969  -0.0972   0.1534  -0.0419   0.0425   0.1273   0.3041  -0.0404
                
                             | earn_vol    b_seg int_pc~t ex_gw_~t     beta
                -------------+---------------------------------------------
                    earn_vol |   1.0000
                       b_seg |  -0.0609   1.0000
                int_pct_ta~t |  -0.1706   0.0854   1.0000
                ex_gw_pct_~t |  -0.1484   0.1226   0.0874   1.0000
                        beta |  -0.1407   0.0389  -0.0272   0.1633   1.0000
                Where act_ins and pass_ins correlation is 0.5392; which I think reasonable for these two variables. So my first question how can I overcome it?? Subsequently I checked Hausman to confirm the fixed effect.

                Code:
                quietly xtreg gw pr_vlow pr_lomod act_ins pass_ins vol fcf tobinq ln_tasset trans_psize earn_vol b_seg in
                > t_pct_tasset ex_gw_pct_int beta, re
                
                . eststo re_reg
                
                . quietly xtreg gw pr_vlow pr_lomod act_ins pass_ins vol fcf tobinq ln_tasset trans_psize earn_vol b_seg in
                > t_pct_tasset ex_gw_pct_int beta, fe
                
                . eststo fe_reg
                
                . hausman fe_reg re_reg
                
                                 ---- Coefficients ----
                             |      (b)          (B)            (b-B)     sqrt(diag(V_b-V_B))
                             |     fe_reg       re_reg       Difference          S.E.
                -------------+----------------------------------------------------------------
                     pr_vlow |   -6.400684    -4.119618       -2.281067        2.633266
                    pr_lomod |   -8.648989    -3.765043       -4.883946        2.763471
                         vol |   -55.49546    -5.894199       -49.60126        38.45209
                         fcf |    7.397993    -1.960586        9.358578        8.744207
                      tobinq |   -.7006893    -.0016235       -.6990658        .4592973
                   ln_tasset |   -3.187761    -5.662969        2.475208        4.680593
                 trans_psize |    9.181296     13.34494       -4.163641        4.683285
                    earn_vol |    6.051856    -.0769258        6.128782        4.919627
                       b_seg |    85.10051     .8564913        84.24402        21.04745
                int_pct_ta~t |    13.45574     35.19758       -21.74184        19.19824
                ex_gw_pct_~t |   -.2923381     1.808802        -2.10114        3.313095
                        beta |   -3.108831    -.6898061       -2.419025        1.789951
                ------------------------------------------------------------------------------
                                           b = consistent under Ho and Ha; obtained from xtreg
                            B = inconsistent under Ha, efficient under Ho; obtained from xtreg
                
                    Test:  Ho:  difference in coefficients not systematic
                
                                 chi2(12) = (b-B)'[(V_b-V_B)^(-1)](b-B)
                                          =       27.42
                                Prob>chi2 =      0.0067
                Which confirmed about the -fe-. Than I checked

                Code:
                xtserial gw pr_vlow pr_lomod act_ins pass_ins vol fcf tobinq ln_tasset trans_psize earn_vol b_seg int_pct
                > _tasset ex_gw_pct_int beta
                
                Wooldridge test for autocorrelation in panel data
                H0: no first-order autocorrelation
                    F(  1,      58) =      0.293
                           Prob > F =      0.5904
                
                
                
                 xttest3
                
                Modified Wald test for groupwise heteroskedasticity
                in fixed effect regression model
                
                H0: sigma(i)^2 = sigma^2 for all i
                
                chi2 (161)  =   5.2e+29
                Prob>chi2 =      0.0000

                I checked the output of xtreg fe with areg and the output is consistent.

                Code:
                areg gw pr_vlow pr_lomod act_ins pass_ins vol fcf tobinq ln_tasset trans_psize earn_vol b_seg int_pct_tas
                > set ex_gw_pct_int beta, absorb(cid)
                note: act_ins omitted because of collinearity
                note: pass_ins omitted because of collinearity
                
                Linear regression, absorbing indicators         Number of obs     =        408
                Absorbed variable: cid                          No. of categories =        161
                                                                F(  12,    235)   =       2.67
                                                                Prob > F          =     0.0022
                                                                R-squared         =     0.7695
                                                                Adj R-squared     =     0.6008
                                                                Root MSE          =    17.9696
                
                --------------------------------------------------------------------------------
                            gw |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                ---------------+----------------------------------------------------------------
                       pr_vlow |  -6.400684   3.305915    -1.94   0.054     -12.9137    .1123324
                      pr_lomod |  -8.648989   3.317694    -2.61   0.010    -15.18521   -2.112767
                       act_ins |          0  (omitted)
                      pass_ins |          0  (omitted)
                           vol |  -55.49546    38.9151    -1.43   0.155    -132.1625    21.17157
                           fcf |   7.397993   11.50035     0.64   0.521    -15.25896    30.05494
                        tobinq |  -.7006893    .459304    -1.53   0.128    -1.605569    .2041903
                     ln_tasset |  -3.187761   4.934042    -0.65   0.519    -12.90837    6.532844
                   trans_psize |   9.181296   7.479865     1.23   0.221    -5.554862    23.91745
                      earn_vol |   6.051856   5.343489     1.13   0.259    -4.475406    16.57912
                         b_seg |   85.10051   21.05065     4.04   0.000     43.62841    126.5726
                int_pct_tasset |   13.45574   20.93649     0.64   0.521    -27.79144    54.70292
                 ex_gw_pct_int |  -.2923381   5.169289    -0.06   0.955    -10.47641    9.891731
                          beta |  -3.108831    3.14994    -0.99   0.325    -9.314559    3.096898
                         _cons |  -953.3749   284.3676    -3.35   0.001     -1513.61   -393.1394
                --------------------------------------------------------------------------------
                F test of absorbed indicators: F(160, 235) = 3.344            Prob > F = 0.000

                However, r2 is very high; which is very unusual in business study. So, I have doubt the model is right. Also, in my first post I showed that Hausman suggestion was random effect; but adding some control variable changed the whole thing. Would you please suggest me; what should I do. I am adding larger sample data again for you.




                Code:
                * Example generated by -dataex-. To install: ssc install dataex
                clear
                input float gw str11 ciq_id int year str10 event_date byte(pr_vlow pr_lomod act_ins pass_ins) float(vol fcf tobinq ln_tasset trans_psize earn_vol) byte b_seg float(cid int_pct_tasset ex_gw_pct_int beta) int event_num byte(_est_re_reg _est_fe_reg)
                -14.77466 "IQ10865062"  2017 "05/04/2017"  7  7 13 2 .004449031    -.010902  1.2749357  8.715349 .56495875 .010436605 11  2 .022830427         0   .0888  1 1 1
                 43.34332 "IQ11323462"  2016 "10/02/2017"  5 13 16 4 .003354338  .004137216    .741592  8.207647  .7195947  .16023184  9  4 .009866718  .4005525 1.30537  1 1 1
                 21.19874 "IQ125070"    2016 "10/06/2016"  5 13 14 4  .02421043    .1857172  4.5862775  5.655292 1.0900174  .03847843  1  5    .523443 .38368985 -.14331  1 1 1
                        0 "IQ12701813"  2017 "01/08/2016"  3 13 12 5 .019880274    .3211666   6.445186  7.821641  .6120828  .11832643 19  6 .006308353         1    .757  1 1 1
                        0 "IQ12701813"  2014 "04/09/2014"  3 13 12 5  .01191003    .1634296  1.2524964  8.074779  .8069388   .1719883 19  6  .00935775         1  .83249  2 1 1
                        0 "IQ12701813"  2018 "24/04/2018"  3 13 12 5 .004313636     .239159  2.3486466  8.048149  .6583275  .04865163 19  6 .004540295         1  .99316  3 1 1
                        0 "IQ12701813"  2016 "28/04/2016"  3 13 12 5 .012443652   .54399747   4.107602  7.641084  .4760563   .1594351 19  6 .006308353         1  .67626  4 1 1
                        0 "IQ12701813"  2018 "29/11/2018"  3 13 12 5 .009317934   .24049945  2.6877005  8.167352  .6535212 .036284003 19  6 .004540295         1  .56379  5 1 1
                33.333332 "IQ127549"    2018 "05/10/2017"  2  9 13 2 .008308617   .18327276  2.0798388  7.435119 .51108444  .06770538 13  7   .6360849 .26027232  .64076  1 1 1
                28.320526 "IQ127549"    2015 "07/01/2015"  2 10 13 2 .007654564   .25084636  4.0743504  6.632397     .7848  .09842006 13  7   .7473946 .23512857  .59273  2 1 1
                 41.94373 "IQ127549"    2016 "15/06/2016"  2  9 13 2 .012632436   .24420168   2.922854  7.046473  .5202776  .08406912 13  7   .6851497 .23872443  .12995  3 1 1
                  87.4477 "IQ12786753"  2017 "23/05/2016"  7 10 16 3 .026200047   .21245207  2.0726833  6.558056 .48396635   .0989163  4  8   .5148248   .918986  .79801  1 1 1
                        0 "IQ128346"    2014 "27/02/2015"  8 10 18 2    .011479   .08793304   1.735604  8.513006 .26132056 .012381244 10  9  .06754602 .02940363   .6043  1 1 1
                 43.03898 "IQ128363"    2016 "01/09/2016"  7 11 14 4 .003881034   .27260408   2.200085   7.36916  .6559633  .05362834 14 10  .55355227  .7519644  .94568  1 1 1
                 50.79365 "IQ128363"    2014 "10/12/2014"  9  9 14 4 .002496679    .2995301   2.575897  7.140532 .53027695  .15260392 14 10    .553075  .7319707 1.28126  2 1 1
                 64.86487 "IQ128363"    2016 "17/06/2016"  7 11 14 4 .000920562   .25626895  1.9081098  7.285575 .36985785   .0729919 14 10  .55355227  .7519644  .97223  3 1 1
                 44.11765 "IQ128363"    2017 "17/10/2017"  8 10 14 4 .005130504     .339955   2.437931   7.41986  .4271894  .02359144 14 10   .4655067  .7493432  .87688  4 1 1
                 51.91638 "IQ128363"    2014 "22/07/2014"  9  9 14 4  .00472412   .30002475   3.004004  7.140532  .4701186  .15447624 14 10   .5371207  .7521758 1.14819  5 1 1
                 55.92105 "IQ128363"    2015 "23/01/2015"  8 10 14 4 .000518723   .27721184   2.880259  7.248859  .4710317   .1375902 14 10    .553075  .7319707 1.14275  6 1 1
                 41.66667 "IQ128363"    2016 "23/02/2016"  7 11 14 4 .000476884   .25869566  2.1084511  7.285575  .3410721  .09040423 14 10  .53909945    .74358 1.08072  7 1 1
                 48.95833 "IQ128363"    2014 "23/07/2014"  9  9 14 4  .00472412   .30002475   2.969656  7.140532  .3167499  .15447624 14 10   .5371207  .7521758 1.14819  8 1 1
                  63.2115 "IQ128363"    2017 "26/01/2018"  8 10 14 4 .003524889   .23896623   2.566206  7.494931  .6827808  .03826413 14 10   .4655067  .7493432 1.09768  9 1 1
                 59.80392 "IQ128363"    2016 "26/07/2016"  7 11 14 4 .003881034   .27260408  2.1565263   7.36916 .40921015  .05362834 14 10  .55355227  .7519644 1.00603 10 1 1
                 77.42664 "IQ128420"    2015 "04/12/2014"  8  9 13 4 .007571796   .15265822   8.777114  6.787958 .55848676   .6119792  7 11  .26807365  .8634841 1.34123  1 1 1
                 86.86806 "IQ128711"    2014 "01/09/2014"  5 10 13 4  .01160263    .1780968   1.105569  8.404226  .6055085  .18826684 18 12   .4258044         0 1.16122  1 1 1
                125.09789 "IQ128711"    2017 "06/10/2017"  6 10 13 4 .024522293   .08505574   .5493683   8.30395  .9562588  .19011395 18 12  .57576853  .7903154 -.14444  2 1 1
                  56.8082 "IQ128711"    2017 "23/05/2017"  6 10 13 4 .025022186   .09717474  1.2936165  8.301397  .5088191   .1500267 18 12   .4891826         0  .09589  3 1 1
                37.063953 "IQ128773"    2018 "23/11/2017"  3 11 12 2 .007779997    .0923197  2.1642492  5.479805  .7721449  .07526188  5 13  .18306923  .7038724  .39955  1 1 1
                 35.61644 "IQ128773"    2015 "25/06/2015"  2 12 12 2   .0362556  -.03784861  2.3229728  5.185709 .59519094  .09872203  5 13   .1505316  .8252788  .39233  2 1 1
                 115.6178 "IQ129432"    2015 "08/06/2015"  7  6 12 3 .029073564     .051101  4.7565603  7.534709  .7383147   .1612532 15 14   .1736204         0  .83211  1 1 1
                 86.82569 "IQ1303244"   2015 "02/02/2016"  8 11 15 5   .0733242    .9487963  226.18066  6.324578 1.3233376   .3290654 15 15   .3422016 .56990016  .03847  1 1 1
                23.908216 "IQ131475881" 2015 "01/09/2015"  8 12 16 4          .           .  2.1114342         0         0          0 11 16  .09521702         0 1.50841  1 0 0
                124.09593 "IQ133094"    2017 "28/02/2018"  4 11 15 2 .022830635   .43372595  3.1071374  7.249357 1.1343791  .13483274  6 17    .513864  .9345507 3.63523  1 1 1
                 63.11611 "IQ13759215"  2015 "01/02/2016"  6 13 15 5  .10879786 -.009168388  2.2338889  5.445444 1.3440043   .3518517 20 19   .6694001  .8568665 -.17793  1 1 1
                 86.53846 "IQ13759215"  2017 "01/10/2017"  6 13 15 5 .021732016     .217249  2.1046946  7.433109  .4628505  .13973218 20 19   .8090389  .7000771  .32427  2 1 1
                 26.24585 "IQ13759215"  2017 "09/08/2017"  6 13 15 5  .01762085   .11511604  1.9201174  7.404706  .4597786  .10747407 20 19   .8090389  .7000771  .16684  3 1 1
                67.234726 "IQ13759215"  2018 "28/03/2018"  6 13 15 5 .010136737   .21195763   2.454017  7.433109 1.0917548   .1509565 20 19    .772988  .7144747  .79156  4 1 1
                32.936253 "IQ137717"    2018 "13/02/2018"  8  9 15 4  .01143231    .3475579   7.303023  6.455566  .8889237   .1726787 11 20   .5848587         0  .98811  1 1 1
                 28.93868 "IQ137717"    2017 "14/10/2016"  8 10 15 4 .001581527    .2519714  4.4508476  6.320459 .55899924  .21420245 11 20   .6463938         0  .38618  2 1 1
                 51.72414 "IQ137717"    2019 "18/12/2018"  8  9 15 4 .005498003   .23853166  4.3016515  6.924907   .512587  .07506222 11 20   .6829478         0  .79228  3 1 1
                16.667912 "IQ137717"    2016 "20/10/2015"  8 10 15 4  .02517444    .3461919  4.0091543   5.68197  .5787039   .4735217 11 20  .54010403         0  .61264  4 1 1
                36.745113 "IQ137717"    2016 "22/04/2016"  8 10 15 4 .001368512    .3089425   3.813961  5.828699   .840543   .4870552 11 20   .6299107  .3232559  .39062  5 1 1
                 59.66189 "IQ139028"    2014 "08/08/2014" 10  9 16 3 .005021647   .17747456  1.4620914  6.412094   .397319  .14755143 19 21    .636427         0  .51541  1 1 1
                   58.188 "IQ139028"    2015 "11/02/2015" 10  9 16 3 .000731338   .18652946   1.240803  6.437489  .4267214  .14844026 19 21   .6481637  .8263662  1.4569  2 1 1
                102.59841 "IQ139028"    2016 "25/04/2016"  8 11 16 3 .013258018    .3865276  1.1794367  6.434023  .3422589  .11519176 19 21   .6664018         0  .96239  3 1 1
                 73.16337 "IQ139028"    2015 "28/10/2015"  9 10 16 3  .01864106    .3242944   1.408955  6.457744  .4183654  .12523067 19 21   .6691431  .8820255 1.43105  4 1 1
                 69.29979 "IQ139028"    2015 "29/04/2015" 10  9 16 3  .00146745   .19253448    1.35794  6.437489  .4814215  .14733094 19 21   .6591862         0 2.16442  5 1 1
                  60.4904 "IQ139028"    2015 "30/10/2015"  9 10 16 3  .01864106    .3242944  1.3944824  6.457744  .3340326  .12523067 19 21   .6691431  .8820255 1.46473  6 1 1
                 51.23967 "IQ140988979" 2016 "01/12/2016"  8  8 15 3 .017422358   .08291075  1.4340242  6.794475  .4689623  .04738871 12 22    .768199  .6612446  .97835  1 1 1
                 76.74419 "IQ140988979" 2015 "03/03/2016"  8  8 15 3 .009418832     .324202  1.1392905  6.725394  .4230101 .023749994 12 22   .7646706  .6396736 1.36037  2 1 1
                 61.61616 "IQ140988979" 2015 "04/03/2016"  8  8 15 3 .009418832     .324202  1.1826544  6.725394  .3408774 .023749994 12 22   .7646706  .6396736 1.36246  3 1 1
                20.454546 "IQ140988979" 2015 "23/01/2015"  8  9 15 3          0    .6936488          0  6.508024  .4406712  .07705548 12 22   .8221049  .6297399       0  4 1 1
                     80.8 "IQ140988979" 2017 "26/05/2017"  8  8 15 3  .01552409    .3156208  1.6233526  6.771133 .37301415  .05949943 12 22   .7466682         0  .56313  5 1 1
                        0 "IQ144617841" 2016 "10/03/2016"  6 12 15 3 .000126988  -.22417107  1.1844574  6.273256 .47754025          0  1 23          0         0  .03334  1 1 1
                 82.10876 "IQ159857"    2015 "19/01/2015"  7  9 13 4 .016181247   .58850336   5.322278  5.118718  .5086821  .14184272 11 24   .6517792  .8578668  .97846  1 1 1
                 75.57429 "IQ159857"    2016 "27/11/2015"  6 10 13 4  .01152989   .24768434  3.6900694  5.634665  .8060394   .0856735 11 24   .7344342  .8523418 -.30795  2 1 1
                 62.82051 "IQ159857"    2017 "28/09/2016"  7 10 13 4 .003896068   .11307208  3.4636676  5.999681 .45790285 .069276854 11 24   .6879274  .8206214  .28506  3 1 1
                  98.2421 "IQ159857"    2015 "30/04/2015"  7  9 13 4 .013562718    .6109633  3.2941134  5.118718  .7738124  .14430177 11 24    .700784  .7926807  .60579  4 1 1
                 91.19497 "IQ159951597" 2016 "03/12/2015"  6 10 15 4 .008578082    .2501417   7.649644  6.894062 .50180376  .20565496  1 25   .7387469  .9350899  .40889  1 1 1
                74.117645 "IQ159951597" 2016 "05/06/2015"  6 10 15 4          0    .3520727          0  6.941867  .4081342  .19605495  1 25   .7278891   .930905       0  2 1 1
                 83.68056 "IQ159951597" 2017 "22/03/2017"  6 10 15 4 .024302047    .3433023   9.930466  6.961106  .6818843  .21359757  1 25   .6998038  .9454439  .98332  3 1 1
                1.9417475 "IQ159951597" 2015 "610/2014"    6 10 15 4 .012722128    .3554798          0  6.941867  .3359534   .1562892  0 25   .7515222  .8926183       0  4 1 1
                 41.81818 "IQ1612223"   2015 "13/07/2015"  4  9 13 2 .015593213    .3942188 -19.281736  6.477434 .56359637  .04259192 12 26   .4368753  .6511791  .76614  1 1 1
                        0 "IQ163883"    2019 "01/01/2019"  4 13 15 3 .007464804   .05159518  2.8224194  6.182901 .48684725  .21491793 15 27  .08655146         0  1.1778  1 1 1
                        0 "IQ1661655"   2015 "01/12/2014"  8 10 15 4 .003061891    1.378295  1.5030514  6.805107  .6711062 .005908147  1 28  .00158791         1  .94395  1 1 1
                 58.60906 "IQ171577"    2016 "29/01/2016"  6 10 13 5  .01513278    .3409473  17.084677 10.143016  .9171839  .03825172 20 29  .11925399         0  .72898  1 1 1
                        4 "IQ22353222"  2017 "08/09/2017"  5 13 16 3  .06168852   .25311476   5.879874  5.739793  .5219234  1.6568766 11 30  .04469454         0  .41489  1 1 1
                  9.22797 "IQ22385966"  2017 "01/05/2017"  7 11 14 5 .006526349  -.03877832  1.0232966 12.927017  .6385888  .23064737 20 31  .05768327         0  .24357  1 1 1
                19.139967 "IQ22637298"  2016 "28/04/2016"  6 10 14 4 .009408967    .5424742   1.457052  7.132421  .4035988  .06939473  5 32   .7776541  .9921688  .80947  1 1 1
                 74.58163 "IQ23046303"  2018 "01/09/2017"  6 12 15 5 .013005955    .9979517    1.29154  8.397892  1.045707  .09281812 14 33   .8594902 .52426606  .10646  1 1 1
                136.77954 "IQ23046303"  2016 "02/05/2016"  6 12 15 5 .002334019   .26708904  2.1938803  8.441541  .6664875  .03917558 14 33   .7340268  .7159466  .41481  2 1 1
                  77.6251 "IQ23046303"  2017 "30/09/2016"  6 12 15 5 .004311761   .28729028  3.1849635  8.441541 .33170995  .05835354 14 33   .8527706  .7044889  .48734  3 1 1
                34.210526 "IQ23049465"  2016 "08/09/2015"  5 12 14 4 .006413992    .2338088   3.696166  7.826842  .4647578  .12923749  7 34  .23334663         0  .29138  1 1 1
                 22.27074 "IQ23049465"  2014 "15/07/2014"  5 12 14 4  .02004067    .3051639   2.857201  7.631917  .7119735  .12683764  7 34  .21522056         0  .81965  2 1 1
                  23.5942 "IQ23049465"  2016 "28/07/2015"  5 12 14 4 .006413992    .2338088   3.625462  7.826842  .9522336  .12923749  7 34  .23334663         0  .35994  3 1 1
                108.42105 "IQ23649699"  2018 "11/12/2018"  7 10 15 5  .03731395     .329479   3.543067   5.88666 .56906706   .1568422  8 35   .5262743  .7803295  .74192  1 1 1
                 45.72649 "IQ23723165"  2017 "12/12/2017"  7 11 14 5 .017384801    .2021922  2.0538359  7.152973  .4407588    .134699 17 36   .4400188         0  .44636  1 1 1
                  84.9518 "IQ246118617" 2017 "01/12/2017"  3 14 15 2 .013120536  -.06091314   3.785996  7.085143  .3593769  .00299331  8 37   .1542267  .7635922  .12089  1 1 1
                 62.35944 "IQ246118617" 2016 "04/05/2016"  2 15 15 2   .0404789   -.0866269   2.907872  6.649241  .6173817 .001089424  8 37  .12376861  .7990326  .70872  2 1 1
                11.234042 "IQ24767267"  2017 "25/05/2017"  7 11 18 1 .013203833    .1742684  13.721142  4.984846  .4942687    .366169 14 38  .16931064  .9394748 -.00056  1 1 1
                  84.9631 "IQ25039170"  2016 "14/12/2016"  6 11 15 5  .01612005    .5746774   4.816336  6.800282  .6890638  .09439363  1 39   .7903472  .8752112   .7017  1 1 1
                 90.87098 "IQ25039170"  2015 "15/06/2015"  5 11 15 5  .02604437   .19039875   4.643522  5.574433 1.0875347  .15236424  1 39   .7160988  .8603352 1.48396  2 1 1
                 83.92484 "IQ25039170"  2017 "31/01/2018"  7 11 15 5 .017684553    .4272471   7.495785  6.922348  .7914299   .1251474  1 39    .630137  .8522052  .84368  3 1 1
                 44.17879 "IQ25438"     2018 "02/07/2018"  8  8 13 5 .003607448   .34329385  1.8282033  8.308618 .54960155  .03919857  8 40  .58733094  .4700898  .73223  1 1 1
                 26.70001 "IQ25438"     2016 "03/02/2016"  9  7 13 5 .002468545   .07307039   .7487206  8.124002  .9404028  .05209268  8 40     .34251  .7696834  .82696  2 1 1
                31.827515 "IQ25438"     2018 "26/11/2018"  8  8 13 5 .006658039    .3801448   1.275575  8.308618  .5510936  .04277435  8 40   .5901152   .472565  .83574  3 1 1
                        0 "IQ25614355"  2015 "02/03/2015"  4 10 14 1 .002416167   -.3286382  .58714914  7.606529  .7608331          0  1 41          0         0 1.32226  1 1 1
                 71.15385 "IQ25667953"  2019 "17/10/2018"  8 10 14 5 .017686965    .1865221  1.9351708  7.108817 .54100186  .09165671 15 42  .11965322  .7177033  .45136  1 1 1
                  51.0917 "IQ25667953"  2019 "20/11/2018"  8 10 14 5 .017686965    .1865221  1.8921824  7.108817  .4404582  .09165671 15 42  .11965322  .7177033  .40318  2 1 1
                 40.63018 "IQ25667953"  2017 "21/12/2016"  7 11 14 5 .008989507    .3063755    4.77439  6.612175  .6199672   .4988415 15 42   .1150383  .9077103  .41116  3 1 1
                  52.7027 "IQ25667953"  2017 "31/01/2017"  7 11 14 5 .008041634    .3000242    4.84305  6.612175  .3026961   .4785642 15 42   .1150383  .9077103  .33397  4 1 1
                 40.66194 "IQ257151"    2018 "24/06/2018"  7 13 16 4 .001210806   .12512793  1.6317124 10.361957  .7714067  .11112481 20 43   .2409386         0  .96858  1 1 1
                 57.64962 "IQ26363497"  2018 "01/03/2018"  7 11 17 3 .010164827    .3463867  1.8082197  7.763976  .3537576   .0714347  6 44   .4465258  .6464567  .16297  1 1 1
                 90.35305 "IQ26363497"  2018 "01/04/2018"  8 11 17 3 .006010746    .3484264   1.604006  7.763976  .4323369  .07560599  6 44   .4599463         0   .2065  2 1 1
                 83.23645 "IQ26363497"  2017 "02/10/2017"  7 11 17 3 .014628096    .3781467  2.1170616  7.647356 .56487745  .07775287  6 44   .4465258  .6464567  .36427  3 1 1
                 64.12533 "IQ26363497"  2018 "05/06/2018"  8 11 17 3 .006010746    .3484264   1.728334  7.763976  .7465576  .07560599  6 44   .4599463         0  .34275  4 1 1
                 58.07841 "IQ26363497"  2017 "07/02/2017"  6 12 17 3 .006142893    .2902924   2.522015  7.638317   .440969  .07654997  6 44   .4886873  .6113105  .53999  5 1 1
                 79.93842 "IQ26363497"  2014 "13/02/2015"  6 12 17 3 .006287114   .25692567   2.479357  7.134056  .3934973  .08732155  6 44    .303955  .5381075 1.30117  6 1 1
                 61.64842 "IQ26363497"  2016 "13/07/2016"  6 12 17 3 .003664507   .19444963  2.1790512  7.636572  .6500653 .068467274  6 44   .3894639         0   .3419  7 1 1
                33.584824 "IQ26363497"  2016 "21/10/2016"  6 12 17 3 .001739372   .19621563   2.698003  7.636572  .4368104  .07233888  6 44   .4886873  .6113105  .55791  8 1 1
                end

                Comment


                • #9
                  Enayet:
                  I would simply compare your -fe- with -re- specification considering your first -xtreg- code adding clustered robust standard errors (as per -xttest3- outcome) (hence, you shoud use the community-contributed -xtoverid- programme as a comnparison test, because -hausman- deos not support non-default standard errors).
                  The fact that two variables were omitted due to their time-invariant nature should not worry that much.
                  I would not switch to -areg-.
                  Kind regards,
                  Carlo
                  (Stata 19.0)

                  Comment


                  • #10
                    Carlo

                    Thank you for your quick reply. Here is the xtoverid test outcome :

                    Code:
                     xtreg gw pr_vlow pr_lomod act_ins pass_ins vol fcf tobinq ln_tasset trans_psize earn_vol b_seg int_pct_ta
                    > sset ex_gw_pct_int beta
                    
                    Random-effects GLS regression                   Number of obs     =        408
                    Group variable: cid                             Number of groups  =        161
                    
                    R-sq:                                           Obs per group:
                         within  = 0.0326                                         min =          1
                         between = 0.2473                                         avg =        2.5
                         overall = 0.2477                                         max =         17
                    
                                                                    Wald chi2(14)     =      57.73
                    corr(u_i, X)   = 0 (assumed)                    Prob > chi2       =     0.0000
                    
                    --------------------------------------------------------------------------------
                                gw |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                    ---------------+----------------------------------------------------------------
                           pr_vlow |  -4.119618   1.998746    -2.06   0.039    -8.037087   -.2021479
                          pr_lomod |  -3.765043   1.835844    -2.05   0.040    -7.363231   -.1668557
                           act_ins |   4.585936   2.393244     1.92   0.055    -.1047362    9.276609
                          pass_ins |   6.636293   3.002334     2.21   0.027     .7518275    12.52076
                               vol |  -5.894199   5.985133    -0.98   0.325    -17.62484    5.836447
                               fcf |  -1.960586   7.469728    -0.26   0.793    -16.60098    12.67981
                            tobinq |  -.0016235   .0024973    -0.65   0.516     -.006518    .0032711
                         ln_tasset |  -5.662969   1.561032    -3.63   0.000    -8.722535   -2.603403
                       trans_psize |   13.34494   5.832257     2.29   0.022     1.913923    24.77595
                          earn_vol |  -.0769258   2.085702    -0.04   0.971    -4.164826    4.010974
                             b_seg |   .8564913   .3668472     2.33   0.020     .1374841    1.575499
                    int_pct_tasset |   35.19758   8.352491     4.21   0.000       18.827    51.56816
                     ex_gw_pct_int |   1.808802   3.967991     0.46   0.648    -5.968318    9.585921
                              beta |  -.6898061   2.591949    -0.27   0.790    -5.769932     4.39032
                             _cons |    32.4432   26.19209     1.24   0.215    -18.89235    83.77875
                    ---------------+----------------------------------------------------------------
                           sigma_u |  20.671011
                           sigma_e |  17.969642
                               rho |     .56957   (fraction of variance due to u_i)
                    --------------------------------------------------------------------------------
                    
                    . xtoverid
                    
                    Test of overidentifying restrictions: fixed vs random effects
                    Cross-section time-series model: xtreg re   
                    Sargan-Hansen statistic  27.905  Chi-sq(12)   P-value = 0.0057
                    So should, I use xtreg re?? If yes than which; r2 should I report?? Reading from the other thread, I found that overall r2 need to report. But my concern is that; is the low within r2 matter??

                    Once again I am very thankful for your help and I really appreciate it.

                    Comment


                    • #11
                      Enayet:
                      -no, the opposite is true.
                      You perfomed -xtreg,re- and then invoke -xtoverid-, which outcome clearly reject the null (null=go -re-).
                      In sum: go -xtreg,fe- and consider the R2 within (whereas the R2 between is what you shpuld look at when you go -re-).
                      Just an aside: if -xttest3- detected evidence of heteroskedasticity, you sholuld have invoked the -robust- option.
                      Kind regards,
                      Carlo
                      (Stata 19.0)

                      Comment

                      Working...
                      X