Announcement

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

  • RESET Test after ivreghdfe

    Hi all, I am trying to use the Ramsay RESET test after ivreghdfe. However, I am not sure how to do it properly. Any comments will be really appreciated!

  • #2
    Hi Liza. I'm not a regular user of ivreghdfe, but there are a few things that need to be considered. First, it isn't clear to me this test is valuable in this context. It's a pure functional form test in the exogenous variables only (since you have to replace endogenous variables with fitted values). Second, implementation depends on how ivreghdfe computes fitted values. I assume that the fixed effects are not included in the fitted values. But if they are, they need to be subtracted off.

    I'll use panel notation. If the model is

    y(i,t) = c(i) + f(t) + a*w(i,t) + x(i,t)*b + u(i,t)

    where w(i,t) is thought to be endogenous and x(i,t) exogenous, then ivreghdfe removes the fixed effects c(i) and f(t). I assume you have at least one valid IV for w(i,t). RESET would be based on q(i,t)^ = a^*w(i,t)^ + x(i,t)*b^ where the w(i,t)^ are the first stage fitted values without the fixed effects. Then, you would include powers of q(i,t)^ in the equation and they act as their own IVs. Reestimate the equation using ivreghdfe where you still instrument for w(i,t) as before. The test is joint on the powers of q(i,t)^ (probably square and cube).

    If you're worried about functional form, I'd directly allow nonlinear functions of w(i,t) and x(i,t) -- especially interactions between these -- and estimate using ivreghdfe.

    JW

    Comment


    • #3
      You'll probably have to code it after ivreghdfe.

      read this:

      HTML Code:
      http://fmwww.bc.edu/RePEc/bocode/i/ivreset.html
      might want to study the ado file.

      As Jeff said, you'll have to figure out what ivreghdfe will predict.

      If you have only one FE, then you use ivreg2 and ivrest.

      Since ivreghdfe is a wrapper for ivreg2, ivrest might work. I'd try it as a start.
      Last edited by George Ford; 03 Nov 2023, 08:38.

      Comment


      • #4
        With Jeff's comments and warnings in mind:

        Code:
        sysuse auto, clear
        ivreghdfe price weight (length = gear) , absorb(foreign, savefe) res
        predict yhat1, xb
        replace yhat1 = yhat1+__hdfe1__
        g yhat2 = yhat1^2
        g yhat3 = yhat1^3
        
        ivreghdfe price weight  yhat2 yhat3 (length = gear), absorb(foreign, savefe) res
        testparm yhat2 yhat3

        Comment

        Working...
        X