Nonadditive Models with Endogenous Regressors