Announcement

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

  • Hausman test


    When estimating a Hausman test between fixed and random effects models I got a negative chi2 value. More specifically I get the following result:
    chi2(0) = (b-B)'[(V_b-V_B)^(-1)](b-B)
    = 0.00
    Prob>chi2 = .
    (V_b-V_B is not positive definite)

    Can anyone tell me what this means?

  • #2
    From the help file of hausman:

    Remark: An alternative to hausman

    The assumption that one of the estimators is efficient (that is, has minimal asymptotic variance) is a demanding one. It is violated, for instance,
    if your observations are clustered or pweighted, or if your model is somehow misspecified. Moreover, even if the assumption is satisfied, there may
    be a "small sample" problem with the Hausman test. Hausman's test is based on estimating the variance var(b-B) of the difference of the estimators
    by the difference var(b)-var(B) of the variances. Under the assumptions (1) and (3), var(b)-var(B) is a consistent estimator of var(b-B), but it is
    not necessarily positive definite "in finite samples", that is, in your application. If this is the case, the Hausman test is undefined.
    Unfortunately, this is not a rare event. Stata supports a generalized Hausman test that overcomes both of these problems. See [R] suest for
    details.



    Jorge Eduardo Pérez Pérez
    www.jorgeperezperez.com

    Comment


    • #3
      Hey Elena,

      I had a similar issue a few days ago. I think one of the basic assumptions if the Hausman Test is that the matrix is positive definite so violating this might cause problems.

      What I did was in the first place to use the "sigmaless" option and it worked for me. See http://www.stata.com/manuals13/rhausman.pdf

      Moreover I used the user written command: xtoverid to peform an "robust" hausman test. See https://ideas.repec.org/c/boc/bocode/s456779.html

      Unfortunately I could not provide any theoretical background, but I would also be interested in a detailed discussion of this problem. However, I think our Prof. told us that the test statistic could become negative and therefore the hausman test might not work "right".

      Comment


      • #4
        Thank you everyone. I did tried already to use the "sigmaless"option but I got the same result. I might try to use the xtoverid command and see if the results change

        Comment


        • #5
          I found this command in stata: .

          xtivreg ln_wage age (tenure = union south), fe i(idcode)

          . xtoverid

          . xtoverid, robust

          . xtoverid, cluster(idcode)

          However I cannot identify what is an id code
          My panel data consist of 10 countries and data gathered from 1990 to 2010 regarding gdp fdi and trade openness.

          Any idea how can I proceede?

          Comment


          • #6
            Dear Elena,

            an ID means in your case of panel data an unique identifier that identifies an individual (or country) over time. You need an id and a time variable (year) to declare the data to be panel data with the command "xtset".

            I would also recommend you to re-read what panel data means and how to handle it. Maybe the book of Cameron/Triverdi 2010 "Microeconometrics using stata" might be as helpful for you, as it was for me. However, it is quite expensive so maybe you prefer an introduction on youtube: https://www.youtube.com/playlist?lis...npJVWw981hglR8
            ​A basic introduction to panel data is also given by:
            http://www.princeton.edu/~otorres/Panel101.pdf

            Finally if you have

            Kind regards

            Justus

            Comment


            • #7
              Hello again,
              I am trying basically to come up with a solution for this hausman test issue I have
              I tried to run the xtoverid command
              xtivreg co2 gdp gdp2 fdi trade, fe i(cnt_2)
              xtoverid, cluster(cnt_2)

              And I keep having the following result:
              xtivreg co2 gdp gdp2 fdi trade, fe i(cnt_2)
              xtoverid, cluster(cnt_2)

              My panel data consist of 10 countries and data gathered from 1990 to 2010 regarding gdp fdi and trade openness.

              I really do not understand why it does not work

              Comment


              • #8
                Elena - we can't tell what "it does not work" means because you've provided only the commands you've used, and not the Stata output. That said, check out the examples in the xtoverid help files for the one that is closest to what you want to do, and then copy it. It looks like you want to do a standard fixed-vs-random effects Hausman-type test, but your estimation command uses xtivreg with fixed effects. You have no endogenous regressors, so you should probably use xtreg, and then the closest example in the help file is one where the estimation is xtreg with random effects followed by xtoverid.

                Comment

                Working...
                X