I have the following:

* Define dependent variable y1, endogenous variable y2
* Define exogenous variable x1list and instrumental variable (IV) x2list

Both y1 and y2 are dichotomous.

Can I do this to get consistent estimates, if I have an unbalanced panel data?

xtset firmid year

xtprobit y1 $x1list, endogenous(y2 = $x2list $x1list, probit) vce(cluster firmid)