Announcement

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

  • Problem with residual estimation

    Hi StataList,

    I have been trying to run diagnostic tests for an IV regression with an endogenous binary variable. In particular, my model is specified as
    Y=a+bX1+cD where D is the endogenous dummy, and
    D=k+fX2+gX3.

    I am using survey data with pweights in my svyset.

    Now, my problem is as follows:

    I intend to first run a regression of D on my exogenous variables X1 and the instruments X2 and X3. Then, I predict the residuals from the equation and regress Y on the residuals to test for endogeneity. I will then continue to test for instrument relevance and instrument exogeneity. Here is my code:

    svy, sub(sample): logit drink i.white i.male age c.age#c.age i.ftptwk ib13.edlev00 i.dvmrdf2 i.depchild i.govreggb i.immigrant i.cigsmk i.freqmtf c.faminc
    predict res2, residuals

    However, -predict- followed by -residuals- gives me an error message; it seems I cannot obtain a residual estimation using both logit and svy.

    Please help, I really need to solve this endogeneity issue!

Working...
X