Announcement

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

  • Instrumental variables with xtlogit

    Hi
    I am running an estimation with panel data for a binary dependent variable. However, my main regressor is endogenous, and therefore I plan to use an instrumental variable.
    Is there a Stata command or routine that can help me run an instrumental variable regression with my data?

    Thanks for your help!

  • #2
    I know there's an xtivprobit

    Comment


    • #3
      Is the endogenous explanatory variable roughly continuous or discrete?

      Comment


      • #4
        Originally posted by Jeff Wooldridge View Post
        Is the endogenous explanatory variable roughly continuous or discrete?
        Thanks for your reply, Prof. Wooldridge. The endogenous explanatory variable is roughly continuous. It is a continuous index ranging between 0 and 1.

        Comment


        • #5
          Originally posted by George Ford View Post
          I know there's an xtivprobit
          Unfortunately I could not find xtivprobit as a built-in or user-written command. Could you kindly point me to the source of this command?
          Thanks.

          Comment


          • #6
            Does it take values at the endpoints of 0 and 1? If not, then I have a simple control-function suggestion. More soon.

            Comment


            • #7
              Originally posted by Jeff Wooldridge View Post
              Does it take values at the endpoints of 0 and 1? If not, then I have a simple control-function suggestion. More soon.
              It does take on values at the endpoints. But those are relatively few.

              Comment


              • #8
                sorry. you're right.

                xteprobit fits RE model.

                also check this out:
                HTML Code:
                  https://www.stata.com/meeting/germany14/abstracts/materials/de14_drukker_gsem.pdf

                Comment


                • #9
                  Thank you, George! I really appreciate it.

                  Comment


                  • #10
                    Maybe Jeff will get back. The CF may be your best option.

                    Comment


                    • #11
                      If it's relatively few, I might bring those values just within the unit interval. Then, in the first stage, use the log-odds for the EEV -- call it w. Put the residuals in the probit in the second stage with w (not the log-odds, unless that's the variable you care about).

                      You can try just using a linear model for w itself in the first stage. That might be close enough if there aren't too many values near zero/one.

                      Code:
                      gen w_lodds = log(w/(1 - w))
                      reg w_lodds x1 ... xk z i.year
                      predict vhat, resid
                      probit y w vhat x1 ... xk i.year, vce(cluster id)
                      margins, dydx(w)
                      The cluster-robust t state on vhat tests the null of exogeneity. But you should bootstrap the two steps to get a valid standard error.

                      or

                      Code:
                      reg w x1 ... xk z i.year
                      predict vhat, resid
                      probit y w vhat x1 ... xk i.year, vce(cluster id)
                      margins, dydx(w)
                      If desired, you can square w or interact with x1, ..., xk for flexibility.

                      In my view xtprobit and gsem impose too many assumptions and are computationally difficult. Pooled probit with the CF imposes little.





                      Comment


                      • #12
                        Originally posted by Jeff Wooldridge View Post

                        The cluster-robust t state on vhat tests the null of exogeneity. But you should bootstrap the two steps to get a valid standard error.
                        Thank you, Prof. Wooldridge! I appreciate you taking the time to provide this solution. So by two steps here, I presume you mean

                        Code:
                         
                         reg w_lodds x1 ... xk z i.year
                        and

                        Code:
                         
                         probit y w vhat x1 ... xk i.year, vce(cluster id)
                        Correct?

                        Comment

                        Working...
                        X