Announcement

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

  • ivreghdfe and conformability error

    Hi,

    when I want to estimate an equation with ivreghdfe and time FE plus when I try to calculate country-specific ("group" is a country identifier which is my cross-section) coefficients for the shock I get the error: conformability error r(503), i.e., if I run

    ivreghdfe delta_GDP1 (c.`shock'#i.group=c.`instr'#i.group) L(`q'/`p').c.int_GDP1, absorb(mdate) vce(cluster mdate)


    However, I don't get the error when I run

    ivreghdfe delta_GDP1 (c.`shock'p=c.`instr') L(`q'/`p').c.int_GDP1, absorb(mdate) vce(cluster mdate)

    or when I take out the time FE

    ivreghdfe delta_GDP1 (c.`shock'#i.group=c.`instr'#i.group) L(`q'/`p').c.int_GDP1, absorb(mdate) vce(cluster mdate)


    But I want the country-specific coefficients.


    When I just use the shock directly, i.e. no instrumental variable regression, and use reghdfe it runs also with the group interaction, i.e.,

    reghdfe delta_GDP1 c.`shock'#i.group L(`q'/`p').c.int_GDP1, absorb(mdate) vce(cluster mdate)

    Which makes me think that there is something weird going on with ivreghdfe.

    Would be very happy about any ideas what could be going wrong here, or what I could be doing wrong.

    Thanks!



  • #2
    Hi,

    I would like to add that I ran some more test and I also get the "conformability error" when I try to "trick" ivreghdfe by using time dummies directly instead of in the absorb option, i.e.

    qui tabulate mdate, gen(dmonth)
    ivreghdfe delta_GDP1 (c.`shock'#group=c.`instr'#group) L(`q'/`p').c.int_GDP1 dmonth*, absorb(group) vce(cluster mdate)

    and also when I use ivreg2, i.e.

    qui tabulate mdate, gen(dmonth)
    qui tabulate countrykey, gen(dcountry)
    ivreg2 delta_GDP1 (c.`shock'#group=c.`instr'#group) L(`q'/`p').c.int_GDP1 dcountry* dmonth*, cluster(mdate)

    So, does anyone has an idea why I get a conformabiltiy error when I try to find the country-specific effects of my instrumented shock when using time FE? But not when I use the instrument directly as a shock (reghdfe delta_GDP1 c.`instr'#i.group L(`q'/`p').c.int_GDP1, absorb(group mdate) vce(cluster mdate))?

    Thanks for any ideas!

    Comment

    Working...
    X