Package 'volcanoPlot'

Title: Volcano Plot for Clinical Trial Adverse Events
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.
Authors: Jeremy Wildfire [cre, aut], Becca Krouse [aut], Natalia Andriychuk [aut], Anh Tran [aut], Isaac Zhao [aut]
Maintainer: Jeremy Wildfire <[email protected]>
License: MIT + file LICENSE
Version: 1.0.0
Built: 2025-02-23 03:47:59 UTC
Source: https://github.com/cran/volcanoPlot

Help Index


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 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


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)