Announcement

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

  • Control Function Approach in the presence of interaction terms

    My panel data is strongly balanced. The panel variable is 25 districts. The time variable is monthly dates from 2017 to 2023, while the delta is 1 month.

    Y1 = DV (Count with Poisson distribution)
    Y2 = Endogenous Variable 1 (Count with Poisson distribution)
    Y3 = Endogenous Variable 2 (Count with Poisson distribution)
    X1 = Exogenous Variable 1 (Dummy variable)
    X2 = Exogenous Variable 2 (Continuous variable)
    Y2*X1 and Y3*X1 = Two interaction terms. Specifically, X1 interacts with both Y2 and Y3.

    I have two possible instrumental variables for both endogenous variables. Both instrumental variables are relevant.
    IV1 = Instrumental Variable 1 (Dummy variable)
    IV2 = Instrumental Variable 2 (Factor variable with 4 levels)

    Wooldridge (2010) recommended using a control function approach to endogeneity given the nonlinear nature of Y1. However, it became very complicated due to the presence of both interaction terms (Y2*X1 and Y3*X1) in the model. I would greatly appreciate if you provide any advice on how to code my model.

    Please let me know if you need additional information.

    Reference
    Wooldridge, J. W. (2010). Econometric analysis of cross section and panel data. Cambridge, Massachusetts: The MIT Press.
    Last edited by DY Kim; 31 Aug 2024, 22:14.

  • #2
    To follow up on my first post.

    If interaction terms are not included in the model, I would use the following commands.
    Code:
    xtreg Y2 i.IV1 ib4.IV2 i.X1 c.X2, fe vce(robust)
    predict double RY2, e
    xtreg Y3 i.IV1 ib4.IV2 i.X1 c.X2, fe vce(robust)
    predict double RY3, e
    xtpoisson Y1 c.Y2 c.Y3 i.X1 c.X2 c.RY2 c.RY3, fe vce(bootstrap)
    1. In the presence of interaction terms, should I create an additional first stage equation for each interaction term, such as Y2*X1 and Y3*X1, and insert them and associated residuals in the second stage equation to control for the endogenous problems associated with the interaction terms?

    2. If so, how can I construct the first stage equation for each interaction term? Is the following correct?
    Code:
    xtreg Y2*X1 i.IV1#i.X1 ib4.IV2#i.X1 c.X2#i.X1, fe vce(robust)
    predict double RY2X1, e
    xtreg Y3*X1 i.IV1#i.X1 ib4.IV2#i.X1 c.X2#i.X1, fe vce(robust)
    predict double RY3X1, e
    3. What would a second stage equation look like in the control function approach? Is the following correct?
    Code:
    xtpoisson Y1 c.Y2 c.Y3 i.X1 c.X2 c.Y2#i.X1 c.Y3#i.X1 c.RY2 c.RY3 c.RY2X1 c.RY3X1, fe vce(bootstrap)
    Last edited by DY Kim; 01 Sep 2024, 15:54.

    Comment


    • #3
      DY: One of the benefits of the CF approach is that you can include any functions of the endogenous variables that you want. Evidently, I need to do a better job of explaining this in my book. My 2015 Journal of Human Resources paper maybe does a better job.

      You only construct a single CF for each endogenous variable. Then you can included the endogenous variables any way you want. The CF approach adheres to the idea that you have two endogenous variables, Y2 and Y3, so only two CFs are needed. Now, as I discuss in my 2015 paper, you might want to include the CFs flexibly, too -- such as squares and interactions among the CFs and even with the endogenous and exogenous explanatory variables.

      Comment

      Working...
      X