| Type: | Package | 
| Title: | Visualization of Adverse Events | 
| Version: | 0.2.1 | 
| 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>. | 
| BugReports: | https://github.com/dnzmarcio/visae/issues | 
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] | 
| Depends: | shiny (≥ 1.4.0), dplyr (≥ 1.0.0), ggplot2 (≥ 3.3.0), R (≥ 4.1.0) | 
| Imports: | shinyjs (≥ 1.1), ca (≥ 0.71), tidyr (≥ 1.1.0), ggrepel (≥ 0.8.2), rlang (≥ 0.4.6), DT (≥ 0.13) | 
| Encoding: | UTF-8 | 
| RoxygenNote: | 7.3.1 | 
| Suggests: | rmarkdown, knitr, testthat (≥ 3.0.0) | 
| VignetteBuilder: | knitr | 
| Config/testthat/edition: | 3 | 
| NeedsCompilation: | no | 
| Packaged: | 2025-03-05 06:10:29 UTC; dinizm01 | 
| Author: | Marcio A. Diniz | 
| Maintainer: | Marcio A. Diniz <marcio.diniz@mountsinai.org> | 
| Repository: | CRAN | 
| Date/Publication: | 2025-03-07 11:10:02 UTC | 
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  | 
| group | unquoted expression indicating the
variable name in  | 
| ae_class | unquoted expression indicating the
variable name in  | 
| 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  | 
| mass_indicator | logical value indicating the
use of dot size to represent the overall relative frequency of each  | 
| contr_threshold | numerical value between 0 an 1 filtering
 | 
| mass_threshold | numerical value between 0 an 1 filtering
 | 
Value
a list of
| tab_abs | a tibble showing absolute frequency of  | 
| tab_rel | a tibble showing percent of  | 
| 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  | 
| group | unquoted expression indicating the
variable name in  | 
| ae_grade | unquoted expression indicating the
variable name in  | 
| ae_domain | unquoted expression indicating the
variable name in  | 
| ae_term | unquoted expression indicating the
variable name in  | 
| ae_cycle | unquoted expression indicating the
variable name in  | 
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)
             }