ca_ae {visae}R Documentation

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(magrittr)
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)


[Package visae version 0.2.0 Index]