Estimating treatment effects in the presence of noncompliance and nonresponse: The generalized endogenous treatment model