Hi there, I am trying to run a control function model, where household income (loghou) is assumed to be endogenous and life satisfaction (reallifesat) is the dependent variable. I have two instrumental varables, lottery wins (lotterywindummy) and child benefit reciepts (childbenrec). My control variables are health status (goodhealth), hours of homework (hourshw), frequency of friend meet ups (friendmeet), emotional scale (mental) and a dummy for if they have drunk alcohol (alcoholdummy).
I run the control function manually like this
I just change the names of that to match the actual variables but i've written so it's easier to understand, but when I run this, the sign of my coefficient for the income variable in the second stage regression flips (positive for lottery wins and negative for child benefit recipient). I wanted to ask why this could be, is it an error or my part or something with the data. For what it's worth, when I run a over identified model with both IV's, the coefficient on the income variable is negative, but I also find the Hansen J stat to show evidence of rejecting the null of exclusion, so I can't isolate which IV is potentially causing issues.
As a side note my main dataset has interaction terms based on level of income as I've only recently learnt it's better to keep the sample 'intact' than splice it up endlessly, but i find the situation repeats itself.
Thanks
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float(realifesat loghouinc lotterywindummy childbenrec goodhealth) byte(hourshw hourssm) float friendmeet int age byte(m_sex alcoholdummy mental smartphone) 7 10.217443 0 1 5 1 0 3 11 1 2 0 0 6 10.217443 0 0 4 1 0 2 13 1 2 4 0 5 10.980103 0 1 5 2 4 3 15 1 1 2 1 7 11.15004 0 1 5 2 0 2 11 2 2 0 1 6 9.574984 0 0 3 -8 3 1 13 1 2 2 1 6 10.805978 0 0 5 6 4 3 15 2 1 2 1 4 11.152872 0 0 3 3 3 2 14 2 1 5 1 7 11.152872 0 1 4 9 0 2 11 1 2 0 1 6 11.16081 0 0 5 1 3 2 12 2 2 4 1 3 10.631496 0 0 3 1 3 3 11 2 1 9 1 6 12.496484 0 0 4 9 0 3 11 2 2 1 1 6 12.496484 0 0 4 -8 0 3 10 1 2 0 1 6 10.98229 0 0 2 2 0 1 11 2 2 0 1 6 10.98229 0 1 4 1 2 1 15 1 1 1 1 7 10.134775 0 0 3 2 3 1 13 2 1 2 1 7 10.134775 0 1 4 1 5 2 10 1 2 1 1 6 10.281376 0 0 4 1 0 3 10 2 2 1 0 6 10.281376 0 0 4 2 0 2 12 1 2 1 1 6 9.869933 0 1 4 1 4 2 12 1 1 1 1 7 11.053432 0 0 5 2 1 1 13 1 2 1 1 2 10.267472 0 0 3 3 4 2 13 2 1 10 1 5 10.179217 0 0 3 2 2 3 15 2 1 6 1 6 9.787174 0 1 4 1 4 3 11 2 2 6 1 5 10.95349 0 0 4 2 3 5 15 1 2 0 1 7 7.560081 0 1 4 7 3 2 12 1 2 1 1 5 11.625754 0 0 4 2 2 2 14 1 2 3 1 5 11.13386 0 0 1 2 2 1 13 1 2 4 1 4 11.13386 0 0 3 3 3 2 15 2 2 7 1 7 11.094575 0 1 5 0 2 3 14 2 1 1 1 7 11.01584 0 .8 4 2 3 3 13 2 2 3 1 4 10.83155 0 0 4 2 0 3 11 1 2 4 1 5 10.83155 0 0 3 1 0 3 11 1 2 6 1 5 11.10527 0 0 5 1 2 3 15 2 2 4 1 6 10.945518 0 1 5 1 2 3 10 1 2 0 0 7 10.945518 0 1 4 1 3 3 12 2 2 2 1 6 10.945518 0 1 4 1 3 3 13 1 2 1 1 4 9.410836 0 0 5 1 0 3 10 2 2 3 0 7 9.480828 0 1 5 9 3 4 11 1 2 3 1 7 9.480828 0 1 4 9 3 4 11 2 1 2 1 5 10.49168 0 1 5 2 3 4 13 2 1 4 1 4 11.561716 0 0 4 2 3 3 14 2 2 7 1 6 11.561716 0 0 4 2 3 3 12 2 2 6 1 4 10.365911 0 1 3 3 3 2 14 1 2 7 1 6 10.365911 0 1 4 2 3 2 13 1 2 2 1 7 9.472304 0 1 4 1 2 2 10 1 2 2 0 7 9.472304 0 1 3 0 3 2 12 1 2 5 1 1 10.996886 0 1 2 1 3 1 13 2 2 9 1 5 11.785567 0 0 3 9 5 2 10 1 2 2 0 7 . 0 0 5 1 2 2 11 2 2 1 0 3 10.601076 0 0 5 -8 5 1 14 1 2 0 1 6 10.254686 0 0 4 1 3 3 13 2 2 1 1 5 11.352874 0 0 4 2 3 4 15 1 1 4 1 4 11.03592 0 0 4 1 3 3 13 2 2 7 1 6 10.522905 0 1 3 2 2 3 13 1 2 0 1 6 10.360896 0 1 3 1 3 2 10 2 2 1 1 7 11.739168 0 0 5 2 4 4 15 2 1 4 0 6 11.739168 0 0 4 1 3 4 11 1 2 3 1 5 10.854137 0 1 3 1 4 3 15 1 2 3 1 6 10.854137 0 1 4 1 3 5 13 2 2 1 1 4 11.431707 0 0 5 9 2 2 10 1 2 6 1 4 11.431707 0 0 3 1 4 1 14 1 2 6 1 5 10.6211 0 0 5 -8 4 1 13 1 2 3 1 4 10.469175 0 0 4 9 3 2 14 2 2 7 1 5 10.242462 0 0 3 9 4 3 11 2 2 1 1 7 11.230898 0 1 5 0 0 2 12 1 2 0 1 7 11.230898 0 0 5 1 3 4 10 2 2 1 1 6 10.25635 0 0 3 2 0 3 11 1 2 6 1 7 11.338573 0 0 4 2 2 2 15 1 1 2 1 4 11.338573 0 0 4 1 3 3 12 1 2 6 1 7 9.664733 0 0 3 1 2 3 13 1 2 2 0 7 11.151235 0 1 4 6 3 1 14 1 1 1 1 2 11.71865 0 0 2 4 4 1 15 2 1 8 1 6 10.7391 0 1 3 9 3 3 12 2 2 7 1 5 10.82954 0 1 3 -8 0 4 10 2 2 5 1 5 10.847024 0 0 3 1 3 4 11 2 2 5 1 6 10.584224 0 1 5 1 4 3 15 2 1 5 1 6 10.631036 0 0 4 1 3 4 13 1 2 0 1 7 10.303884 0 0 5 1 3 3 12 1 2 6 1 2 10.72689 0 1 1 1 3 2 15 2 2 10 1 7 10.763843 0 1 4 2 3 2 13 1 2 0 1 7 10.97621 0 0 4 2 4 1 14 2 2 3 1 7 10.97621 0 0 4 2 3 2 12 2 2 1 1 5 9.681511 0 0 2 2 4 1 13 2 2 8 1 7 10.532806 0 0 3 1 3 5 12 1 2 1 1 4 10.585979 0 0 2 3 4 4 14 2 2 8 1 7 11.094887 0 0 5 2 0 5 12 2 2 2 1 4 9.701315 0 0 4 1 3 2 14 1 2 5 1 4 10.905347 0 1 3 2 2 4 13 2 1 6 0 4 9.776712 0 0 2 1 4 4 15 2 1 8 1 6 6.967344 0 1 4 9 3 2 12 2 2 5 1 7 11.40988 0 0 5 3 3 3 13 2 1 0 1 17 9.676373 0 1 3 1 2 2 14 2 1 6 1 6 11.53862 0 0 5 2 3 3 13 2 1 2 1 7 11.53862 0 0 5 1 1 2 13 2 1 1 1 6 10.061347 0 1 5 1 2 3 11 1 2 1 1 5 11.163366 0 0 5 2 3 4 15 2 1 2 1 5 11.163366 0 0 4 1 2 3 11 1 1 1 0 7 11.163366 0 0 4 5 3 1 14 1 1 4 1 7 10.772073 0 1 5 2 4 4 15 2 1 1 1 7 10.579203 0 0 4 1 0 1 10 2 2 4 1 end label values hourshw m_yphmwkhrs label def m_yphmwkhrs -8 "inapplicable", modify label values hourssm m_ypnetcht label def m_ypnetcht 1 "None", modify label def m_ypnetcht 2 "Less than an hour", modify label def m_ypnetcht 3 "1 - 3 hours", modify label def m_ypnetcht 4 "4 - 6 hours", modify label def m_ypnetcht 5 "7 or more hours", modify label values age m_dvage label values m_sex m_sex label def m_sex 1 "male", modify label def m_sex 2 "female", modify label values alcoholdummy m_ypevralc label def m_ypevralc 1 "Yes", modify label def m_ypevralc 2 "No", modify label values mental m_ypsdqes_dv label values smartphone m_ypdevice1 label def m_ypdevice1 0 "Not mentioned", modify label def m_ypdevice1 1 "Mentioned", modify
Code:
reg incomevar IV controls, robust predict vhat, resid reg lifesat incomevar controls vhat, robust
As a side note my main dataset has interaction terms based on level of income as I've only recently learnt it's better to keep the sample 'intact' than splice it up endlessly, but i find the situation repeats itself.
Thanks

Comment