I want to use the two-part model to estimate food expenditure (Y), in the Xs, one variable is endogenous and it is binary. I will use the IV to instrument this variable.

My question is: can “twopm” can be estimated when there is a binary endogenous variable? if “twopm” cannot be used in this situation, which commands can be used to do this estimation?