Unobserved heterogeneity is important in econometrics. People who look alike in terms of education, income, or other variables, make different choices about consumption, and savings. etc. Economic theory provides no guidance as to how unobserved heterogeneity should be modelled nor how important it might be. We develop and apply methods that allow researchers to estimate flexible models that use economic theory to define a structural model but allow for a very flexible degree of unobserved heterogeneity.