This paper develops an analytical framework to study consumption and labor supply in heterogeneous-agent economies with partial insurance. The environment allows for insurance beyond non-contingent bonds, for permanent and transitory idiosyncratic pro- ductivity shocks, and for permanent preference heterogeneity and idiosyncratic preference shocks. Exact closed-form solutions are obtained for equilibrium allocations and for the first and second moments of the equilibrium joint distribution over wages, hours and con- sumption. With these expressions in hand, we show that all the structural preference and risk parameters in the model can be identified, even when productivity risk varies over time, given panel data on wages and hours, and cross-sectional data on consumption. We estimate the model on CEX and PSID data for the U.S. economy over the period 1967-1996. We then use the estimated parameter values to decompose inequality in all variables of interest, both over the life-cycle and across time, into cross-sectional variation in preferences, uninsurable wage risk, insurable wage risk, and measurement error.