Announcement

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

  • Hausman test doesn't reject null hypothesis while only using time-varying variables

    Hello,

    In order to formally examine if I need to use a random effects model or a fixed effects model I used the Hausman test. The outcome of the test gives a p-value of 0.9437, and thus suggests using random effects. However, the independent variables only change over time (the dependent variable changes as well depending on the firm (and maybe sector/country)). I'm not that good with statistics so I might me missing something here, but it seems strange to me. The way I set up the test is as follows:

    Code:
    eststo clear
    xtreg ExcessReturn MarketReturn SMB HML MOM i.SectorID i.CountryID, fe
    estimates store fixed
    xtreg ExcessReturn MarketReturn SMB HML MOM i.SectorID i.CountryID, re
    estimates store random
    hausman fixed random
    Where ExcessReturn is the return of company i at time t, the MarketReturn is the excess market return which is the average of the excess returns of all companies at date t. SMB HML and MOM are constructed in line with the papers of Fama and French and Carhart and are constructed such that they can only vary over time. The factor variables SectorID and CountryID are included since the sector and country a firm operates in might affect the excess return of company i at date t, and I want to control for that. Below is a snippet of code, Date is the time variable and REITID is the unique firm number (Which I both use to -xtset- my data).

    Code:
    input float(Date REITID ExcessReturn MarketReturn SMB HML MOM SectorID CountryID)
    171 1  -9.440001 -1.0749136 -3.7483804  -.6157021 -2.5441656 6 10
    172 1 -.23067153   6.606457 -2.7974524 -10.798384   9.446184 6 10
    173 1  2.3877504   10.07215   5.672843  2.6696534   7.611172 6 10
    174 1   22.53878  10.057003  .28148493  4.0360847   3.238162 6 10
    175 1 -4.4105935  12.015347  1.2228957  -.3001416  13.612865 6 10
    176 1   9.923957    9.74767   .7405882 -4.3828297   11.37171 6 10
    177 1  27.909885 -3.3316555   1.315525   .4309188   5.270253 6 10
    178 1    38.8549   5.941885 -1.4706553  1.4985192    5.51484 6 10
    179 1  -2.608258  10.297854  -3.233433 -1.3362517   6.892611 6 10
    180 1  -4.814528  -5.401249   1.680852  1.5334582   5.833806 6 10
    181 1  1.1988835   8.657557  -1.566229   -3.88455   6.073496 6 10
    182 1  -10.00392   .8872273  1.4616922 -2.0659008   7.488734 6 10
    183 1  -2.158341  -2.582946  .27107388  -4.219196   6.579329 6 10
    184 1  -4.290891   7.139935  -2.647226   -.954525   10.16421 6 10
    185 1   -5.95862  -6.669175  .13204457   1.204631  4.1342564 6 10
    186 1 -1.8331425   4.370256  -.7642784  -4.226533   7.026246 6 10
    187 1  -7.332802   5.441633 -3.3007786 -1.3266678   6.560895 6 10
    188 1  -5.033582  -1.824159  1.7520213    3.83196  4.5917764 6 10
    189 1  -6.434231 -4.7263775   .7792741  2.3712854   4.141177 6 10
    190 1  -5.137455  -10.41793  2.7938976  -7.229966   9.367115 6 10
    191 1 -15.027543 -11.567904  -.7072735  -2.607095  15.839113 6 10
    192 1   3.477226  -4.499657 -.14876397  -.6247238   6.697685 6 10
    193 1 -19.377325  -5.218708  -3.999772  -.5578733   9.008693 6 10
    194 1  -21.91165  -4.459873  -3.545888  -25.09161   20.01709 6 10
    195 1  -53.11881  -36.45319   9.453849 -15.340182   10.29704 6 10
    196 1  10.683544 -14.731014  20.251116   7.270116   .8241994 6 10
    197 1 -1.6426252   41.50608  -8.526512  25.568655   24.10448 6 10
    198 1  72.575195   28.77553  -20.65073   28.55095  19.347727 6 10
    199 1 -10.408362   7.340466  -5.201946 -1.3785267   6.285709 6 10
    200 1  -.9066604  11.607112   3.233758   4.971951  9.5214815 6 10
    201 1    20.8033  -5.281564  1.5557383  -4.224146   5.279486 6 10
    202 1  -2.053289  11.006284 -1.8901345  -5.329961   6.172294 6 10
    203 1 -4.6773753   7.732144  3.6045854   2.728885  18.305208 6 10
    204 1   32.18429  4.6498213  -1.979728 -4.1622314   5.862594 6 10
    205 1 -4.1648693   3.142606 -1.9847524   2.369082    6.59143 6 10
    206 1 -15.151338 -13.277354   2.076924 -8.8754425  10.043022 6 10
    207 1 -18.519657   9.790837  -2.667873  -4.240561   7.702041 6 10
    208 1  16.343721  12.145834  -2.661849   6.656261  4.5044203 6 10
    209 1  -7.456194   2.406923  .05857579 -2.3774052   6.354871 6 10
    210 1 -1.5438974   3.008416   .8470848 -1.8965032   6.640161 6 10
    211 1 -14.042968   6.804479  2.4701266  1.4985784    8.78977 6 10
    212 1  14.508615  -8.492827  4.2582293  -5.699647   7.548661 6 10
    213 1 -20.180696  26.268845  -.4540825   2.642975  19.314386 6 10
    214 1 -14.081292  -2.663178  .06717531  -.8534662    4.38638 6 10
    215 1  -2.192807   1.554905    4.11393  -5.827385   5.851846 6 10
    216 1 -17.808323   6.264362 -3.9439204   .3253142   2.183282 6 10
    217 1   6.731793   5.766956 -.53096896  -.3001921  4.4555726 6 10
    218 1  -3.831409 -2.0243788   .1465462  -.2981504  3.8664274 6 10
    219 1    39.4622   7.440179  -2.305147 -10.822804  10.430874 6 10
    220 1   43.37747  4.5851545  2.9235344  -1.643838   7.937851 6 10
    221 1 -4.6273923  -6.734914   3.302772   2.463044   3.283676 6 10
    222 1 -12.499606 -3.1405394  -5.153544 -1.0164707   9.249632 6 10
    223 1 -1.0959892   3.881232 -1.4011377  -4.668398   7.261946 6 10
    224 1   8.579062   5.421653  1.0499226 -2.3494563    6.64701 6 10
    225 1   1.224613   8.075598   .8927975  -5.564209   12.66219 6 10
    226 1 -13.991075  1.4793346   3.836293 -.09106666   1.817371 6 10
    227 1  -8.047303  .02160281  4.6820726  -3.197077    5.63482 6 10
    228 1    3.74312    1.42938 -.22365157  2.0259492   2.848436 6 10
    229 1          .   1.813688  -6.142816   4.894737   .9025068 6 10
    171 2          . -1.0749136 -3.7483804  -.6157021 -2.5441656 4  7
    172 2          .   6.606457 -2.7974524 -10.798384   9.446184 4  7
    173 2          .   10.07215   5.672843  2.6696534   7.611172 4  7
    174 2          .  10.057003  .28148493  4.0360847   3.238162 4  7
    175 2          .  12.015347  1.2228957  -.3001416  13.612865 4  7
    176 2          .    9.74767   .7405882 -4.3828297   11.37171 4  7
    177 2          . -3.3316555   1.315525   .4309188   5.270253 4  7
    178 2          .   5.941885 -1.4706553  1.4985192    5.51484 4  7
    179 2          .  10.297854  -3.233433 -1.3362517   6.892611 4  7
    180 2          .  -5.401249   1.680852  1.5334582   5.833806 4  7
    181 2          .   8.657557  -1.566229   -3.88455   6.073496 4  7
    182 2          .   .8872273  1.4616922 -2.0659008   7.488734 4  7
    183 2          .  -2.582946  .27107388  -4.219196   6.579329 4  7
    184 2          .   7.139935  -2.647226   -.954525   10.16421 4  7
    185 2          .  -6.669175  .13204457   1.204631  4.1342564 4  7
    186 2          .   4.370256  -.7642784  -4.226533   7.026246 4  7
    187 2          .   5.441633 -3.3007786 -1.3266678   6.560895 4  7
    188 2          .  -1.824159  1.7520213    3.83196  4.5917764 4  7
    189 2  -6.162662 -4.7263775   .7792741  2.3712854   4.141177 4  7
    190 2 -10.967333  -10.41793  2.7938976  -7.229966   9.367115 4  7
    191 2 -19.114197 -11.567904  -.7072735  -2.607095  15.839113 4  7
    192 2 -10.108238  -4.499657 -.14876397  -.6247238   6.697685 4  7
    193 2   12.92518  -5.218708  -3.999772  -.5578733   9.008693 4  7
    194 2  18.467722  -4.459873  -3.545888  -25.09161   20.01709 4  7
    195 2  -28.75954  -36.45319   9.453849 -15.340182   10.29704 4  7
    196 2 -16.607111 -14.731014  20.251116   7.270116   .8241994 4  7
    197 2  27.101025   41.50608  -8.526512  25.568655   24.10448 4  7
    198 2     27.034   28.77553  -20.65073   28.55095  19.347727 4  7
    199 2   1.700399   7.340466  -5.201946 -1.3785267   6.285709 4  7
    200 2   11.64534  11.607112   3.233758   4.971951  9.5214815 4  7
    201 2  -7.379145  -5.281564  1.5557383  -4.224146   5.279486 4  7
    202 2 -.22773707  11.006284 -1.8901345  -5.329961   6.172294 4  7
    203 2  -3.841581   7.732144  3.6045854   2.728885  18.305208 4  7
    204 2  1.4171095  4.6498213  -1.979728 -4.1622314   5.862594 4  7
    205 2 -11.436727   3.142606 -1.9847524   2.369082    6.59143 4  7
    206 2  -28.68168 -13.277354   2.076924 -8.8754425  10.043022 4  7
    207 2  -.5337218   9.790837  -2.667873  -4.240561   7.702041 4  7
    208 2    10.4295  12.145834  -2.661849   6.656261  4.5044203 4  7
    209 2  -4.832253   2.406923  .05857579 -2.3774052   6.354871 4  7
    210 2    2.67996   3.008416   .8470848 -1.8965032   6.640161 4  7
    211 2  16.287703   6.804479  2.4701266  1.4985784    8.78977 4  7
    end
    format %tq Date
    label values REITID REITID
    label def REITID 1 "ACRE Realty Investors Inc.", modify
    label def REITID 2 "AIMS AMP Capital Industrial REIT", modify
    label values SectorID SectorID
    label def SectorID 4 "Industrial", modify
    label def SectorID 6 "Multifamily", modify
    label values CountryID CountryID
    label def CountryID 7 "Singapore", modify
    label def CountryID 10 "USA", modify
    Last edited by Rob Sukaldi; 18 Dec 2017, 09:54. Reason: Edited the dataex output for SectorID and CountryID

  • #2
    Hausman can only work on the parameters estimated by both estimators. Since fixed effects cannot estimate variables that do not vary within panel, Hausman can't use them in the test.

    Comment


    • #3
      I don't understand what you mean. Are you implying that the hausman test doesn't work for panel data?

      Comment


      • #4
        Rob:
        not quite.
        Phil is right: as you can see from -hausman- entry in Stata .pdf manual (and any decent textbook on panel data econometrics), -hausman- considers parameters which are common to -fe- and -re- specifications only: otherwise, it would be impossible to check whether the null hypothesis of -re- is to be rejected or not.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Sorry for the late reply. Do you mean with
          ... parameters which are common to -fe- and -re- specifications only...
          that it is impossible to check whether one prefers fixed or random effects if those parameters vary only over time, or solely of countries?

          Comment


          • #6
            Rob:
            an example may clarify:
            Code:
            . use "http://www.stata-press.com/data/r14/nlswork.dta", clear
            (National Longitudinal Survey.  Young Women 14-26 years of age in 1968)
            
            . quietly xtreg ln_wage i.race, fe
            
            . estimates store fe
            
            . quietly xtreg ln_wage i.race, re
            
            . estimates store re
            
            . hausman fe re
            no common coefficients names (eq:coef), nothing to test
            r(498);
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Rob: Is this a panel of countries? It seems to be, but if you'd show your xtset command then I could help more.

              Assuming it is a country panel, you should not be including the country dummies in the estimation. So i.CountryID should be dropped. Fixed effects already allows these. Random effects treats the country effects as part of the error term.

              The Hausman test can only compare coefficients on time-varying variables because the time-constant variables get dropped out.

              Comment


              • #8
                Sorry for the extremely late reply, but for some reason I didn't receive any notifications anymore. But your, Carlo Lazzaro, example and the post of Jeff Wooldridge do clarify a lot. Thank you!

                Comment

                Working...
                X