Announcement

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

  • rhausman test


    Hi Dears,
    I am having an unbalanced panel data with 780 observations and I have run fixed effetcs and random effects for my analysis.I have used the following commnads to run the model .my problem is that while running hausman test it is showing that hausman test can be run for robust options .later i found that rhausman is the command to use while doing robust fe re models.but still i am getting error results .can anyone help me in this line ?

    xtreg x1 x2 x3 ,fe vce (robust)
    estimate store fe
    xtreg x1 x2 x3 ,re vce robust
    estimate store re



    Thankyou so much

  • #2
    Show exactly what you typed at Stata, and exactly what Stata returned, and use proper formatting (the # symbol on the formatting menu).

    Comment


    • #3
      Fadi:
      you are kindly requested to follow Joro's helpful advice. Thanks.
      That said, you may be interested in taking a look at the community-contributed module -xtoverid-.
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        Hi carlo, @carlo lazzaro
        I have a few questions about the hausman test statistic?
        Code:
         xtreg X1 X2,fe
        estimates store fe
        xtreg X1 X2 ,re
        estimates store re
        hausman fe re
        Code:
         xtreg X1 X2,fe cluster(bankid)
        estimates store fe
        xtreg X1 X2,re cluster (bankid)
        estimates store re
        rhausman fe re,cluster
        Which of the above hausman tests should I use? Will it have an effect on the result?

        also is it possible to use the -xtoverid- command on unbalanced panels? Even though I installed the -xtoverid- command, it doesn't run.

        Comment


        • #5
          Cengiz:
          if you have clustered standard errors, -hausman- cannot support them.
          My preference goes out to the community-contributed module -xtoverid-, but you should be more specific about what you mean by "it does not work". Thanks.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            dear carlo,
            Thanks for your feedback.
            Actually what I want to ask here is
            Code:
             xtreg y X1 X2 ,fe
            estimates store fe
            xtreg y X1 X2,re
            estimates store re
            hausman fe re
            Code:
            xtreg y X1 X2,re
            xtoverid
            While the result in the above codes is the same

            Code:
            xtreg Y X1 X2 ,fe
            estimates store fe
            xtreg Y X1 X2,re
            estimates store re
            rhausman fe re,cluster
            Code:
             xtreg Y X1 X2,re cluster(bankid)
            xtoverid
            these rhausman and -xtoverid- results differ from each other.
            While the rhausman output result is RE, the -xtoverid- result is FE.
            Which one should we trust here?

            Comment


            • #7
              also when using -xtoverid-

              Code:
              xtreg y X1 X2,re
              xtoverid
              Code:
              xtreg y X1 X2,re cluster(bankid)
              xtoverid
              which is the correct form?
              because these results differ from each other.
              thanks,

              Comment


              • #8
                Cengiz:
                I would go:
                Code:
                 
                 xtreg y X1 X2,re cluster(bankid) xtoverid
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment


                • #9
                  thank you very much Carlo,

                  all the best,

                  Comment


                  • #10
                    Cengiz:
                    the way my previois code was displayed shoud have been:
                    Code:
                     
                     xtreg y X1 X2,re cluster(bankid)  xtoverid
                    Kind regards,
                    Carlo
                    (Stata 19.0)

                    Comment


                    • #11
                      I have the same case in my dataset as Cengiz:
                      While the rhausman output result is RE, the -xtoverid- result is FE.
                      Which one should we trust here?

                      Can someone explain why Carlo said to prefer xtoverid?

                      Comment


                      • #12
                        Eduard:
                        1) unlike -hausman-, the community-contributed module -xtoverid- (as the FAQ lindly request to mention it) accepts non-default standard errors.
                        2) I am not familiar with the community-contributed module -rhausman-.

                        As per FAQ, please post what you typed and what Stata gave you back. Thanks.
                        Kind regards,
                        Carlo
                        (Stata 19.0)

                        Comment


                        • #13
                          Carlo:
                          Thank you for your reply! Please see my code attached:
                          For the rhausman command:
                          Code:
                          xtreg deviation success_p ownproduction_dummy dummy_segment_1 dummy_segment_2 ///
                              dummy_segment_3 dummy_segment_4 dummy_segment_5 dummy_time1 dummy_time2 dummy_time3 dummy_time4 dummy_time5 dummy_time6 dummy_time7, fe vce(cluster v02project)
                          estimates store fixed
                          
                          xtreg deviation success_p ownproduction_dummy dummy_segment_1 dummy_segment_2 ///
                              dummy_segment_3 dummy_segment_4 dummy_segment_5 dummy_time1 dummy_time2 dummy_time3 dummy_time4 dummy_time5 dummy_time6 dummy_time7, re vce(cluster v02project)
                          estimates store random
                          
                          rhausman fixed random,cluster
                          For the xtoverid command:
                          Code:
                          xtreg deviation success_p ownproduction_dummy dummy_segment_1 dummy_segment_2 ///
                              dummy_segment_3 dummy_segment_4 dummy_time1 dummy_time2 dummy_time3 dummy_time4 dummy_time5 dummy_time6 , re vce(cluster v02project)
                          *xtoverid cannot drop variables of Collinearity automatically. Hence, we dropped the latter dummy of time and segment. See https://www.stata.com/statalist/archive/2013-04/msg00833.html
                          xtoverid

                          Comment


                          • #14
                            Result on rhausman:
                            Code:
                            Cluster-Robust Hausman Test
                            (based on 100 bootstrap repetitions)
                            
                            b1: obtained from xtreg deviation success_p ownproduction_dummy dummy_segment_1 dummy_segment_2     dummy_segment_3 dummy_segment_4 dummy_segment_5 dummy_time1 dummy_time2 dummy_time3 dummy_time4 dummy_time5 dummy_time6 dummy_time7, f
                            > e vce(cluster v02project)
                            b2: obtained from xtreg deviation success_p ownproduction_dummy dummy_segment_1 dummy_segment_2     dummy_segment_3 dummy_segment_4 dummy_segment_5 dummy_time1 dummy_time2 dummy_time3 dummy_time4 dummy_time5 dummy_time6 dummy_time7, r
                            > e vce(cluster v02project)
                            Excluded (not identified, or only identified in one model):  dummy_segment_5 dummy_time7
                            
                                Test:  Ho:  difference in coefficients not systematic
                            
                                             chi2(12) = (b1-b2)' * [V_bootstrapped(b1-b2)]^(-1) * (b1-b2)
                                                      =        5.49
                                            Prob>chi2 =      0.9395
                            Result on xtoverid:
                            Code:
                            . xtoverid
                            
                            Test of overidentifying restrictions: fixed vs random effects
                            Cross-section time-series model: xtreg re  robust cluster(v02project)
                            Sargan-Hansen statistic  60.806  Chi-sq(9)    P-value = 0.0000

                            Comment


                            • #15
                              Dear Fadi, Eduard, and Cengiz,

                              You might also be interested in looking at the Mundlak specification test. This specification test is an alternative to Hausman's and can be implemented with heteroskedastic or clustered errors. In Stata 18.5 or above, you can perform this test with the -estat mundlak- postestimation command or with option -cre- of -xtreg-.

                              Comment

                              Working...
                              X