Announcement

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

  • How to test coefficient equality with high dimensional fixed effect and IV?

    I have a panel dataset. My statistical model includes an exogenous variable X_1, an endogenous variable X_2 (instrumented by Z) and two-way fixed effects. My goal is to estimate the model in two non-overlapping time periods and test whether coefficient for the instrumented term (X_2) is different.

    reghdfe y X_1 (X_2 = Z) if time==1, absorb(FE1 FE2) vce(cluster G)
    reghdfe y X_1 (X_2 = Z) if time==2, absorb(FE1 FE2) vce(cluster G)

    Methods using suest and gmm are discussed in other threads, but I don't see a direct application to my setting.
    Any help is appreciated!
    Last edited by Shawn Shi; 05 Mar 2019, 01:51.

  • #2
    You'll increase your chances of a useful answer by following the FAQ on asking questions.

    What you can do is:
    g x21=X_2 if time==1
    replace x21=0 if time==2
    g x22=X_2 if time==2
    replace x22=0 if time==1
    *Do the same for Z


    reghdfe y X_1( x21 x22= z1 z2) ,absorb(FE1 FE2) vce(cluster G)

    Now you'll be able to use test to test the parameters. This does assume the effects for FE1 and FE2 are the same for both periods. If not, do the same thing to generate separate panel ids for the two periods. There might be a small difference with the vce(cluster G) - whether it matters depends on what G is.

    The other way to do it would be suest - whether it works with user-written reghdfe or not I don't know. If it accepts refhdfe output, this is a standard suest application.

    If one of your fixed effects (say FE1) doesn't take on too many values (e.g., year), you can use xtreg with i.FE1 as a regressor. suest should work with xtreg.

    Comment

    Working...
    X