Announcement

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

  • xtivreg2 with interaction between categorical var and continuous var.

    Dear Stata users,

    I am trying to analyze IV regression but xtivreg2 does not support interaction.


    Code

    edu is a categorical variable and wage is a continuous variable. Here, wage is endogenous, therefore I set IV as insurance payment amount.

    gen eduXwage = edu#c.wage

    xtset ind_year


    Firstly, I would like to run the following:

    xtivreg2. depvar (wage i.edu#c.wage = insurance i.edu#c.insurance) control1 control2 i.ind_year

    but xtivreg2 does not support interaction.

    If this is the case, I can have the same results using the following regression?

    ivreghdfe depvar i.edu (wage i.edu#c.wage = insurance i.edu#c.insurance) control1 control2 i.ind_year

    I also wonder what would be the change if I add "Fe, first" in the end. OR would you have better identification strategies?

    ivreghdfe depvar i.edu (wage i.edu#c.wage = insurance i.edu#c.insurance) control1 control2 i.ind_year, fe first



    Secondly, if I use ivreghdfe, then I don't get the result for the weak identification test.

    Weak identification test (Cragg-Donald Wald F statistic): 211.116
    Stock-Yogo weak ID test critical values: <not available>

    Would you have any advises on how to examine endogenous regressor in this case?

    Thank you very much!!!









  • #2
    Welcome to Statalist. You will increase your chances of a helpful answer by following the FAQ on asking questions – provide Stata code in code delimiters, readable Stata output, and sample data using dataex.

    There is no reason to ask us whether a different estimator would give you the same results. Just run it and see.

    I have not used ivreghdfe. Individuals often handle interactions on endogenous variables by calculating the interaction beforehand, and including it in the list of endogenous variables. This lets you use xtivreg2. There is also a Bun and Harrison (2019) Econometric Reviews article which might be relevant.

    Comment

    Working...
    X