Identifying subpopulations that may be sensitive to the specific treatment is an important step toward precision medicine. On the other hand, longitudinal data with dropouts is common in medical research, and subgroup analysis for this data type is still limited. In this paper, we consider a single‐index threshold linear marginal model, which can be used simultaneously to identify subgroups with differential treatment effects based on linear combination of the selected biomarkers, estimate the treatment effects in different subgroups based on regression coefficients, and test the significance of the difference in treatment effects based on treatment‐subgroup interaction. The regression parameters are estimated by solving a penalized smoothed generalized estimating equation and the selection bias caused by missingness is corrected by a multiply robust weighting matrix, which allows multiple missingness models to be taken account into estimation. The proposed estimator remains consistent when any model for missingness is correctly specified. Under regularity conditions, the asymptotic normality of the estimator is established. Simulation studies confirm the desirable finite‐sample performance of the proposed method. As an application, we analyze the data from a clinical trial on pancreatic cancer.