Parametric and Nonparametric Regression in the Presence of Endogenous Control Variables