IDEAS home Printed from https://ideas.repec.org/a/jss/jstsof/v065i04.html

kml and kml3d: R Packages to Cluster Longitudinal Data

Author

Listed:
  • Genolini, Christophe
  • Alacoque, Xavier
  • Sentenac, Mariane
  • Arnaud, Catherine

Abstract

Longitudinal studies are essential tools in medical research. In these studies, variables are not restricted to single measurements but can be seen as variable-trajectories, either single or joint. Thus, an important question concerns the identification of homogeneous patient trajectories.kml and kml3d are R packages providing an implementation of k-means designed to work specifically on trajectories (kml) or on joint trajectories (kml3d). They provide various tools to work on longitudinal data: imputation methods for trajectories (nine classic and one original), methods to define starting conditions in k-means (four classic and three original) and quality criteria to choose the best number of clusters (four classic and one original). In addition, they offer graphic facilities to “visualize” the trajectories, either in 2D (single trajectory) or 3D (joint-trajectories). The 3D graph representing the mean joint-trajectories of each cluster can be exported through LATEX in a 3D dynamic rotating PDF graph (Figures 1 and 9).

Suggested Citation

  • Genolini, Christophe & Alacoque, Xavier & Sentenac, Mariane & Arnaud, Catherine, 2015. "kml and kml3d: R Packages to Cluster Longitudinal Data," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 65(i04).
  • Handle: RePEc:jss:jstsof:v:065:i04
    DOI: http://hdl.handle.net/10.18637/jss.v065.i04
    as

    Download full text from publisher

    File URL: https://www.jstatsoft.org/index.php/jss/article/view/v065i04/v65i04.pdf
    Download Restriction: no

    File URL: https://www.jstatsoft.org/index.php/jss/article/downloadSuppFile/v065i04/kml_2.3.tar.gz
    Download Restriction: no

    File URL: https://www.jstatsoft.org/index.php/jss/article/downloadSuppFile/v065i04/kml3d_2.3.tar.gz
    Download Restriction: no

    File URL: https://www.jstatsoft.org/index.php/jss/article/downloadSuppFile/v065i04/v65i04.R
    Download Restriction: no

    File URL: https://libkey.io/http://hdl.handle.net/10.18637/jss.v065.i04?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    References listed on IDEAS

    as
    1. Celeux, Gilles & Govaert, Gerard, 1992. "A classification EM algorithm for clustering and two stochastic versions," Computational Statistics & Data Analysis, Elsevier, vol. 14(3), pages 315-332, October.
    2. Glenn Milligan & Martha Cooper, 1985. "An examination of procedures for determining the number of clusters in a data set," Psychometrika, Springer;The Psychometric Society, vol. 50(2), pages 159-179, June.
    3. Douglas Steinley & Michael J. Brusco, 2007. "Initializing K-means Batch Clustering: A Critical Evaluation of Several Techniques," Journal of Classification, Springer;The Classification Society, vol. 24(1), pages 99-121, June.
    4. Feng, Dai & Tierney, Luke, 2008. "Computing and Displaying Isosurfaces in R," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 28(i01).
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Valentina Rizzoli & Matilde Trevisani & Arjuna Tuzzi, 2023. "Portraying the life cycle of ideas in social psychology through functional (textual) data analysis: a toolkit for digital history," Scientometrics, Springer;Akadémiai Kiadó, vol. 128(9), pages 5197-5226, September.
    2. Sara Castel-Feced & Lina Maldonado & Isabel Aguilar-Palacio & Sara Malo & Belén Moreno-Franco & Eusebio Mur-Vispe & José-Tomás Alcalá-Nalvaiz & María José Rabanaque-Hernández, 2021. "Evolution of Cardiovascular Risk Factors in a Worker Cohort: A Cluster Analysis," IJERPH, MDPI, vol. 18(11), pages 1-14, May.
    3. Piotr M. Bolibok & Bartłomiej Zinczuk & Anna Matras-Bolibok, 2025. "Sustainability Transition in the Visegrád Group: Shared Goals, Different Paths," Sustainability, MDPI, vol. 17(5), pages 1-29, February.
    4. Benny Ren & Ian Barnett, 2022. "Autoregressive mixture models for clustering time series," Journal of Time Series Analysis, Wiley Blackwell, vol. 43(6), pages 918-937, November.
    5. Jascha Dräger & Markus Klein & Edward M Sosu, 2024. "Trajectories of school absences across compulsory schooling and their impact on children’s academic achievement: An analysis based on linked longitudinal survey and school administrative data," PLOS ONE, Public Library of Science, vol. 19(8), pages 1-15, August.
    6. Yu Fei & Rongli Li & Zhouhong Li & Guoqi Qian, 2024. "Clustering Longitudinal Data for Growth Curve Modelling by Gibbs Sampler and Information Criterion," Journal of Classification, Springer;The Classification Society, vol. 41(2), pages 371-401, July.
    7. Bucciarelli, Edgardo & Ascatigno, Aurora, 2025. "Assessing bargaining and cooperation through longitudinal clustering analysis: Evidence from a lab-in-the-field experiment," Socio-Economic Planning Sciences, Elsevier, vol. 100(C).
    8. Andrea Sciandra & Matilde Trevisani & Arjuna Tuzzi, 2025. "Temporal trends and presidential traits in the Italian end-of-year addresses: comparing and contrasting KBS and STM results," Quality & Quantity: International Journal of Methodology, Springer, vol. 59(1), pages 905-935, February.
    9. Konstantin A. Kholodilin, 2018. "Measuring Stick-Style Housing Policies: a Multi-Country Longitudinal Database of Governmental Regulations," Discussion Papers of DIW Berlin 1727, DIW Berlin, German Institute for Economic Research.
    10. Yuriko Suzuki & Yoshitake Takebayashi & Seiji Yasumura & Michio Murakami & Mayumi Harigane & Hirooki Yabe & Tetsuya Ohira & Akira Ohtsuru & Satomi Nakajima & Masaharu Maeda, 2018. "Changes in Risk Perception of the Health Effects of Radiation and Mental Health Status: The Fukushima Health Management Survey," IJERPH, MDPI, vol. 15(6), pages 1-11, June.
    11. Peilei Fan & Jiquan Chen & Tanni Sarker, 2022. "Roles of Economic Development Level and Other Human System Factors in COVID-19 Spread in the Early Stage of the Pandemic," Sustainability, MDPI, vol. 14(4), pages 1-15, February.
    12. Maura Mezzetti & Daniele Borzelli & Andrea d’Avella, 2022. "A Bayesian approach to model individual differences and to partition individuals: case studies in growth and learning curves," Statistical Methods & Applications, Springer;Società Italiana di Statistica, vol. 31(5), pages 1245-1271, December.
    13. repec:osf:socarx:cw6a4_v1 is not listed on IDEAS
    14. Langton, Samuel & Dixon, Anthony & Farrell, Graham, 2021. "Small area variation in crime effects of COVID-19 policies in England and Wales," Journal of Criminal Justice, Elsevier, vol. 75(C).
    15. Monsuru Adepeju & Samuel Langton & Jon Bannister, 2021. "Anchored k-medoids: a novel adaptation of k-medoids further refined to measure long-term instability in the exposure to crime," Journal of Computational Social Science, Springer, vol. 4(2), pages 655-680, November.
    16. Langton, Samuel & Dixon, Anthony & Farrell, Graham, 2021. "Small area variation in crime effects of COVID-19 policies in England and Wales," SocArXiv cw6a4, Center for Open Science.

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Faicel Chamroukhi, 2016. "Piecewise Regression Mixture for Simultaneous Functional Data Clustering and Optimal Segmentation," Journal of Classification, Springer;The Classification Society, vol. 33(3), pages 374-411, October.
    2. J. Fernando Vera & Rodrigo Macías, 2021. "On the Behaviour of K-Means Clustering of a Dissimilarity Matrix by Means of Full Multidimensional Scaling," Psychometrika, Springer;The Psychometric Society, vol. 86(2), pages 489-513, June.
    3. Michael Brusco & Douglas Steinley, 2015. "Affinity Propagation and Uncapacitated Facility Location Problems," Journal of Classification, Springer;The Classification Society, vol. 32(3), pages 443-480, October.
    4. Douglas Steinley & Gretchen Hendrickson & Michael Brusco, 2015. "A Note on Maximizing the Agreement Between Partitions: A Stepwise Optimal Algorithm and Some Properties," Journal of Classification, Springer;The Classification Society, vol. 32(1), pages 114-126, April.
    5. Christophe Genolini & Bruno Falissard, 2010. "KmL: k-means for longitudinal data," Computational Statistics, Springer, vol. 25(2), pages 317-328, June.
    6. Fujita, André & Takahashi, Daniel Y. & Patriota, Alexandre G., 2014. "A non-parametric method to estimate the number of clusters," Computational Statistics & Data Analysis, Elsevier, vol. 73(C), pages 27-39.
    7. Luis García-Escudero & Alfonso Gordaliza & Carlos Matrán & Agustín Mayo-Iscar, 2010. "A review of robust clustering methods," Advances in Data Analysis and Classification, Springer;German Classification Society - Gesellschaft für Klassifikation (GfKl);Japanese Classification Society (JCS);Classification and Data Analysis Group of the Italian Statistical Society (CLADAG);International Federation of Classification Societies (IFCS), vol. 4(2), pages 89-109, September.
    8. Li Lin & Daniel T. L. Shek, 2021. "Meaning-in-Life Profiles among Chinese Late Adolescents: Associations with Readiness for Political Participation," IJERPH, MDPI, vol. 18(11), pages 1-16, May.
    9. Volodymyr Melnykov & Semhar Michael, 2020. "Clustering Large Datasets by Merging K-Means Solutions," Journal of Classification, Springer;The Classification Society, vol. 37(1), pages 97-123, April.
    10. J. Fernando Vera & Rodrigo Macías, 2017. "Variance-Based Cluster Selection Criteria in a K-Means Framework for One-Mode Dissimilarity Data," Psychometrika, Springer;The Psychometric Society, vol. 82(2), pages 275-294, June.
    11. Mark Chiang & Boris Mirkin, 2010. "Intelligent Choice of the Number of Clusters in K-Means Clustering: An Experimental Study with Different Cluster Spreads," Journal of Classification, Springer;The Classification Society, vol. 27(1), pages 3-40, March.
    12. Liu, Pei-chen Barry & Hansen, Mark & Mukherjee, Avijit, 2008. "Scenario-based air traffic flow management: From theory to practice," Transportation Research Part B: Methodological, Elsevier, vol. 42(7-8), pages 685-702, August.
    13. Adrian O’Hagan & Arthur White, 2019. "Improved model-based clustering performance using Bayesian initialization averaging," Computational Statistics, Springer, vol. 34(1), pages 201-231, March.
    14. François Bavaud, 2009. "Aggregation invariance in general clustering approaches," Advances in Data Analysis and Classification, Springer;German Classification Society - Gesellschaft für Klassifikation (GfKl);Japanese Classification Society (JCS);Classification and Data Analysis Group of the Italian Statistical Society (CLADAG);International Federation of Classification Societies (IFCS), vol. 3(3), pages 205-225, December.
    15. Li, Pai-Ling & Chiou, Jeng-Min, 2011. "Identifying cluster number for subspace projected functional data clustering," Computational Statistics & Data Analysis, Elsevier, vol. 55(6), pages 2090-2103, June.
    16. Lebret, Rémi & Iovleff, Serge & Langrognet, Florent & Biernacki, Christophe & Celeux, Gilles & Govaert, Gérard, 2015. "Rmixmod: The R Package of the Model-Based Unsupervised, Supervised, and Semi-Supervised Classification Mixmod Library," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 67(i06).
    17. Alessandra Cepparulo & Antonello Zanfei, 2019. "The diffusion of public eServices in European cities," Working Papers 1904, University of Urbino Carlo Bo, Department of Economics, Society & Politics - Scientific Committee - L. Stefanini & G. Travaglini, revised 2019.
    18. Noelia Caceres & Luis M. Romero & Francisco J. Morales & Antonio Reyes & Francisco G. Benitez, 2018. "Estimating traffic volumes on intercity road locations using roadway attributes, socioeconomic features and other work-related activity characteristics," Transportation, Springer, vol. 45(5), pages 1449-1473, September.
    19. Mukhopadhyay, Subhadeep & Ghosh, Anil K., 2011. "Bayesian multiscale smoothing in supervised and semi-supervised kernel discriminant analysis," Computational Statistics & Data Analysis, Elsevier, vol. 55(7), pages 2344-2353, July.
    20. Douglas L. Steinley & M. J. Brusco, 2019. "Using an Iterative Reallocation Partitioning Algorithm to Verify Test Multidimensionality," Journal of Classification, Springer;The Classification Society, vol. 36(3), pages 397-413, October.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:jss:jstsof:v:065:i04. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Christopher F. Baum (email available below). General contact details of provider: http://www.jstatsoft.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.