In this paper, we derive a semiparametric estimation procedure for the sample selection model when some covariates are endogenous. Our approach is to augment the main equation of interest with a control function which accounts for sample selectivity as well as endogeneity of covariates. In...