The article proposes a technique, based on the predictive density of the data, conditional on the parameters of the model, to jointly tests for groups of unknown size in a panel and to estimate the parameters of each group. The procedure is applied to the problem of identifying convergence clubs...