Announcement

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

  • Generalized residuals for control function approach


    Hi all, I am trying to correct for a model with a potential endogenous binary explanatory variable by using the control function approach. Since my endogenous variable is binary, my first stage is a probit, and the second stage is poisson or negative binominal (with the estimated errors from the first-stage as one of the explanatory variables). To implement control function approach, I need to calculate generalized residuals for the second stage. Currnetly, I made the below stata code:

    In Stata:
    probit y x
    predict xb, xb

    grhat = cond(y == 1, normalden(xb)/normal(xb), -normalden(xb)/(1-normal(xb)))

    Am I using correct codes? Thank you so much for your help in advance
    Best
    Last edited by Seungho choi; 13 Dec 2015, 02:10.

  • #2
    Dear Seungho,

    i am curious to know if you received any reply to your question or if you managed to find the answer somewhere else. Reason is, I am having the exact same question, I am lacking adequate answers however! Would be great if we could exchange some ideas how to use the CF approach and the generalized residuals. You can also reach me at [email protected]

    Regards from Germany,
    Alex

    Comment


    • #3
      Any responses to this question?

      Comment


      • #4
        Dear Seungho,

        I hope this message finds you well. I am writing to inquire if you have received any responses to your question regarding the CF approach and generalized residuals. I find myself grappling with the same query and have yet to find satisfactory answers. I would greatly appreciate the opportunity to exchange insights on this matter.

        Best regards from Chile,
        Vicente Zambrano

        Comment


        • #5
          Your easiest approach is just do
          predict res, score
          This works for most commands

          Comment

          Working...
          X