Akmedoids v1.2.6: for Longitudinal Data Clustering

Package Website

Click here to explore the website dedicated to the package. Below, I provide a short description of the key functions of the package.

Statement of need

Longitudinal clustering analysis is ubiquitous in social and behavioural sciences for investigating the developmental processes of a phenomenon over time. Examples of the commonly used techniques in these areas include group-based trajectory modelling (GBTM) and the non-parametric kmeans method. Whilst kmeans has a number of benefits over GBTM, such as more relaxed statistical assumptions, generic implementations render it more sensitive to outliers and short-term fluctuations, which minimises its ability to identify long-term linear trends in data. In crime and place research, for example, the identification of such long-term linear trends may help to develop some theoretical understanding of criminal victimisation within a geographical space (Weisburd et al. 2004; Griffith and Chavez 2004). In order to address this sensitivity problem, we advance a novel technique named anchored kmedoids (‘akmedoids’) which implements three key modifications to the existing longitudinal kmeans approach. First, it approximates trajectories using ordinary least square regression (OLS) and second, anchors the initialisation process with median observations. It then deploys the medoids observations as new anchors for each iteration of the expectation-maximisation procedure (Celeux and Govaert 1992). These modifications ensure that the impacts of short-term fluctuations and outliers are minimised. By linking the final groupings back to the original trajectories, a clearer delineation of the long-term linear trends of trajectories are obtained.

Application of ‘akmedoids’

We encourage the use of ‘akmedoids’ package outside of criminology, should it be appropriate. The R user manual and the vignette demonstrating the general application of the package for longitudinal data clustering can be downloaded from here.

Dr. Monsuru Adepeju
Dr. Monsuru Adepeju
Senior Research Associate

My research interests include Inequality modelling, Spatiotemporal modelling, Police data analytics.