Back

Tame: An R package for identifying clusters of medication use based on dose, timing and type of medication

Laksafoss, A.; Wohlfahrt, J.; Hviid, A.

2024-06-25 epidemiology
10.1101/2024.06.24.24309427 medRxiv
Show abstract

Simplified exposure classifications, such as ever exposed versus never exposed, are commonly used in pharmacoepidemiology. However, this simplification may obscure complex use patterns relevant to researchers. We introduce tame, an R package that offers a novel method for classifying medication use patterns, capturing complexities such as timing, dose, and concurrent medication use in real-world data. The core innovation of tame is its bespoke distance measure, which identifies complex clusters in medication use and is highly adaptable, allowing customization based on the Anatomical Therapeutic Chemical (ATC) Classification System, medication timing, and dose. By prioritizing a robust distance measure, tame ensures accurate and meaningful clustering, enabling researchers to uncover intricate patterns within their data. The package also includes tools for visualizing and applying these clusters to new datasets. In a national Danish cohort study, tame identified nuanced antidepressant use patterns before and during pregnancy, demonstrating its capability to detect complex trends. tame is available on the Comprehensive R Archive Network at [https://CRAN.R-project.org/package=tame] under an MIT license, with a development version on GitHub at [https://github.com/Laksafoss/tame]. tame enhances medication use classification by detecting complex interactions and offering insights into real-world medication usage, thus improving stratification in epidemiological studies.

Matching journals

The top 11 journals account for 50% of the predicted probability mass.

50% of probability mass above

"Similar papers" are the closest papers from that journal in the model's embedding space. They show what the match is built on, but the ranking comes mostly from a classifier over the whole training set, not from these examples alone.