Package 'visae'

Title: Visualization of Adverse Events
Description: Implementation of 'shiny' app to visualize adverse events based on the Common Terminology Criteria for Adverse Events (CTCAE) using stacked correspondence analysis as described in Diniz et. al (2021)<doi:10.1186/s12874-021-01368-w>.
Authors: Marcio A. Diniz [aut, cre, cph] , Michael Luu [aut]
Maintainer: Marcio A. Diniz <[email protected]>
License: GPL (>= 2)
Version: 0.2.1
Built: 2025-03-07 13:35:30 UTC
Source: CRAN

Help Index


Correspondence Analysis of Adverse Events

Description

Correspondence Analysis of Adverse Events

Usage

ca_ae(
  data,
  id,
  group,
  ae_class,
  label = "AE",
  contr_indicator = TRUE,
  mass_indicator = TRUE,
  contr_threshold = NULL,
  mass_threshold = NULL
)

Arguments

data

data.frame or tibble object.

id

unquoted expression indicating the variable name in data that corresponds to the id variable.

group

unquoted expression indicating the variable name in data that corresponds to the group variable.

ae_class

unquoted expression indicating the variable name in data that corresponds to AE class.

label

character value indicating the column name of AE class in resulting tables.

contr_indicator

logical value indicating the use of color intensity to represent the maximum contribution of each ae_class.

mass_indicator

logical value indicating the use of dot size to represent the overall relative frequency of each ae_class.

contr_threshold

numerical value between 0 an 1 filtering ae_class with contribution greater than contr_threshold.

mass_threshold

numerical value between 0 an 1 filtering ae_class with mass greater than mass_threshold.

Value

a list of

tab_abs

a tibble showing absolute frequency of ae_class by group;

tab_rel

a tibble showing percent of ae_class by group;

total_inertia

a numerical value indicating the total inertia;

tab_inertia

a tibble showing inertia broken down by dimension and the percent relative to the total inertia;

asymmetric_plot

a contribution biplot.

References

Levine RA, Sampson E, Lee TC. Journal of Computational and Graphical Statistics. Wiley Interdisciplinary Reviews: Computational Statistics. 2014 Jul;6(4):233-9.

Examples

library(dplyr)

id <- rep(1:50, each = 2)
group <- c(rep("A", 50), rep("B", 50))
ae_grade <- sample(1:5, size = 100, replace = TRUE)
ae_domain <- sample(c("D", "E"), size = 100, replace = TRUE)
ae_term <- sample(c("F", "G", "H", "I"), size = 100, replace = TRUE)
df <- tibble(id = id, trt = group,
            ae_g = ae_grade, ae_d = ae_domain, ae_t = ae_term)
test <- df |> ca_ae(id = id,
                   group = trt,
                   ae = ae_g,
                   label = "AE",
                   contr_indicator = TRUE,
                   mass_indicator = TRUE,
                   contr_threshold = 0.01,
                   mass_threshold = 0.01)

Shiny App for Correspondence Analysis of Adverse Events

Description

Shiny App for Correspondence Analysis of Adverse Events

Usage

run_ca(
  data,
  id,
  group,
  ae_grade = NULL,
  ae_domain = NULL,
  ae_term = NULL,
  ae_cycle = NULL
)

Arguments

data

data.frame or tibble object.

id

unquoted expression indicating the variable name in data that corresponds to the id variable.

group

unquoted expression indicating the variable name in data that corresponds to the group variable.

ae_grade

unquoted expression indicating the variable name in data that corresponds to AE grade class.

ae_domain

unquoted expression indicating the variable name in data that corresponds to AE domain class.

ae_term

unquoted expression indicating the variable name in data that corresponds to AE term class.

ae_cycle

unquoted expression indicating the variable name in data that corresponds to AE cycle.

Value

an interactive web application to perform correspondence analysis for adverse event data.

Examples

if (interactive()) {
library(dplyr)
patient_id <- 1:100
group <- c(rep("A", 50), rep("B", 50))
ae_grade <- sample(1:5, size = 100, replace = TRUE)
ae_domain <- sample(c("C", "D"), size = 100, replace = TRUE)
ae_term <- sample(c("E", "F", "G", "H"), size = 100, replace = TRUE)
dt <- tibble(patient_id = patient_id, trt = group,
            ae_g = ae_grade, ae_d = ae_domain, ae_t = ae_term)
dt %>% run_ca(., group = trt,
             id = patient_id,
             ae_grade = ae_g,
             ae_domain = ae_d,
             ae_term = ae_t)
             }