One of the most enduring problems in cross-section or panel data models is heterogeneity among individual observations. Different approaches have been proposed to deal with this issue, but threshold regression models offer intuitively appealing econometric methods to account for heterogeneity. We propose three different estimators that can accommodate multiple thresholds. The first two, allowing respectively for fixed and random effects, assume that the firms' specific inefficiency scores are time-invariant while the third one allows for time-varying inefficiency scores. We rely on a likelihood ratio test with m − 1 regimes under the null against m regimes. Testing for threshold effects is problematic because of the presence of a nuisance parameter which is not identified under the null hypothesis. This is known as Davies problem. We apply procedures pioneered by Hansen (1999) to test for the presence of threshold effects and to obtain a confidence set for the threshold parameter. These procedures specifically account for Davies problem and are based on non-standard asymptotic theory. Finally, we perform an empirical application of the fixed effects model on a panel of Quebec dairy farms. The specifications involving a trend and the Cobb- Douglas and Translog functional forms support three thresholds or four regimes based on farm size. The efficiency scores vary between 0.95 and 1 in models with and without thresholds. Therefore, productivity differences across farm sizes are most likely due to technological heterogeneity.