The dissertation studies identification and inference problems in econometric models. In the first chapter, I present a new identification result for partial effects of group-level variables when economic agents select into groups. The econometric model allows for selection on individual unobserved heterogeneity, which generally causes endogeneity of group-level variables. I use individual-level variables that have sufficient correlation with the unobserved heterogeneity to develop a control function method. The second chapter studies statistical inference in a class of M-estimation problems in which the standard nonparametric bootstrap fails due to non-smoothness in the objective function. I propose a way to "reshape" the objective functio...