Type: | Package |
Title: | Volcano Plot for Clinical Trial Adverse Events |
Version: | 1.0.0 |
Maintainer: | Jeremy Wildfire <jwildfire@gmail.com> |
Description: | Interactive adverse event (AE) volcano plot for monitoring clinical trial safety. This tool allows users to view the overall distribution of AEs in a clinical trial using standard (e.g. MedDRA preferred term) or custom (e.g. Gender) categories using a volcano plot similar to proposal by Zink et al. (2013) <doi:10.1177/1740774513485311>. This tool provides a stand-along shiny application and flexible shiny modules allowing this tool to be used as a part of more robust safety monitoring framework like the Shiny app from the 'safetyGraphics' R package. |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
RoxygenNote: | 7.2.3 |
Imports: | fmsb, dplyr, DT, ggplot2, tidyr, shiny, purrr |
Suggests: | safetyGraphics, safetyData |
NeedsCompilation: | no |
Packaged: | 2023-02-09 15:58:25 UTC; jwildfire |
Author: | Jeremy Wildfire [cre, aut], Becca Krouse [aut], Natalia Andriychuk [aut], Anh Tran [aut], Isaac Zhao [aut] |
Repository: | CRAN |
Date/Publication: | 2023-02-10 10:50:02 UTC |
Get Summary AE Statistics
Description
Compares reference and comparison groups to calculate group-wise metrics and p-values for use in AE volcano plot.
Usage
getStats(dfAE, dfDemog, settings, stat = "Risk Ratio")
Arguments
dfAE |
Adverse events dataset structured as 1 record per adverse event per subject |
dfDemog |
Subject-level dataset |
settings |
Named list of settings (see examples below for standard list) |
stat |
Statistic to calculate for AE plot. Options are risk ratio ("RR" or "Risk Ratio"), risk difference ("RD" or "Risk Difference"). Defaults to "Risk Ratio". |
Value
a data frame of group-wise statistics for use in the volcano plot
Examples
settings<-list(
stratification_col="AEBODSYS",
group_col="ARM",
reference_group="Placebo",
comparison_group="Xanomeline High Dose",
id_col="USUBJID"
)
getStats(dfAE=safetyData::adam_adae, dfDemog = safetyData::adam_adsl, settings)
Volcano App
Description
Initializes stand-alone volcano plot shiny application.
Usage
volcanoApp(
dfAE = safetyData::adam_adae,
dfDemog = safetyData::adam_adsl,
settings = NULL,
runNow = TRUE
)
Arguments
dfAE |
AE Data |
dfDemog |
demog data |
settings |
safetyGraphics settings |
runNow |
run app immediately? |
Value
Initializes Shiny app. No return value.
Create a volcano plot
Description
Creates a paneled volcano plot showing the distribution of Adverse events. Options to highlight selected events and customize options are provided.
Usage
volcanoPlot(data, highlights = c(), ...)
Arguments
data |
A data frame from getStats() |
highlights |
A list providing a column and values to be highlighted in the chart |
... |
Extra options to change the look of the plot. 'fillcol = c('sienna2', 'skyblue2', 'grey')': fill colors; 'pcutoff = 0.05': p value cutoff; ‘ecutoff = 1': estimate cutoff, 'GroupLabels = c(’Comparison Group', 'Reference Group')': custom group labels. |
Value
a volcano plot created with ggplot
Examples
settings<-list(
stratification_col="AEBODSYS",
group_col="ARM",
reference_group="Placebo",
comparison_group="Xanomeline High Dose",
id_col="USUBJID"
)
stats<-getStats(dfAE=safetyData::adam_adae, dfDemog = safetyData::adam_adsl, settings)
volcanoPlot(stats)
Volcano Plot Module - Server
Description
Modularized server for AE volcano plot.
Usage
volcano_server(input, output, session, params)
Arguments
input |
module input |
output |
module output |
session |
module session |
params |
parameters object with 'data' and 'settings' options. |
Value
returns shiny module Server function
Volcano Plot Module - UI
Description
Modularized user interface for AE Volcano plot
Usage
volcano_ui(id)
Arguments
id |
module id |
Value
returns shiny module UI