Announcement

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

  • Nest stata commands (or: iv in xtpdyn)

    Hello everyone,

    I have a multivariate dynamic probit panel data model using random effects.

    I am using command xtpdyn to account for the bias of including the lag of the dependent variable.

    Code:
     
    xtpdyn y x1 x2 x3 x4, uh(x1 x2) re(vce(cluster id)
    margins, dydx(*) force
    However, in my model I have an independent variable that I suspect might be endogenous, variable x3. I want to run a Durbin-Wu-Hausman test with instruments z1 and z2 like what appears when I run ivprobit:

    Code:
     
    ivprobit y x1 x2 x4 (x3 = z1 z2)
    But using ivprobit I lose the bias correction that I get from using xtpdyn.

    My question is: Is there a way to do both? Or some way to do two commands in one or to "nest" functions, so to speak, so that I can run a 2SLS regression using xtpdyn? Or is there a way to implement a 2SLS regression from the xtpdyn command?

    Apologies is the question is basic, I have searched everywhere and I found nothing that could help me. If any of you knows anything, I would be very grateful.

    I am using Stata 14.1 on Mac.

    Best,
    Danielle
Working...
X