Welcome to visit Zhongnan Medical Journal Press Series journal website!

Home Articles Vol 35,2026 No.7 Detail

Application of R language in pharmacovigilance signal detection

Published on Jul. 31, 2026Total Views: 67 times Total Downloads: 12 times Download Mobile

Author: FU Yali 1, 2, 3 BA Lei 1, 2, 3 ZHOU Jian 1, 2, 3 SHI Wenhui 1, 2, 3

Affiliation: 1.Jiangsu Health Development Research Center, Nanjing 210036, China 2.NHC Key Laboratory of Contraceptives Vigilance and Fertility Surveillance, Nanjing 210036, China 3.Jiangsu Provincial Medical Key Laboratory of Fertility Protection and Health Technology Assessment, Nanjing 210036, China

Keywords: Pharmacovigilance Signal detection Adverse reactions/events R language

DOI: 10.12173/j.issn.1005-0698.202603009

Reference: Fu YL, Ba L, Zhou J, et al. Application of R language in pharmacovigilance signal detection[J]. Chinese Journal of Pharmacoepidemiology, 2026, 35(7): 827-835. DOI: 10.12173/j.issn.1005-0698.202603009.[Article in Chinese]

  • Abstract
  • Full-text
  • References
Abstract

Pharmacovigilance plays a critical role in ensuring medication safety, with its core mission being the timely detection of potential drug-event associations through adverse reaction monitoring. Signal detection tools have advanced rapidly, driven by the accumulation of data from spontaneous reporting systems, electronic health records, health insurance databases, and other real-world sources. With its advantages in open-source ecosystem and powerful statistical capabilities, R language has become a core tool for signal detection in pharmacovigilance. This study systematically reviews the progress and main methods in signal detection, compares the functions and application scenarios of relevant R packages, and discusses the advantages and challenges of using R in signal detection. The results show that the R ecosystem encompasses methods such as classical frequency analysis, likelihood ratio tests, adaptive Lasso and data-driven pattern discovery, with each method differing in terms of data quality, interpretability, and automation. In the future, further efforts should focus on integrating multi-source real-world data, detecting drug interaction signals, applying explainable artificial intelligence, and building a full workflow of signal detection tailored to regulatory practices.

Full-text
Please download the PDF version to read the full text: download
References

1. 王斌. 药物警戒与合理用药[M]. 上海: 上海交通大学出版社, 2025.

2. World Health Organization. The importance of pharmacovigilance[EB/OL]. (2022-01-01) [2025-11-14]. https://www.who.int/pub lications/i/item/10665-42493.

3. CIOMSWorking Group. Practical aspects of signal detection in pharmacovigilance: report of CIOMS Working Group VIII[M]. Geneva: CIOMS, 2010.

4. GillSK, ChristopherAF, GuptaV, et al. Emerging role of bioinformatics tools and software in evolution of clinical research[J]. Perspect Clin Res, 2016, 7(3): 115-322. DOI: 10.4103/2229-3485.184782.

5. R. The R project for statistical computing[EB/OL]. [2025-11-14]. https://www.r-project.org/

6. CandoreG, JuhlinK, ManlikK, et al. Comparison of statistical signal detection methods within and across spontaneous reporting databases[J]. Drug Saf, 2015, 38(6): 577-587. DOI: 10.1007/s40264-015-0289-5.

7. HarpazR, DumouchelW, LependuP, et al. Performance of pharmacovigilance signal-detection algorithms for the FDA Adverse Event Reporting System[J]. Clin Pharmacol Ther, 2013, 93(6): 539-546. DOI: 10.1038/clpt.2013.24.

8. 周瑞珊, 卢佩雯, 陈君恒, 等. 药品不良反应数据挖掘技术在药物警戒中的应用[J]. 中国现代应用药学, 2024, 41(6): 864-870.ZhouRS, LuPW, ChenJH, et al. Application of adverse drug reaction of data mining in pharmacovigilance[J]. Chinese Journal of Modern Applied Pharmacy, 2024, 41(6): 864-870. DOI: 10.13748/j.cnki.issn1007-7693.20224098.

9. LavertuA, VoraB, GiacominiKM, et al. A new era in pharmacovigilance: toward real-world data and digital monitoring[J]. Clin Pharmacol Ther, 2021, 109(5): 1197-1202. DOI: 10.1002/cpt.2172.

10. LiuA, MukhopadhyayR, MarkatouM. MDDC: an R and Python package for adverse event identification in pharmacovigilance data[J]. Sci Rep, 2025, 15(1): 21317. DOI: 10.1038/s41598-025-00635-w.

11. CourtoisÉ, Tubert-BitterP, AhmedI. New adaptive Lasso approaches for variable selection in automated pharmacovigilance signal detection[J]. BMC Med Res Methodol, 2021, 21(1): 271. DOI: 10.1186/s12874-021-01450-3.

12. ChakrabortyS, MarkatouM, BallR. Likelihood ratio test-based drug safety assessment using R package pvLRT[J]. R J, 2023, 15(1): 101-121. DOI: 10.32614/RJ-2023-027.

13. DijkstraL, GarlingM, ForaitaR, et al. Adverse drug reaction or innocent bystander? A systematic comparison of statistical discovery methods for spontaneous reporting systems[J]. Pharmacoepidemiol Drug Saf, 2020, 29(4): 396-403. DOI: 10.1002/pds.4970.

14. 向永洋, 谢雁鸣, 易丹辉. 药物警戒数据挖掘方法比较及其在中成药预警中的应用[J]. 中国中药杂志, 2011, 36(20): 2831-2835.XiangYY, XieYM, YiDH. Pharmacovigilance of major parmaceutical innovation[J]. China Journal of Chinese Materia Medica, 2011, 36(20): 2831-2835. DOI: 10.4268/cjcmm20112020.

15. 张新佶, 郭晓晶, 叶小飞, 等. 药品不良反应监测中的序贯概率比检验方法[J]. 中国药物警戒, 2018, 15(4): 221-225.ZhangXJ, GuoXJ, YeXF, et al. Sequential probability ratio analysis in post-market drug safety surveillance[J]. Chinese Journal of Pharmacovigilance, 2018, 15(4): 221-225. DOI: 10.3969/j.issn.1672-8629.2018.04.007.

16. QianYF, YeXF, DuWM, et al. A computerized system for detecting signals due to drug-drug interactions in spontaneous reporting systems[J]. Br J Clin Pharmacol, 2010, 69(1): 67-73. DOI: 10.1111/j.1365-2125.2009.03557.x.

17. EllisDE, HubbardRA, WillisAW, et al. Comparing LASSO and random forest models for predicting neurological dysfunction among fluoroquinolone users[J]. Pharmacoepidemiol Drug Saf, 2022, 31(4): 393-403. DOI: 10.1002/pds.5391.

18. 郭美玲, 柴克燕, 刘蕴资, 等. 数据挖掘方法在真实世界研究中的应用进展[J]. 药物流行病学杂志, 2026, 35(4): 451-461.GuoML, ChaiKY, LiuYZ, et al. Application progress of data mining methods in real-world study[J]. Chinese Journal of Pharmacoepidemiology, 2026, 35(4): 451-461. DOI: 10.12173/j.issn.1005-0698.202511032.

19. 贺冰洁, 张明轩, 詹思延. 药物流行病学中处方序列对称分析研究的系统综述[J]. 中华流行病学杂志, 2021, 42(9): 1641-1649.HeBJ, ZhangMX, ZhanSY. Prescription sequence symmetry analysis in pharmacoepidemiology: a systematic review[J]. Chinese Journal of Epidemiology, 2021, 42(9): 1641-1649. DOI: 10.3760/cma.j.cn112338-20201208-01386.

20. 孙一鑫, 王淼, 杨明芳, 等. 树状扫描统计量用于药品和疫苗安全性监测的综述[J]. 中华流行病学杂志, 2021, 42(7): 1286-1291.SunYX, WangM, YangMF, et al. Review on tree-based scan statistic in drug and vaccine safety monitoring[J]. Chinese Journal of Epidemiology, 2021, 42(7): 1286-1291. DOI: 10.3760/cma.j.cn112338-20201103-01297.

21. KulldorffM, DashevskyI, AberyTR, et al. Drug safety data mining with a tree-based scan statistic[J]. Pharmacoepidemiol Drug Saf, 2013, 22(5): 517-523. DOI: 10.1002/pds.3423.

22. JoHG, SeoJ, ChoiS, et al. East Asian herbal medicine to reduce primary pain and adverse events in cancer patients: a systematic review and meta-analysis with association rule mining to identify core herb combination[J]. Front Pharmacol, 2022, 12: 800571. DOI: 10.3389/fphar.2021.800571.

23. WardD, ThorsenNM, FrischM, et al. A cluster analysis of serious adverse event reports after human papillomavirus (HPV) vaccination in Danish girls and young women, September 2009 to August 2017[J]. Euro Surveill, 2019, 24(19): 1800380. DOI: 10.2807/1560-7917.ES.2019.24.19.1800380.

24. 徐瑾, 钟长鸣, 周鹃, 等. 使用主成分分析的药品不良反应风险信号挖掘方法探索[J]. 中国医院药学杂志, 2017, 37(1): 13-16.XuJ, ZhongCM, ZhouJ, et al. Exploration of principal component analysis for discovering the signal of adverse drug reactions[J]. Chinese Journal of Hospital Pharmacy, 2017, 37(1): 13-16. DOI: 10.13286/j.cnki.chinhosppharmacyj.2017.01.03.

25. 陈枭. 基于机器学习的自发呈报系统中药品不良反应信号检测研究[D]. 中国人民解放军海军军医大学, 2024. [ChenX. Signal detection of adverse drug reaction inspontaneous reporting system based on machine learning[D]. Naval Medical University, 2024.

26. PhamM, ChengF, RamachandranK. A comparison study of algorithms to detect drug-adverse event associations: frequentist, Bayesian, and machine-learning approaches[J]. Drug Saf, 2019, 42(6): 743-750. DOI: 10.1007/s40264-018-00792-0.

27. JangMG, ChaS, KimS, et al. Application of tree-based machine learning classification methods to detect signals of fluoroquinolones using the Korea Adverse Event Reporting System (KAERS) database[J]. Expert Opin Drug Saf, 2023, 22(7): 1-8. DOI: 10.1080/14740338.2023.2181341.

28. LiSR, ZhaoLL. Vaccine adverse event enrichment tests[J]. Stat Med, 2021, 40(19): 4269-4278. DOI: 10.1002/sim.9027.

29. SunX, ZhangY, QianD, et al. An investigation into the current status of post-marketing signal detection for pharmaceutical products in China: an interview-based study[J]. J Chin Pharm Sci, 2025, 34(2): 175-184. DOI: 10.5246/jcps.2025.02.014.

30. 国家药品不良反应监测中心. 国家药品不良反应监测年度报告(2025年)[EB/OL]. (2026-04-27) [2026-05-26]. https://www.cdr-adr.org.cn/center_news/202604/t20260427_51496.html.

31. ChakrabortyS, MarkatouM, LiuA. pvLRT: likelihood ratio test-based approaches to pharmacovigilance[EB/OL]. (2023-03-06) [2025-10-24]. https://cran.r-project.org/web/packages/pvLRT/index.html.

32. CourtoisE, AhmedI, PerdryH. adapt4pv: adaptive approaches for signal detection in pharmacovigilance[EB/OL]. (2023-05-30) [2025-10-16]. https://CRAN.R-project.org/package=adapt4pv.

33. LiSR, ChenHF, ZhaoLL, et al. AEenrich: adverse event enrichment tests[EB/OL]. (2021-11-01) [2025-10-11]. https://CRAN.R-project.org/package=AEenrich.

34. LiuA, MukhopadhyayR, MarkatouMI. MDDC: modified detecting deviating cells algorithm in pharmacovigilance[EB/OL]. (2025-04-07) [2025-10-24]. https://cran.wustl.edu/web/packages/MDDC/index.html.

35. ChungG. mds: medical devices surveillance[EB/OL]. (2020-06-15) [2025-10-15]. https://CRAN.R-project.org/package=mds.

36. IhrieJ, CanidaT, AhmedI, et al. openEBGM: EBGM disproportionality scores for adverse event data mining[EB/OL]. (2023-09-14) [2025-10-24]. https://cran.r-project.org/web/pac kages/openEBGM/index.html.

37. VenturiniS, FranklinJM, MorlockL, et al. Random effects models for identifying the most harmful medication errors in a large, voluntary reporting database[J]. Ann Appl Stat, 2017, 11(2): 504-526. DOI: 10.1214/16-AOAS974.

38. CanidaT, IhrieJ. openEBGM: an R implementation of the Gamma-Poisson Shrinker data mining model[J]. R J, 2017, 9(2): 499-519. DOI: 10.32614/RJ-2017-063.

39. PhViD: pharmacovigilance signal detection[EB/OL]. [2025-10-24]. https://cran.r-project.org/web/packages/PhViD/index.html.

40. GauffinO, FusaroliM. pvda: disproportionality functions for pharmacovigilance[EB/OL]. (2025-01-17) [2025-10-24]. https://cran.r-project.org/web/packages/pvda/index.html.

41. TanY, MarkatouM, ChakrabortyS, et al. pvEBayes: empirical Bayes methods for pharmacovigilance empirical[EB/OL]. (2025-10-01) [2025-10-24]. https://CRAN.R-project.org/package=pvEBayes.

42. DijkstraL, GarlingM, ForaitaR, et al. bips-hb/pvm[EB/OL]. [2025-10-24]. https://github.com/bips-hb/pvm.

43. Narasimhan. sglr: Sequential generalized likelihood ratio decision boundaries proposed by Shih, Lai, Heyse and Chen (2010, <doi:10.1002/Sim.4036>)[EB/OL]. (2022-04-19) [2025-10-24]. https://cran.r-project.org/web/packages/sglr/index.html.

44. ShihMC, LaiTL, HeyseJF, et al. Sequential generalized likelihood ratio tests for vaccine safety evaluation[J]. Stat Med, 2010, 29(26): 2698-2708. DOI: 10.1002/sim.4036.

45. 王蒙. 贝叶斯工具变量方法研究及其在药品不良反应主动监测中的应用[D]. 中国人民解放军海军军医大学, 2019. [WangM. Research and application of Bayesian instrumental variable in active surveillance of adverse drug reaction[D]. Naval Medical University, 2019.

46. LinoMM, MatherS, TraniM, et al. Challenges and innovations in pharmacovigilance and signal management during the COVID-19 pandemic: an industry perspective[J]. Vaccines (Basel), 2025, 13(5): 481. DOI: 10.3390/vaccines13050481.

47. NagarA, GobburuJ, ChakravartyA. Artificial intelligence in pharmacovigilance: advancing drug safety monitoring and regulatory integration[J]. Ther Adv Drug Saf, 2025, 16: 20420986 251361435. DOI: 10.1177/20420986251361435.

48. BarbieriMA, BattiniV, CarnovaleC, et al. Artificial intelligence in pharmacovigilance signal management: a review of tools, implementations, research, and regulatory landscape[J]. Expert Opin Drug Saf, 2026, 25(2): 207-222. DOI: 10.1080/14740338. 2025.2545926.

49. Ferreira-Da-SilvaR, Cruz-CorreiaR, RibeiroI. Beyond black boxes: using explainable causal artificial intelligence to separate signal from noise in pharmacovigilance[J]. Int J Clin Pharm, 2026, 48(2): 677-681. DOI: 10.1007/s11096-025-02004-z.

Popular papers
Last 6 months