Recursive Models with Qualitative Endogenous Variables