Announcement

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

  • IV Estimation for Interaction term


    Hi,

    My dependent variable is life satisfaction (lifesat). My main independent variable is immigrant's mobility (where immpar=1 if immigrant and 0 for non-immigrant, mobility=1 if downward mobility, 0 if unchanged, 2 if upward mobility). I would like to check for endogeneity in my main independent variable (i.mobility##i.immpar ) using the IV estimation method. I suspect endogeneity in the mobility variable but not the immpar variable. The following is my regression model.

    reg lifesat i.mobility##i.immpar i.mumethnic i.dadethnic i.dmsex i.hhincome1980 ib3.marital lnhhincome i.sc2000 household householdsq i.sc1980


    Before running ivregress 2sls with my instruments. I would need to check for instrument relevance. This was done by runing the equation above excluding my dependent variable (lifesat) and including my instruments (childdepress, aspiration, paraspiration). The instrument relevance equation is as below. My main problem is, in this equation, my dependent variable is an interaction term, so my model is not valid. Hence is there any other way to check for instrument relevance in this case?

    reg i.mobility##i.immpar i.childdepress##i.immpar i.paraspiration##i.immpar i.change##i.immpar i.mumethnic i.dadethnic i.dmsex i.hhincome1980 ib3.marital lnhhincome i.sc2000 household householdsq i.sc1980
    test 1.childdepress# 1.immpar 1.childdepress#0.immpar 1.paraspiration#1.immpar 1.paraspiration#0.immpar 1.change#1.immpar 1.change#0.immpar
    Last edited by Hui Shen Khor; 19 Feb 2018, 06:11.

  • #2
    You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delmiters, readable Stata output, and sample data using dataex. Also, try to keep your question as short as possible - just what is needed to demonstrate the problem.

    If you use ivreg2, it will provide some test statistics on the first stage. Normally, when you have interactions with an endogenous variable, you calculate them before the ivreg and then enter them as endogenous.

    Comment


    • #3
      Hi Phil,

      Okay, thanks!

      Comment


      • #4
        Hi Phil,

        I tried using ivreg2 and regressed the following but I am not sure whether this is the right approach and I am not sure how do I identify whether the instrument is relevant and exogenous. (Sorry, my output is a bit messy, is there any way to make it neater?)

        Code:
        ivreg2 lifesat i.mumethnic i.dadethnic i.dmsex i.hhincome1980 ib3.marital lnhhincome i.sc2000 household householdsq i.sc1980 (mobility mobility#immpar = childdepress childdepress#immpar aspiration#immpar), robust
        This is my output:

        . ivreg2 lifesat i.mumethnic i.dadethnic i.dmsex i.hhincome1980 ib3.marital lnhhincome i.sc2000 household householdsq i.sc1980 (mobility mobility#immpar = childdepress childdepress#immpar aspiration#immpar), robust
        Warning - endogenous variable(s) collinear with instruments
        Vars now exogenous: 2.mobility#0b.immpar
        Warning - collinearities detected
        Vars dropped: 2.mobility#1.immpar 1.childdepress#1.immpar
        1.aspiration#1.immpar 1.mobility#1.immpar

        IV (2SLS) estimation
        --------------------

        Estimates efficient for homoskedasticity only
        Statistics robust to heteroskedasticity

        Number of obs = 2424
        F( 29, 2394) = 1.28
        Prob > F = 0.1477
        Total (centered) SS = 6929.985149 Centered R2 = -4.7435
        Total (uncentered) SS = 143190 Uncentered R2 = 0.7220
        Residual SS = 39802.47715 Root MSE = 4.052

        --------------------------------------------------------------------------------------------------
        | Robust lifesat | Coef. Std. Err. z P>|z| [95% Conf. Interval]
        ---------------------------------+----------------------------------------------------------------
        mobility | 1.421322 10.10332 0.14 0.888 -18.38081 21.22346
        mobility#immpar |
        Unchanged#Immigrant | 15.81265 64.38565 0.25 0.806 -110.3809 142.0062
        Downward Mobility#Non-immigrant | -10.41122 15.08057 -0.69 0.490 -39.96859 19.14616
        Downward Mobility#Immigrant | -14.24118 12.28152 -1.16 0.246 -38.31251 9.83015
        Upward Mobility#Immigrant | 0 (omitted)
        Upward Mobility#Non-immigrant | -2.365911 20.55986 -0.12 0.908 -42.6625 37.93068

        mumethnic | 2.921614 6.287931 0.46 0.642 -9.402505 15.24573

        dadethnic | 1.185108 2.231133 0.53 0.595 -3.187833 5.558049

        dmsex | .3294461 .387265 0.85 0.395 -.4295794 1.088472

        hhincome1980 |
        >50 | 1.332205 1.187501 1.12 0.262 -.9952549 3.659665
        >100 | 4.136968 3.368989 1.23 0.219 -2.466129 10.74006
        >150 | 7.607325 6.174632 1.23 0.218 -4.49473 19.70938
        >200 | 10.05226 8.219906 1.22 0.221 -6.058463 26.16298

        marital |
        Married | -.8410905 1.120309 -0.75 0.453 -3.036856 1.354675
        Cohabiting | -1.14691 1.098057 -1.04 0.296 -3.299063 1.005243
        Separated | -1.755877 3.061416 -0.57 0.566 -7.756142 4.244387
        Divorced | -1.453244 2.069197 -0.70 0.482 -5.508796 2.602307

        lnhhincome | -2.800261 2.714208 -1.03 0.302 -8.12001 2.519488

        sc2000 |
        2 | .0239444 .5260409 0.05 0.964 -1.007077 1.054966
        3 | -.1319226 .4301305 -0.31 0.759 -.974963 .7111178
        4 | .1389574 .5736966 0.24 0.809 -.9854673 1.263382
        5 | .0475651 .6224078 0.08 0.939 -1.172332 1.267462
        6 | -.8194098 .9415465 -0.87 0.384 -2.664807 1.025987
        household | .0130625 .1636738 0.08 0.936 -.3077323 .3338572

        householdsq | -.0010682 .0349123 -0.03 0.976 -.069495 .0673586

        sc1980 |
        2 | .0157699 .3621864 0.04 0.965 -.6941025 .7256422
        3 | .2486629 1.002472 0.25 0.804 -1.716146 2.213471
        4 | .1549085 .496502 0.31 0.755 -.8182176 1.128035
        5 | .6548593 .7546391 0.87 0.386 -.8242061 2.133925
        6 | .448501 1.478245 0.30 0.762 -2.448806 3.345808
        |
        _cons | 18.48735 17.62135 1.05 0.294 -16.04986 53.02455
        --------------------------------------------------------------------------------------------------
        Underidentification test (Kleibergen-Paap rk LM statistic): 0.295
        Chi-sq(2) P-val = 0.8628
        ------------------------------------------------------------------------------
        Weak identification test (Cragg-Donald Wald F statistic): 0.174
        (Kleibergen-Paap rk Wald F statistic): 0.058
        Stock-Yogo weak ID test critical values: <not available>
        ------------------------------------------------------------------------------
        Hansen J statistic (overidentification test of all instruments): 0.533
        Chi-sq(1) P-val = 0.4654
        ------------------------------------------------------------------------------
        Instrumented: mobility 0b.mobility#1.immpar 1.mobility#0b.immpar
        1.mobility#1.immpar
        Included instruments: 2.mobility#0b.immpar 1.mumethnic 1.dadethnic 2.dmsex
        2.hhincome1980 3.hhincome1980 4.hhincome1980
        5.hhincome1980 1.marital 2.marital 4.marital 5.marital
        lnhhincome 2.sc2000 3.sc2000 4.sc2000 5.sc2000 6.sc2000
        household householdsq 2.sc1980 3.sc1980 4.sc1980 5.sc1980
        6.sc1980
        Excluded instruments: childdepress 0b.childdepress#1.immpar
        1.childdepress#0b.immpar 0b.aspiration#1.immpar
        1.aspiration#0b.immpar
        Dropped collinear: 2.mobility#1.immpar 1.childdepress#1.immpar
        1.aspiration#1.immpar 1.mobility#1.immpar
        Reclassified as exog: 2.mobility#0b.immpar
        ------------------------------------------------------------------------------


        Code:
        * Example generated by -dataex-. To install: ssc install dataex
        clear
        input float(mobility immpar) byte(aspiration change paraspiration finnow)
        0 0 . . . 3
        2 0 1 1 1 2
        1 0 . . . 2
        2 0 . . . 2
        . 1 . 1 . 2
        2 0 1 2 . 3
        1 0 1 . 1 2
        2 0 . . . 2
        0 0 . . . 2
        0 0 . . . 2
        2 0 . 2 . 1
        0 0 1 1 1 4
        2 0 . 0 . 2
        2 0 1 2 1 1
        0 0 1 1 1 3
        1 1 . . . 2
        . 0 0 2 1 2
        . 0 . . . 5
        0 0 . . . 2
        . 0 1 2 1 1
        2 0 1 2 1 3
        0 0 . . . 3
        0 0 1 1 1 1
        1 0 1 0 1 1
        0 0 . . . 3
        2 0 1 2 1 1
        2 1 1 1 1 1
        0 0 . 1 . 1
        . 0 1 1 1 1
        1 0 1 . 1 1
        . 1 . . . 2
        1 0 1 . 1 1
        2 0 0 0 1 2
        2 0 . 0 . 2
        2 0 1 1 1 5
        0 0 1 1 1 2
        . 0 . . . 4
        . 0 1 0 0 1
        0 1 . . . 1
        . 0 . . . 1
        2 0 1 0 1 1
        1 0 . 2 . 1
        1 0 . . . 2
        1 1 1 2 1 1
        1 0 . 0 . 2
        . 0 1 1 1 2
        . 0 . . . 2
        1 0 0 0 1 2
        1 0 1 0 1 1
        0 0 . . . 3
        0 0 1 . 1 2
        1 0 1 1 1 3
        1 0 . . . 4
        . 0 . . . 3
        0 0 . 1 . 1
        1 0 1 2 1 2
        1 0 . . . 1
        1 0 1 0 1 3
        2 0 . . . 1
        2 0 . . . 2
        2 0 . . . 3
        2 0 1 2 1 2
        2 0 1 0 1 1
        0 0 1 1 1 1
        1 0 . . . 1
        . 0 1 1 1 4
        1 0 . 2 . 3
        1 0 . . . 2
        2 0 . . . 2
        . 0 . . . 2
        . 0 . . . 3
        0 0 . . . 3
        2 0 1 1 1 1
        . 0 1 0 1 4
        0 0 1 . 1 1
        0 0 . . . 1
        . 0 . 0 . 2
        1 0 . . . 1
        0 0 . . . 2
        . 0 . . . 1
        0 0 . . . 1
        2 0 1 0 1 1
        1 0 1 0 1 3
        2 0 . . . 3
        0 0 . . . 2
        2 0 1 1 1 2
        0 0 1 0 . 2
        . 0 . . . 2
        1 0 . . . 2
        2 0 1 2 1 1
        0 0 1 1 1 2
        1 0 1 1 1 2
        1 0 1 . 1 3
        2 0 . . . 1
        0 0 1 2 . 1
        0 0 1 0 1 1
        . 0 . . . 1
        2 0 . . . 2
        . 0 . . . 1
        . 0 1 0 1 1
        end
        label values mobility mobility
        label def mobility 0 "Unchanged", modify
        label def mobility 1 "Downward Mobility", modify
        label def mobility 2 "Upward Mobility", modify
        label values immpar immpar
        label def immpar 0 "Non-immigrant", modify
        label def immpar 1 "Immigrant", modify
        label values aspiration aspiration
        label def aspiration 0 "does not matter", modify
        label def aspiration 1 "matters to have high earnings/wages", modify
        label values change change
        label def change 0 "No", modify
        label def change 1 "Yes", modify
        label def change 2 "Don't know", modify
        label values paraspiration paraspiration
        label def paraspiration 0 "No", modify
        label def paraspiration 1 "Yes", modify
        label values finnow finnow
        label def finnow 1 "Living comfortably", modify
        label def finnow 2 "Doing alright", modify
        label def finnow 3 "Just about getting by", modify
        label def finnow 4 "Finding it quite difficult", modify
        label def finnow 5 "Or finding it very difficult", modify
        Last edited by Hui Shen Khor; 22 Feb 2018, 14:23.

        Comment

        Working...
        X