Dear all,

Can someone let me know how to implement a procedure similar to XTIVREG but with a binary endogenous variable? Here is the model I want to estimate:

xtivreg DV controls (x1 = z1 z2), fe

where controls are exogenous variables, z1 & z2 are instruments;
x1 is a binary endogenous variable (0 or 1) and the first stage is a logit model so this doesn't fit the xtivreg specification.

Is there an existing procedures to implement this? Or do I have to do the two stages manually?

If I do the two stages manually, how do I adjust the standard errors in the second stage for significance tests?

Thank you very much!