Estimating marginal treatment effects under unobserved group heterogeneity