endoSwitch2Stage function

Endogenous switching regression