simaerep release 1.0.0 | R bloggers

simaerep release 1.0.0 | R bloggers

3 minutes, 56 seconds Read

[This article was first published on R on datistics, and kindly contributed to R-bloggers]. (You can report a problem with the content on this page here)


Want to share your content on R bloggers? click here if you have a blog, or here if you don’t.

Simulate patient-related events in clinical trials with the aim of detecting over- and under-reporting sites.

Monitoring reporting rates of patient-related events such as adverse events (AEs) in clinical trials is important for patient safety. We use bootstrap-based simulation to assign over- and under-reporting probabilities to each site in a clinical trial. The method is inspired by the ‘infer’ R package and the blog article by Allen Downey: “There is only one test!”.

Statistical monitoring of clinical trial sites typically uses several key risk indicators. These are operational metrics derived from the activities at clinical trial sites. The ratio of the number of side effects is usually one of them. The ratio of problems encountered when treating and examining patients according to the research protocol may be different.

Announcement

We are pleased to announce the release of {simaerep} v1.0.0 and {gsm.simarep} v0.2.0, our open source R packages designed to detect clinical trial sites that are under- or over-reporting patient-level clinical events. We merged our experience and user feedback from the past five years to design a more professional user experience with default settings that reflect our latest recommendations. We also modified the algorithm to support the detection of over-reporting of low-incidence terminal events such as patient discontinuations. {gsm.simaerep} provides key data preprocessing features and a standardized approach to integrate {simaerep} into an end-to-end analytics and reporting pipeline using the sound statistical monitoring {gsm} framework.

Release highlights

  • New user interface for simaerep() function with default values ​​that reflect the latest recommendations
  • Better output structure, chance of over- and under-reporting combined in one score
  • Support for low-incidence terminal events (e.g. patient discontinuation)

Detailed release notes

Demo

{simaerep}

suppressPackageStartupMessages(library(simaerep))
suppressPackageStartupMessages(library(dplyr))
suppressPackageStartupMessages(library(knitr))

set.seed(1)

df_visit <- sim_test_data_study(
  n_pat = 1000, # number of patients in study
  n_sites = 100, # number of sites in study
  ratio_out = 0.02, # ratio of sites with outlier
  factor_event_rate = -0.5, # rate of under-reporting
  # non-constant event rates based on gamma distribution
  event_rates = (dgamma(seq(1, 20, 0.5), shape = 5, rate = 2) * 5) + 0.1,
  max_visit = 20,
  max_visit_sd = 10,
  study_id = "A"
)

df_visit %>%
  select(study_id, site_id, patient_id, visit, n_event) %>%
  head(25) %>%
  knitr::kable()
AS0001P00000110
AS0001P00000122
AS0001P00000132
AS0001P00000144
AS0001P00000156
AS0001P00000167
AS0001P00000177
AS0001P00000187
AS0001P00000197
AS0001P000001107
AS0001P000001117
AS0001P000001127
AS0001P000001137
AS0001P00000213
AS0001P00000223
AS0001P00000235
AS0001P00000248
AS0001P00000258
AS0001P00000269
AS0001P00000279
AS0001P00000289
AS0001P00000299
AS0001P000002109
AS0001P000002119
AS0001P000002129
evrep <- simaerep(df_visit, mult_corr = TRUE)

plot(evrep, study = "A")

{gsm.simaerep}

library(gsm.simaerep)
library(gsm.kri)

dfInput <- Input_CumCount(
  dfSubjects = clindata::rawplus_dm,
  dfNumerator = clindata::rawplus_ae,
  dfDenominator = clindata::rawplus_visdt %>% dplyr::mutate(visit_dt = lubridate::ymd(visit_dt)),
  strSubjectCol = "subjid",
  strGroupCol = "siteid",
  strGroupLevel = "Site",
  strNumeratorDateCol = "aest_dt",
  strDenominatorDateCol = "visit_dt"
)

dfAnalyzed <- Analyze_Simaerep(dfInput)

dfFlagged <- Flag_Simaerep(dfAnalyzed, vThreshold = c(-0.99, -0.95, 0.95, 0.99))
## ℹ Sorted dfFlagged using custom Flag order: 2.Sorted dfFlagged using custom Flag order: -2.Sorted dfFlagged using custom Flag order: 1.Sorted dfFlagged using custom Flag order: -1.Sorted dfFlagged using custom Flag order: 0.
#> ℹ Sorted dfFlagged using custom Flag order: 2.Sorted dfFlagged using custom Flag order: -2.Sorted dfFlagged using custom Flag order: 1.Sorted dfFlagged using custom Flag order: -1.Sorted dfFlagged using custom Flag order: 0.

gsm.kri::Visualize_Scatter(
  dfFlagged,
  dfBounds = NULL,
  strGroupLabel = "GroupLevel",
  strUnit = "Visits"
)

simaerep has been published as a work product of the Inter-Company Quality Analytics (IMPALA)consortium. IMPALA is committed to working with health authority inspectors in defining guiding principles for the use of advanced analytics to complement, enhance and accelerate current QA practices. simaerep was initially developed at Roche, but is currently being evaluated by other companies in the sector to complement their quality assurance activities (see testimonials).

IMPALA logo

Koneswarakantha, B., Adyanthaya, R., Emerson, J. et al. An open-source R package for the detection of under-reporting of adverse events in clinical trials: implementation and validation by the IMPALA (Inter Company QuALity Analytics) consortium. Ther Innov Regul Sci (2024). https://doi.org/10.1007/s43441-024-00631-8

Koneswarakantha, B., Barmaz, Y., Ménard, T. et al. Follow-up on the use of advanced analytics for clinical quality assurance: bootstrap resampling to improve detection of adverse event underreporting. Drug Safety (2020).
https://doi.org/10.1007/s40264-020-01011-5


#simaerep #release #1.0.0 #bloggers

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *