Announcement

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

  • How to perform the Durbin Wu Hausman (DWH) test after xtivreg, fe?

    Dear Statalist community,

    I am currently running a SLS model (fixed effects panel data) via xtivreg, after which I would like to conduct the Durbin Wu Hausman (DWH) test. However, ivendog does not work after xtivreg; it only works after ivreg. Thus, I have used the user-written dmexogxt command; yet this command computes the Davidson-MacKinnon test of exogeneity, not the Durbin Wu Hausman (DWH) test.

    Thus, I was wondering whether there is any way of performing the Durbin Wu Hausman (DWH) test after xtivreg, fe?

    This is the code I use:

    Code:
    xtivreg DV control1 control2 control3 (IV = Z), fe vce(cluster FirmID)
    Where DV = dependent variable, IV = independent variable, Z = instrument

    Any advice on the above question would be immensely appreciated.

    All the best wishes,

    Franz

  • #2
    There are two things here that you can test with a Hausman test:
    1) Whether you need fixed effects.
    2) Whether you need IV.

    From your post it is not obvious whether you have thought this through... You do not explain what you want to test, you just state that you want to do (some) Hausman test.

    You can have a look at this thread https://www.statalist.org/forums/for...an-test-result
    and in particular at my post #10 and the note that I had attached.

    Comment


    • #3
      Joro:

      Thank you so much for your reply and the link provided. It was indeed the second issue I wanted to test, i.e., whether I need IV (test for the exogeneity). In particular, I was hoping to find a command which I can use with xtivreg -- and not with xtivreg2.

      I note that for my analysis I have panel data (fixed effects).

      With xtivreg2, there seems to be the endog() option. For example, if I wanted to test for a U-shaped relationship, I was using the following code, as I would like to test for the exogeneity of both our independent variable and of the squared term:

      Code:
      xtivreg2 DV control1 control2 control3 (IV IV_squared = Z Z_squared), fe robust cluster(FirmID) endog(IV IV_squared)
      Where DV = dependent variable, IV = independent variable, Z = instrument

      Running the above command, the -endog- option section of the output shows a value for Chi-sq( ) P-val. So, if the p-value for this test result is high, I would assume that the results appear to indicate that endogeneity does not significantly affect our results, if I understand it correctly.

      However, ideally, I would like to test whether I need IV (test for the exogeneity) for xtivreg -- and not with xtivreg2. Sadly, ivendog doesn’t work after xtivreg; it only works after ivreg. Instead of ivendog, Stata suggest the use of dmexogxt; however, this test appears to have limitations. Thus, I was wondering whether there is any alternative to dmexogxt for running a Durbin–Wu–Hausman (DWH) after xtivreg, fe (panel data, fixed effects).

      Any advice on the above would be immensely appreciated.

      Thank you so much!

      Franz
      Last edited by Franz Hopp; 26 Apr 2022, 05:42.

      Comment

      Working...
      X