Hamilton's (2001) flexible nonlinear inference is not valid with endogenous explanatory variables. Hence, this paper proposes a framework to approach endogeneity problems in the flexible non- linear inference. We develop two estimation procedures, namely, joint estimation and two-step estimation...