mddc_mc {MDDC}R Documentation

Modified Detecting Deviating Cells (MDDC) algorithm for adverse event signal identification with Monte Carlo (MC) method for cutoff selection.

Description

Modified Detecting Deviating Cells (MDDC) algorithm for adverse event signal identification. Monte Carlo (MC) method is used for cutoff selection in the second step of the algorithm.

Usage

mddc_mc(
  contin_table,
  quantile = 0.95,
  rep = 10000,
  exclude_same_drug_class = TRUE,
  col_specific_cutoff = TRUE,
  separate = TRUE,
  if_col_cor = FALSE,
  cor_lim = 0.8,
  num_cores = 2,
  seed = NULL
)

Arguments

contin_table

A data matrix of an I x J contingency table with row (adverse event) and column (drug or vaccine) names. Please first check the input contingency table using the function check_and_fix_contin_table().

quantile

In the second step of the algorithm, the quantile of the null distribution obtained via MC method to use as a threshold for identifying cells with high value of the standardized Pearson residuals. Default is 0.95.

rep

In the second step, the number of Monte Carlo replications in the MC method. Default is 10000.

exclude_same_drug_class

In the second step, when applying Fisher's exact test to cells with a count less than six, a 2 by 2 contingency table needs to be constructed. Does the construction need to exclude other drugs or vaccines in the same class as the drug or vaccine of interest? Default is TRUE.

col_specific_cutoff

Logical. In the second step of the algorithm, whether to apply MC method to the standardized Pearson residuals of the entire table, or within each drug or vaccine column. Default is TRUE, that is within each drug or vaccine column (column specific cutoff). FALSE indicates applying MC method on residuals of the entire table.

separate

Logical. In the second step of the algorithm, whether to separate the standardized Pearson residuals for the zero cells and non zero cells and apply MC method separately or together. Default is TRUE.

if_col_cor

Logical. In the third step of the algorithm, whether to use column (drug or vaccine) correlation or row (adverse event) correlation. Default is FALSE, that is using the adverse event correlation. TRUE indicates using drug or vaccine correlation.

cor_lim

A numeric value between (0, 1). In the third step, what correlation threshold should be used to select “connected” adverse events. Default is 0.8.

num_cores

Number of cores used to parallelize the MDDC MC algorithm. Default is 2.

seed

An optional integer to set the seed for reproducibility. If NULL, no seed is set.

Value

A list with the following components:

References

Liu, A., Mukhopadhyay, R., and Markatou, M. (2024). MDDC: An R and Python package for adverse event identification in pharmacovigilance data. arXiv preprint. arXiv:2410.01168

Examples

# using statin49 data set as an example
data(statin49)

# apply the mddc_mc
mc_res <- mddc_boxplot(statin49)

# signals identified in step 2 using MC method
signal_step2 <- mc_res$mc_signal

# signals identified in step 5 by considering AE correlations
# In this example, cells with p values less than 0.05 are
# identified as signals
signal_step5 <- (mc_res$corr_signal_pval < 0.05) * 1

[Package MDDC version 1.1.0 Index]