  In this paper we examine the existence of heterogeneity within a group, in
panels with latent grouping structure. The assumption of within group
homogeneity is prevalent in this literature, implying that the formation of
groups alleviates cross-sectional heterogeneity, regardless of the prior
knowledge of groups. While the latter hypothesis makes inference powerful, it
can be often restrictive. We allow for models with richer heterogeneity that
can be found both in the cross-section and within a group, without imposing the
simple assumption that all groups must be heterogeneous. We further contribute
to the method proposed by \cite{su2016identifying}, by showing that the model
parameters can be consistently estimated and the groups, while unknown, can be
identifiable in the presence of different types of heterogeneity. Within the
same framework we consider the validity of assuming both cross-sectional and
within group homogeneity, using testing procedures. Simulations demonstrate
good finite-sample performance of the approach in both classification and
estimation, while empirical applications across several datasets provide
evidence of multiple clusters, as well as reject the hypothesis of within group
homogeneity.
