Background: Longitudinal data structure is frequently observed in health science. This introduces correlation to the data that needs to be handled in modelling process. Recently, machine learning approaches have been introduced in the context of longitudinal data for prediction of the response variable purpose. In this paper a mixed-effects least squares support vector regression model is presented for three-level longitudinal data. In the proposed model, multiple random-effect terms are used for considering the existing correlation structures in longitudinal data. The proposed model is flexible in modelling (non-)linear and complex relationships between predictors and response, while it takes into account the hierarchical structure of data and is computationally efficient. 
 Methods Both random intercept and random trend models with a special correlation structure of errors are illustrated. A real data example on human Brucellosis rate is analysed and two simulation studies are performed to illustrate the proposed model. The fitting and generalisation performance of the proposed model are investigated and compared with the ordinary least squares support vector regression and linear mixed-effects models. 
 Results: Based on the human Brucellosis rate example and two simulation studies, the proposed models had the best performance in generalisation. Also, the fitting performances of the proposed models were better than that of the classic models. 
 Conclusion: Our study revealed that in the presence of nonlinear relationship between covariates and outcome, the proposed MLS-SVR model has the best fitting and generalisation performance and can capture correlation of the data.