Announcement

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

  • FE, RE unbalanced panel Hausman test

    I have an unbalanced panel data (firms' financial and ownership data of 9 years) containing some key time invariant explanatory variables. Which model is more appropriate fe or re? I run Hausman test but the xtreg command omits the time-invariant variables. Any suggestions?
    Last edited by Abdul Sattar; 16 Jun 2020, 09:57.

  • #2
    Abdul.
    welcome to this forum.
    You neither share what you typed and what Stata gave you back (as per FAQ), not report any detail about -xtreg,re- (that you shoud have run before -hausman-) results and -hausman- test.
    That makes difficult (for me, at any rate) to reply positively.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Carlo,

      Thank you for the reply.
      Here it briefly mentioned what I run on stata

      xtset com_id year
      panel variable: com_id (unbalanced)
      time variable: year, 2009 to 2017, but with gaps
      delta: 1 unit

      xtreg dvp indv1 indv2 indv3 indv4, fe
      note: indv1 omitted because of collinearity
      note: indv2 omitted because of collinearity

      Fixed-effects (within) regression
      Group variable: com_id

      estimate store fe

      xtreg dvp indv1 indv2 indv3 indv4, re

      Random-effects GLS regression
      Group variable: com_id

      estimate store re

      hausman fe re

      The Hausman test results show fe is consistent but the problem is that fixed effect omits my key variables indv1 and indv2 which are time invariant variables. Now I would like to ask, should a go for random effect? or having two time invariant variables in the model should I go for GMM ?

      I also used least square dummy variable fixed effects with:
      reg dvp indv1 indv2 indv3 indv4 i.country i.industry, vce (cluster company_id) with this command I have no problem of variable omission. Is this approach appropirate?

      I hope it is more clear now.

      Regards,

      Abdul Sattar

      Comment


      • #4
        Abdul:
        if you're unterested in estimating the coefficients of time-invariant predictors but -hausman- points you to -fe- specification, you may want to consider the community-contributed programme -xthybrid- (just type -search xthybrid- to spot it and follow the instructions to install it).
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Hello Carlo,

          Thank you for your valuable suggestion. I have the following output.


          xthybrid GETR HTECH HVN_INT INTG LEV LoGSIZE CAP_INT ROA, clusterid (com_id)

          The variable 'HTECH' does not vary sufficiently within clusters
          and will not be used to create additional regressors.
          [0% of the total variance in 'HTECH' is within clusters]
          The variable 'HVN_INT' does not vary sufficiently within clusters
          and will not be used to create additional regressors.
          [0% of the total variance in 'HVN_INT' is within clusters]

          Hybrid model. Family: gaussian. Link: identity.

          +-----------------------------------+
          Variable model
          ----------------------+------------
          GETR
          R__HVN_INT -0.0832
          R__HTECH 0.0105
          W__INTG 0.1132
          W__LEV 0.0897
          W__LoGSIZE -0.0196
          W__CAP_INT 0.0476
          W__ROA -0.5000
          B__INTG 0.0268
          B__LEV 0.0720
          B__LoGSIZE 0.0030
          B__CAP_INT -0.0422
          B__ROA -0.3720
          _cons 0.2434
          ----------------------+------------
          var(_cons[com_id])
          _cons 0.0093
          ----------------------+------------
          var(e.GETR)
          _cons 0.0135
          ----------------------+------------
          Statistics
          ll 27150.1051
          chi2 3060.7473
          p 0.0000
          aic -5.427e+04
          bic -5.414e+04
          +-----------------------------------+
          Level 1: 44523 units. Level 2: 6432 units.

          Now my question is, since I have two main variables are time-invariant , is it rational to use -re,-fe or xthybrid models? how to interpret the results of xthybrid Moreover, when I used -reghdfe command with absorbing (Industry and Country) effects and clustering with (company id) i got the coefficients of time-invariant variables, is it the right approach?
          Thank you.

          Comment


          • #6
            Abdul:
            1) to increase your knowledge about the community-contributed command -xthybrid-, take a look at: https://journals.sagepub.com/doi/pdf...867X1701700106
            2) if you're interested in time-inavirant predictors but -fe- is the way to go, I would stick with -xthybrid-;
            3) I'm not sure I got with your last statement, but I cannot obtain the coefficients of time invariant regressors with the community-contributed programme -reghdfe-:
            Code:
            . use "https://www.stata-press.com/data/r16/nlswork.dta"
            (National Longitudinal Survey.  Young Women 14-26 years of age in 1968)
            
            . reghdfe ln_wage age i.race,abs(FE=idcode)
            (dropped 551 singleton observations)
            (converged in 1 iterations)
            note: 2.race omitted because of collinearity
            note: 3.race omitted because of collinearity
            (converged in 2 iterations)
            
            HDFE Linear regression                            Number of obs   =     27,959
            Absorbing 1 HDFE group                            F(   1,  23799) =    2720.20
                                                              Prob > F        =     0.0000
                                                              R-squared       =     0.6540
                                                              Adj R-squared   =     0.5936
                                                              Within R-sq.    =     0.1026
                                                              Root MSE        =     0.3035
            
            ------------------------------------------------------------------------------
                 ln_wage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
            -------------+----------------------------------------------------------------
                     age |   .0181349   .0003477    52.16   0.000     .0174534    .0188164
                         |
                    race |
                  black  |          0  (empty)
                  other  |          0  (empty)
            -------------+----------------------------------------------------------------
                Absorbed |    F(4158, 23799) =      9.256   0.000             (Joint test)
            ------------------------------------------------------------------------------
            
            Absorbed degrees of freedom:
            ---------------------------------------------------------------+
             Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     |
            -------------+-------------------------------------------------|
                  idcode |         4159            4159              0     |
            ---------------------------------------------------------------+
            
            .
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Carlo,
              Thank you for your valuable input. Yes you are right, in reghdfe I will not get coefficients of time-invariant if i place abs(company_code). Instead of company code I absorbed the industry effects by putting ,abs(Industry). I wanted to ask, am I doing it right or compromising on some significant assumptions?

              Comment


              • #8
                Abdul:
                the issue seems to rest on your interest in time-invariant predictors (which coefficinets, as expected, -fe- cannot give you back).
                Again, the only way I see is to go -xthybrid-.
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment


                • #9
                  Dear Carlo,

                  Thank you again, -xthybrid- is working for me.

                  Best regards,
                  Abdul Sattar

                  Comment


                  • #10
                    Dear Carlo,

                    I want to add factor variables in the -xthybrid- like .. xi: xthybrid depv indv1 indv2 i.industry i.country, clusterid(company_id). is it mean that I am controlling for industry , country heterogeneity( industry and country fixed effects)?

                    Comment


                    • #11
                      Abdul:
                      I would say that you control for -i.industry- and -i.county- but do not actually get a fixed effect as far as these predictors are concerned.
                      Kind regards,
                      Carlo
                      (Stata 19.0)

                      Comment


                      • #12
                        Hello Carlo,
                        Thank you for the clarifying. I have perhaps last two questions regarding -xrhybrid, first how can I report the r-square of the model? I can't find any sub-command of obtaining R-square using xthybird , second , I have to test some interaction terms , I have a categorical variable I want to estimate different combinations, I know we have to do it manually as # does not work , but for reporting different combination is there any way to report it from the model?
                        Thanks have a good Sunday.

                        Comment


                        • #13
                          Abdul:
                          the community-contribute command-xthybrid- gives back -chi2- (no R-sq) statistic in the outcome table.
                          As far as your second query is concerned, as -xthybrid- does not support -fvvarlist- notation, you should add the main conditionalt terms included in the interaction along with the interaction variable created by hand. Then use -test-.
                          Kind regards,
                          Carlo
                          (Stata 19.0)

                          Comment


                          • #14
                            Originally posted by Carlo Lazzaro View Post
                            Abdul:
                            the community-contribute command-xthybrid- gives back -chi2- (no R-sq) statistic in the outcome table.
                            As far as your second query is concerned, as -xthybrid- does not support -fvvarlist- notation, you should add the main conditionalt terms included in the interaction along with the interaction variable created by hand. Then use -test-.
                            Hi, Carlo, When we are doing a fixed effects model, how should we write the categorical variable such as industry in the code shown below?

                            xtreg y x1 x2 i.industry, fe

                            xtreg y x1 x2, fe i(industry)
                            Thanks,
                            Nitin

                            Comment


                            • #15
                              Originally posted by Nitin Jain View Post

                              Hi, Carlo, When we are doing a fixed effects model, how should we write the categorical variable such as industry in the code shown below?


                              Thanks,
                              Nitin
                              How did you xtset your data? As in what variable did you put as x (cross-sectional variable)? If this variable is industry, then you do not need to re-specify it in the xtreg command.

                              However, you do need to specify time (for two-way FE) as a factor variable: i.time, before the comma. You have to specify any other vector of fixed effects (apart from unit fixed effects) like that as well.

                              Comment

                              Working...
                              X