This paper studies estimation of a panel data model with latent structures where individuals can be classiﬁed into diﬀerent groups where slope parameters are homogeneous within the same group but heterogeneous across groups. To identify the unknown group structure of vector parameters, we design an algorithm called Panel-CARDS which is a systematic extension of the CARDS procedure proposed by Ke, Fan, and Wu (2015) in a cross section framework. The extension addresses the problem of comparing vector coeﬀicients in a panel model for homogeneity and introduces a new concept of controlled classiﬁcation of multidimensional quantities called the segmentation net. We show that the Panel-CARDS method identiﬁes group structure asymptotically and consistently estimates model parameters at the same time. External information on the minimum number of elements within each group is not required but can be used to improve the accuracy of classiﬁcation and estimation in ﬁnite samples. Simulations evaluate performance and corroborate the asymptotic theory in several practical design settings. Two empirical economic applications are considered: one explores the eﬀect of income on democracy by using cross-country data over the period 1961-2000; the other examines the eﬀect of minimum wage legislation on unemployment in 50 states of the United States over the period 1988-2014. Both applications reveal the presence of latent groupings in these panel data.