Announcement

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

  • Interaction Term in 2SLS Instrumental Variable Regression

    Hi,

    I couldn't find an answer on the internet:

    my regression looks like this:

    ivregress 2sls smoker physical physical*retired + controls (retired = full early)

    I did:
    gen Interaction = retired*physical beforehand

    I guess the outcome isn't quite correct because the Interaction won't get fitted correctly

    How do I solve the problem ? Manually do the 2sls (reg retired full early and predict retired_hat) or is there another option ? Can't I enter a code where physical*retired is recognized by Stata ?

    Thank you so much !

  • #2
    See

    Code:
    help fvvarlist
    on how to define an interaction using factor variable notation. An interaction involving an endogenous variable should also be considered endogenous. You can include the interaction within the parentheses and interact the instruments with the exogenous variable.

    Code:
    ivregress 2sls smoker physical controls (retired retired#physcical = full early full#physical early#physical)

    Comment


    • #3
      Thank you for your help. I'm not sure if this is what I need.

      I want my regression to have the three main variables: retired physical retired*physical ==> Do I need those factor variables ? I just want to interpret those 3 coefficients for my thesis.


      ivregress 2sls smoker2 physical age_int agesquared LogIncome higheduc mideduc verheiratet Österreich Schweden Niederlande Spanie
      > n Italien Frankreich Dänemark Griechenland Schweiz Belgium Cz Polen Lux Ungarn Slovenein Estland Lithauen Finnland Lettland Slov
      > akei (retired3 retired3#physical = full early full#physical early#physical)

      note: 1.retired3#0.physical omitted because of collinearity.
      note: 1.retired3#1.physical omitted because of collinearity.
      note: 1.full#1.physical omitted because of collinearity.
      note: 1.early#0.physical omitted because of collinearity.
      note: 1.early#1.physical omitted because of collinearity.
      note: 1.full#0b.physical omitted because of collinearity.

      Instrumental variables 2SLS regression Number of obs = 18,126
      Wald chi2(29) = 377.12
      Prob > chi2 = 0.0000
      R-squared = 0.0186
      Root MSE = .22788

      -----------------------------------------------------------------------------------
      smoker2 | Coefficient Std. err. z P>|z| [95% conf. interval]
      ------------------+----------------------------------------------------------------
      retired3 | -.0172382 .0210028 -0.82 0.412 -.0584029 .0239264
      |
      retired3#physical |
      0 1 | .0118634 .0137296 0.86 0.388 -.0150461 .0387728
      1 0 | 0 (omitted)
      1 1 | 0 (omitted)
      |
      physical | -.0031632 .0085594 -0.37 0.712 -.0199394 .013613

      Comment


      • #4
        You already have 3 coefficients displayed. As both variables are 0/1 indicators, you can specify the bases so that the full set of interactions are not displayed. This changes nothing.

        Code:
        ivregress 2sls smoker ib0.physical controls (ib0.retired ib0.retired#ib0.physcical = full early full#ib0.physical early#ib0.physical)
        Again, all written up in

        Code:
        help fvvarlist

        Comment

        Working...
        X