Learn R Programming

akmedoids

An R package for analyzing and clustering longitudinal data

Description

The akmedoids package advances the clustering of longitudinal datasets in order to identify clusters of trajectories with similar long-term linear trends over time, providing an improved cluster identification as compared with the classic kmeans algorithm. The package also includes a set of functions for addressing common data issues, such as missing entries and outliers, prior to conducting advance longitudinal data analysis. One of the key objectives of this package is to facilitate easy replication of a recent paper which examined small area inequality in the crime drop (Adepeju et al.2021). Many of the functions provided in the akmedoids package may be applied to longitudinal data in general.

For more information and usability, check out details on CRAN.

Support and Contributions:

For support and bug reports send an email to: monsuur2010@yahoo.com or open an issue here. Code contributions to akmedoids are also very welcome.

References:

Adepeju, M., Langton, S. and Bannister, J. (2021). Anchored k-medoids: a novel adaptation of k-medoids further refined to measure instability in the exposure to crime. Journal of Computational Social Science link

Copy Link

Version

Install

install.packages('akmedoids')

Monthly Downloads

79

Version

1.3.0

License

GPL-3

Maintainer

Monsuru Adepeju

Last Published

April 13th, 2021

Functions in akmedoids (1.3.0)

w_spaces

Whitespaces removal
TO1Risk

Time-at-risk for the Adjudicated Toronto Youth Data (Sample 1)
data_imputation

Data imputation for longitudinal data
plot_akstats

Plot of cluster groups.
rates

Conversion of counts to rates
alpha_label

Numerics ids to alphabetical ids
traj

Sample longitudinal dataset
remove_rows_n

Removes rows that contain 'NA' and/or 'Inf' entries
traj_w_spaces

Sample longitudinal dataset containing whitespaces
print_akstats

Descriptive (Change) statistics
props

Conversion of counts (or rates) to 'Proportion'
akclustr

Anchored k-medoids clustering
simulated

Simulated longitudinal dataset
outlier_detect

Outlier detection and replacement
popl

Simulated population data.
elbow_point

Determine the elbow point on a curve
clustr

Sample labels of cluster groups