Longitudinal clustering in kinesiology 1: the bare essentials of the kml and kml3d packages in R

Authors

DOI:

https://doi.org/10.63750/nswme776

Keywords:

repeated measures, longitudinal clustering, cluster analysis, multivariate repeated measures, R, longitudinal k-means

Abstract

Longitudinal designs are common in the field of kinesiology, where there can often be high variability due to varying response patterns between participants. In studies where outcome changes are seen, there may be hidden groups of non-responders. Alternatively, in studies where no overall changes are seen, there may be hidden groups of responders. Longitudinal clustering is a method that is used to find unique trajectories in longitudinal designs. Cluster trajectories are a result of data quality, and clustering is not meant to be hypothesis driven. However, It may complement hypothesis-driven methods to better understand overall and nuanced change patterns. The purpose of this article is to demonstrate how to analyze a synthetic dataset using the kml and kml3d packages in R. It is meant to be relatively non-technical, easy to use, and interpret for inexperienced coders.

Downloads

Download data is not yet available.

Author Biography

  • Keston Lindsay, University of Colorado Colorado Springs

    Helen and Arthur Johnson Beth-El College of Nursing and Health Sciences, University of Colorado Colorado Springs, Colorado Springs, USA

References

Calinski, T., & Harabasz, J. (1974). A dendrite method for cluster analysis. Communications in Statistics, 3(1), 1–27. https://doi.org/10.1080/03610927408827101

Choueiry, G. (2025). Statistical software popularity in 40,582 research papers. Quantifying Health. https://quantifyinghealth.com/statistical-software-popularity-in-research/

Den Teuling, N. G. P., Pauws, S. C., & van den Heuvel, E. R. (2021). Clustering of longitudinal data: A tutorial on a variety of approaches [Preprint]. arXiv. https://doi.org/10.48550/arXiv.2111.05469

Genolini, C., Alacoque, X., Sentenac, M., & Arnaud, C. (2015). kml and kml3d: R packages to cluster longitudinal data. Journal of Statistical Software, 65(4), 1–34. https://doi.org/10.18637/jss.v065.i04

Hartigan, J. A., & Wong, M. A. (1979). Algorithm AS 136: A K-means clustering algorithm. Journal of the Royal Statistical Society. Series C (Applied Statistics), 28(1), 100–108. https://doi.org/10.2307/2346830

Hubal, M. J., Gordish-Dressman, H., Thompson, P. D., Price, T. B., Hoffman, E. P., Angelopoulos, T. J., Gordon, P. M., Moyna, N. M., Pescatello, L. S., Visich, P. S., Zoeller, R. F., Seip, R. L., & Clarkson, P. M. (2005). Variability in muscle size and strength gain after unilateral resistance training. Medicine and Science in Sports and Exercise, 37(6), 964–972.

Jain, P., & Sengar, S. (2024). Unraveling the role of IBM SPSS: A comprehensive examination of usage patterns, perceived benefits, and challenges in research practice. Educational Administration: Theory and Practice, 30(5). https://doi.org/10.53555/kuey.v30i5.4609

Mota, J. A., Rajeb, M., Man, K., & Wohlgemuth, K. J. (2023). Linear mixed-effect modeling in kinesiology research: A tutorial in R. Biomedical Journal of Scientific & Technical Research, 49(3), 40613–40623. https://biomedres.us/fulltexts/BJSTR.MS.ID.007794.php

Mullin, S., Zola, J., Lee, R., Hu, J., MacKenzie, B., Brickman, A., Anaya, G., Sinha, S., Li, A., & Elkin, P. L. (2021). Longitudinal K-means approaches to clustering and analyzing EHR opioid use trajectories for clinical subtypes. Journal of Biomedical Informatics, 122, Article 103889. https://doi.org/10.1016/j.jbi.2021.103889

Ojeda-Aravena, A., Herrera-Valenzuela, T., Valdés-Badilla, P., Cancino-López, J., Zapata-Bastias, J., & García-García, J. M. (2021). Inter-individual variability of a high-intensity interval training with specific techniques vs. repeated sprints program in sport-related fitness of Taekwondo athletes. Frontiers in Physiology, 12, Article 766153. https://doi.org/10.3389/fphys.2021.766153

OpenAI. (2025). ChatGPT [Large language model]. https://chat.openai.com/chat

Posit. (2025). RStudio Desktop [Computer software]. https://posit.co/download/rstudio-desktop/

Proust-Lima, C., Philipps, V., & Liquet, B. (2017). Estimation of extended mixed models using latent classes and latent processes: The R package lcmm. Journal of Statistical Software, 78(2), 1–56. https://doi.org/10.18637/jss.v078.i02

Pryor, L. E., Tremblay, R. E., Boivin, M., Touchette, E., Dubois, L., Genolini, C., Liu, X., Falissard, B., & Côté, S. M. (2011). Developmental trajectories of body mass index in early childhood and their risk factors: An 8-year longitudinal study. Archives of Pediatrics & Adolescent Medicine, 165(10), 906–912. https://doi.org/10.1001/archpediatrics.2011.153

R Core Team. (2025). R: A language and environment for statistical computing [Computer software]. R Foundation for Statistical Computing. https://www.r-project.org/

Ross, R., Goodpaster, B. H., Koch, L. G., Sarzynski, M. A., Kohrt, W. M., Johannsen, N. M., Skinner, J. S., Castro, A., Irving, B. A., Noland, R. C., Sparks, L. M., Spielmann, G., Day, A. G., Pitsch, W., Hopkins, W. G., & Bouchard, C. (2019). Precision exercise medicine: Understanding exercise response variability. British Journal of Sports Medicine, 53(18), 1141–1153. https://doi.org/10.1136/bjsports-2018-100328

Schwarz, G. (1978). Estimating the dimension of a model. The Annals of Statistics, 6(2), 461–464. https://doi.org/10.1214/aos/1176344136

Touchette, E., Petit, D., Tremblay, R. E., Boivin, M., Falissard, B., Genolini, C., & Montplaisir, J. Y. (2008). Associations between sleep duration patterns and overweight/obesity at age 6. Sleep, 31(11), 1507–1514. https://doi.org/10.1093/sleep/31.11.1507

Zhou, J., Zhang, Y., & Tu, W. (2023). clusterMLD: An efficient hierarchical clustering method for multivariate longitudinal data. Journal of Computational and Graphical Statistics, 32(3), 1131–1144. https://doi.org/10.1080/10618600.2022.2149540

Downloads

Published

2025-12-31

Issue

Section

Research Articles

How to Cite

Lindsay, K. (2025). Longitudinal clustering in kinesiology 1: the bare essentials of the kml and kml3d packages in R. Global Journal of Sport and Exercise Science, 1(2), 126-145. https://doi.org/10.63750/nswme776

Share

Similar Articles

1-10 of 22

You may also start an advanced similarity search for this article.