This paper estimates the relationship between agglomeration and multi factor productivity at the one digit industry level and by region using longitudinal firm level data for New Zealand. A key focus of the paper is on methods to represent firm level heterogeneity and non-random sorting of firms. The panel structure of the data allows us to control for it at the level of local industries or enterprises. We obtain a cross-sectional agglomeration elasticity of 0.171, which falls by 70% when we use local industry controls, and by 90% when we impose enterprise fixed effects. Using industry specific production functions, we find that the “within local industry” estimates are similar, though slightly larger than the cross sectional estimates (~0.070), suggesting negative sorting between areas, combined with positive sorting within areas. The within-enterprise estimates yield a small elasticity of 0.010. Our results indicate that the imposition of a common production technology across all industries is not a valid assumption. While cross-sectional estimates may overstate the true impact of agglomeration on productivity in the presence of positive bias from sorting, the within enterprise approach (which is increasingly common in the literature) can suffer from identification problems due to the highly persistent nature of agglomeration variables and may understate the true causal effect of agglomeration on productivity. We thus rely on the “within local industry” estimates as providing the most reliable indication of agglomeration elasticities.