This article proposes a new method for analysing panel data based on modelling heterogeneity of individuals or entities as a regime-switching process. There are several advantages to this approach.