Linear mixed models have been widely used for repeated measurements, longitudinal studies, or multilevel data. The selection of random effects in linear mixed models has received much attention recently in the literature. Random effects consider dependent structure between repeatedly measured data. Due to computational challenges, the selection of grouped random effects has yet to be studied. Grouped random effects, including genetics data or categorical variables, are commonly seen in practice. We present an efficient method for selecting random effects at group levels in linear mixed models. Specifically, the proposed method employs a restricted maximum likelihood function to estimate the covariance matrix of random effects. To achieve sp...