Announcement

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

  • Hausman Test

    I am facing the following problem when running the following test and how can I correct it?
    Code:
    . hausman fe re
    
    Note: the rank of the differenced variance matrix (2) does not equal the number of coefficients being tested (4); be sure this is what you expect, or there may be
            problems computing the test.  Examine the output of your estimators for anything unexpected and possibly consider scaling your variables so that the
            coefficients are on a similar scale.
    
                     ---- Coefficients ----
                 |      (b)          (B)            (b-B)     sqrt(diag(V_b-V_B))
                 |       fe           re         Difference          S.E.
    -------------+----------------------------------------------------------------
             fdi |    1.93e-06     2.57e-06       -6.44e-07        1.39e-07
             gdp |    .1889387      .200659       -.0117204        .0034824
           nbtot |    8.87e+07     8.15e+07         7231909         2633943
          exrate |    282453.4     103381.3        179072.1        192646.8
    ------------------------------------------------------------------------------
                               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(2) = (b-B)'[(V_b-V_B)^(-1)](b-B)
                              =        8.75
                    Prob>chi2 =      0.0126
    Last edited by Ishetu Mengesha; 09 Jun 2020, 16:50.

  • #2
    Ishetu:
    try:
    Code:
    hausman fe re, sigmamore
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Hello Carlo Thank you for your support. But still the problem is there after I tried by the following
      Code:
      . hausman fe re, sigmamore
      
      Note: the rank of the differenced variance matrix (2) does not equal the number of coefficients being tested (4); be sure this is what you expect, or there may be
              problems computing the test.  Examine the output of your estimators for anything unexpected and possibly consider scaling your variables so that the
              coefficients are on a similar scale.
      
                       ---- Coefficients ----
                   |      (b)          (B)            (b-B)     sqrt(diag(V_b-V_B))
                   |       fe           re         Difference          S.E.
      -------------+----------------------------------------------------------------
               fdi |    1.93e-06     2.57e-06       -6.44e-07        1.56e-07
               gdp |    .1889387      .200659       -.0117204        .0036625
             nbtot |    8.87e+07     8.15e+07         7231909         2998864
            exrate |    282453.4     103381.3        179072.1        202271.2
      ------------------------------------------------------------------------------
                                 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(2) = (b-B)'[(V_b-V_B)^(-1)](b-B)
                                =        6.79
                      Prob>chi2 =      0.0335
      
      .

      Comment


      • #4
        Ishetu:
        you may want to give it one more try with the community-contributed command -xtoverid-.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Carlo:
          I have tried but it is unrecognized command.

          Comment


          • #6
            Ishetu:
            you should first install -xtoverid-.
            Type:
            Code:
            search xtoverid
            and follow the instructions to install it.
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              When I run Fixed Effects (within) regression without robust command all variables are significant.

              Fixed-effects (within) regression Number of obs = 210
              Group variable: IDINDIAASEAN Number of groups = 10

              R-sq: Obs per group:
              within = 0.8041 min = 21
              between = 0.3309 avg = 21.0
              overall = 0.3474 max = 21

              F(5,195) = 160.09
              corr(u_i, Xb) = -0.8470 Prob > F = 0.0000

              ---------------------------------------------------------------------------------
              logXijt | Coef. Std. Err. t P>|t| [95% Conf. Interval]
              ------------------+--------------------------------------------------------------
              logGDPitGDPjt 2.395327 .6264141 3.82 0.000 1.15991 3.630743
              logPCGDPitPCGDPjt | -2.828763 .784914 -3.60 0.000 -4.376774 -1.280752
              logDistanceij | .4089278 .0314809 12.99 0.000 .3468412 .4710145
              TRGDPit | 1.624585 .246403 6.59 0.000 1.138628 2.110542
              TRGDPjt | .3707311 .0784522 4.73 0.000 .2160075 .5254548
              Borderij | 0 (omitted)
              _cons | -31.49102 9.28393 -3.39 0.001 -49.80083 -13.18122
              ------------------+----------------------------------------------------------------
              sigma_u | 1.660084
              sigma_e | .21798139
              rho | .98305059 (fraction of variance due to u_i)
              -----------------------------------------------------------------------------------
              F test that all u_i=0: F(9, 195) = 31.03 Prob > F = 0.0000

              . xtcsd, pesaran abs

              Pesaran's test of cross sectional independence = 6.797, Pr = 0.0000

              Average absolute value of the off-diagonal elements = 0.433

              . xttest3

              Modified Wald test for groupwise heteroskedasticity
              in fixed effect regression model

              H0: sigma(i)^2 = sigma^2 for all i

              chi2 (10) = 884.53
              Prob>chi2 = 0.0000

              Because of presence of heteroskedasticity I run fe robust command, but now the two variables which are important to my model have become insignificant
              Kindly suggest solution to this problem

              . xtreg logXijt logGDPitGDPjt logPCGDPitPCGDPjt logDistanceij TRGDPit TRGDPjt Borderij , fe robus
              t
              note: Borderij omitted because of collinearity

              Fixed-effects (within) regression Number of obs = 210
              Group variable: IDINDIAASEAN Number of groups = 10

              R-sq: Obs per group:
              within = 0.8041 min = 21
              between = 0.3309 avg = 21.0
              overall = 0.3474 max = 21

              F(5,9) = 37.57
              corr(u_i, Xb) = -0.8470 Prob > F = 0.0000

              (Std. Err. adjusted for 10 clusters in IDINDIAASEAN)
              -----------------------------------------------------------------------------------
              | Robust
              logXijt | Coef. Std. Err. t P>|t| [95% Conf. Interval]
              ------------------+----------------------------------------------------------------
              logGDPitGDPjt | 2.395327 1.590739 1.51 0.166 -1.203175 5.993829
              logPCGDPitPCGDPjt | -2.828763 1.988721 -1.42 0.189 -7.327561 1.670036
              logDistanceij | .4089278 .0810488 5.05 0.001 .2255828 .5922729
              TRGDPit | 1.624585 .4255777 3.82 0.004 .6618609 2.587308
              TRGDPjt | .3707311 .1472481 2.52 0.033 .0376327 .7038295
              Borderij | 0 (omitted)
              _cons | -31.49102 23.55634 -1.34 0.214 -84.77917 21.79712
              ------------------+----------------------------------------------------------------
              sigma_u | 1.660084
              sigma_e | .21798139
              rho | .98305059 (fraction of variance due to u_i)
              -----------------------------------------------------------------------------------

              . xtreg logXijt logGDPitGDPjt logPCGDPitPCGDPjt logDistanceij logPCGDPDijt TRGDPit TRGDPjt , fe robust

              Fixed-effects (within) regression Number of obs = 210
              Group variable: IDINDIAASEAN Number of groups = 10

              R-sq: Obs per group:
              within = 0.8056 min = 21
              between = 0.2801 avg = 21.0
              overall = 0.2944 max = 21

              F(6,9) = 30.43
              corr(u_i, Xb) = -0.8796 Prob > F = 0.0000

              (Std. Err. adjusted for 10 clusters in IDINDIAASEAN)
              -----------------------------------------------------------------------------------
              | Robust
              logXijt | Coef. Std. Err. t P>|t| [95% Conf. Interval]
              ------------------+----------------------------------------------------------------
              logGDPitGDPjt | 2.590503 1.591277 1.63 0.138 -1.009215 6.190221
              logPCGDPitPCGDPjt | -3.023769 1.967147 -1.54 0.159 -7.473765 1.426227
              logDistanceij | .4070484 .0808357 5.04 0.001 .2241855 .5899114
              logPCGDPDijt | -.1787298 .1919635 -0.93 0.376 -.6129814 .2555218
              TRGDPit | 1.527413 .4286397 3.56 0.006 .5577628 2.497063
              TRGDPjt | .3896496 .1457469 2.67 0.025 .0599472 .719352
              _cons | -34.10911 23.56937 -1.45 0.182 -87.42673 19.2085
              ------------------+----------------------------------------------------------------
              sigma_u | 1.9337988
              sigma_e | .21771865
              rho | .98748305 (fraction of variance due to u_i)
              --------------------------------------------------------

              Comment


              • #8
                Saba:
                welcome to this forum.
                For the future, please use CODE delimiters to share what you typed and what Stata gave you back (see the FAQ on this and other posting-related topics) open a new thread as you actually queued up to a previous one that has nothing to do with yours. Thanks.
                That said:
                1) if you have detected heteroskedasticity, you should invoke non-default standard errors (as you did): if the coefficients of the predictors you are intrested in turn out insignificant, you've got to live with that. The significance you got with default standard errors is biased by heteroskedasticity.
                2) on the other side, 10 clusters are probably few to invoke non-default standard errors (and so they can be misleading).
                ) Finally I would check whether heteroskedastcity may depend on logging too many predictors.
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment


                • #9
                  Carlo Lazzaro Thank you so much for your reply and my apology for posting question like this. I will keep in my mind the caution while posting question next time.

                  With regards,
                  Saba

                  Comment

                  Working...
                  X