Skip to main content
medRxiv
  • Home
  • About
  • Submit
  • ALERTS / RSS
Advanced Search

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

View ORCID ProfileAnna Laksafoss, Jan Wohlfahrt, View ORCID ProfileAnders Hviid
doi: https://doi.org/10.1101/2024.06.24.24309427
Anna Laksafoss
1Department of Epidemiology Research, Statens Serum Institut, Copenhagen, Denmark
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
  • ORCID record for Anna Laksafoss
  • For correspondence: adls{at}ssi.dk
Jan Wohlfahrt
2Danish Cancer Institute, Cancer Epidemiology and Surveillance, Strandboulevarden 49, 2100 Copenhagen, Denmark
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
Anders Hviid
1Department of Epidemiology Research, Statens Serum Institut, Copenhagen, Denmark
3Pharmacovigilance Research Center, Department of Drug Design and Pharmacology, Faculty of Health and Medical Sciences, University of Copenhagen, Universitetsparken 2, 2100 Copenhagen, Denmark
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
  • ORCID record for Anders Hviid
  • Abstract
  • Full Text
  • Info/History
  • Metrics
  • Supplementary material
  • Preview PDF
Loading

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.

Competing Interest Statement

The authors have declared no competing interest.

Funding Statement

Yes

Author Declarations

I confirm all relevant ethical guidelines have been followed, and any necessary IRB and/or ethics committee approvals have been obtained.

Yes

I confirm that all necessary patient/participant consent has been obtained and the appropriate institutional forms have been archived, and that any patient/participant/sample identifiers included were not known to anyone (e.g., hospital staff, patients or participants themselves) outside the research group so cannot be used to identify individuals.

Yes

I understand that all clinical trials and any other prospective interventional studies must be registered with an ICMJE-approved registry, such as ClinicalTrials.gov. I confirm that any such study reported in the manuscript has been registered and the trial registration ID is provided (note: if posting a prospective study registered retrospectively, please provide a statement in the trial ID field explaining why the study was not registered in advance).

Yes

I have followed all appropriate research reporting guidelines, such as any relevant EQUATOR Network research reporting checklist(s) and other pertinent material, if applicable.

Yes

Footnotes

  • The manuscript has been revised to increase the emphasis on the novel distance measure, include code examples and a graphic illustration of the method.

Copyright 
The copyright holder for this preprint is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. It is made available under a CC-BY 4.0 International license.
Back to top
PreviousNext
Posted September 12, 2024.
Download PDF

Supplementary Material

Email

Thank you for your interest in spreading the word about medRxiv.

NOTE: Your email address is requested solely to identify you as the sender of this article.

Enter multiple addresses on separate lines or separate them with commas.
tame: An R package for identifying clusters of medication use based on dose, timing and type of medication
(Your Name) has forwarded a page to you from medRxiv
(Your Name) thought you would like to see this page from the medRxiv website.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Share
tame: An R package for identifying clusters of medication use based on dose, timing and type of medication
Anna Laksafoss, Jan Wohlfahrt, Anders Hviid
medRxiv 2024.06.24.24309427; doi: https://doi.org/10.1101/2024.06.24.24309427
Twitter logo Facebook logo LinkedIn logo Mendeley logo
Citation Tools
tame: An R package for identifying clusters of medication use based on dose, timing and type of medication
Anna Laksafoss, Jan Wohlfahrt, Anders Hviid
medRxiv 2024.06.24.24309427; doi: https://doi.org/10.1101/2024.06.24.24309427

Citation Manager Formats

  • BibTeX
  • Bookends
  • EasyBib
  • EndNote (tagged)
  • EndNote 8 (xml)
  • Medlars
  • Mendeley
  • Papers
  • RefWorks Tagged
  • Ref Manager
  • RIS
  • Zotero
  • Tweet Widget
  • Facebook Like
  • Google Plus One

Subject Area

  • Epidemiology
Subject Areas
All Articles
  • Addiction Medicine (576)
  • Allergy and Immunology (868)
  • Anesthesia (306)
  • Cardiovascular Medicine (4482)
  • Dentistry and Oral Medicine (449)
  • Dermatology (385)
  • Emergency Medicine (615)
  • Endocrinology (including Diabetes Mellitus and Metabolic Disease) (1528)
  • Epidemiology (15277)
  • Forensic Medicine (31)
  • Gastroenterology (1133)
  • Genetic and Genomic Medicine (6644)
  • Geriatric Medicine (671)
  • Health Economics (1006)
  • Health Informatics (4605)
  • Health Policy (1378)
  • Health Systems and Quality Improvement (1623)
  • Hematology (544)
  • HIV/AIDS (1276)
  • Infectious Diseases (except HIV/AIDS) (15961)
  • Intensive Care and Critical Care Medicine (1111)
  • Medical Education (626)
  • Medical Ethics (147)
  • Nephrology (674)
  • Neurology (6695)
  • Nursing (346)
  • Nutrition (1006)
  • Obstetrics and Gynecology (1153)
  • Occupational and Environmental Health (961)
  • Oncology (3369)
  • Ophthalmology (988)
  • Orthopedics (370)
  • Otolaryngology (421)
  • Pain Medicine (437)
  • Palliative Medicine (131)
  • Pathology (669)
  • Pediatrics (1704)
  • Pharmacology and Therapeutics (700)
  • Primary Care Research (717)
  • Psychiatry and Clinical Psychology (5495)
  • Public and Global Health (9285)
  • Radiology and Imaging (2223)
  • Rehabilitation Medicine and Physical Therapy (1375)
  • Respiratory Medicine (1201)
  • Rheumatology (598)
  • Sexual and Reproductive Health (721)
  • Sports Medicine (535)
  • Surgery (722)
  • Toxicology (100)
  • Transplantation (290)
  • Urology (267)