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]
|
Maintainer: | Marcio A. Diniz <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.2.1 |
Built: | 2025-03-07 13:35:30 UTC |
Source: | CRAN |
Correspondence Analysis of Adverse Events
ca_ae( data, id, group, ae_class, label = "AE", contr_indicator = TRUE, mass_indicator = TRUE, contr_threshold = NULL, mass_threshold = NULL )
ca_ae( data, id, group, ae_class, label = "AE", contr_indicator = TRUE, mass_indicator = TRUE, contr_threshold = NULL, mass_threshold = NULL )
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
|
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. |
Levine RA, Sampson E, Lee TC. Journal of Computational and Graphical Statistics. Wiley Interdisciplinary Reviews: Computational Statistics. 2014 Jul;6(4):233-9.
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)
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
run_ca( data, id, group, ae_grade = NULL, ae_domain = NULL, ae_term = NULL, ae_cycle = NULL )
run_ca( data, id, group, ae_grade = NULL, ae_domain = NULL, ae_term = NULL, ae_cycle = NULL )
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 |
an interactive web application to perform correspondence analysis for adverse event data.
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) }
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) }