Learn R Programming

MDDC (version 1.1.0)

report_drug_AE_pairs: Report the potential adverse events for drugs from contingency table

Description

Report the potential adverse events for drugs from contingency table

Usage

report_drug_AE_pairs(
  contin_table,
  contin_table_signal,
  along_rows = "AE",
  along_cols = "Drug"
)

Value

A data frame with five variables:

  • drug the drug name.

  • AE the potential adverse event for the drug or vaccine.

  • observed_num the observed count of the (drug or vaccine, AE) pair.

  • expected_num the expected count of the (drug or vaccine , AE) pair.

  • std_pearson_res the value of the standardized Pearson residual.

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

contin_table_signal

A data matrix with the same dimension and row and column names as contin_table, with entries either 1 (indicating signal) or 0 (indicating non-signal). This data matrix can be obtained via applying the function mddc_boxplot or mddc_mc.

along_rows

Specifies the content along the rows of the contin_table (e.g. AE or Drug).

along_cols

Specifies the content along the columns of the contin_table (e.g. AE or Drug).

Examples

Run this code
# load statin49 data
data(statin49)

# run mddc boxplot method
test1 <- mddc_boxplot(statin49)

# get the signals from step 2
contin_table_signal <- test1$boxplot_signal

# get the signals from step 5
contin_table_signal_corr <- test1$corr_signal_pval < 0.05

# identify the (drug, AE) signals for step 2
result_1 <- report_drug_AE_pairs(
  contin_table = statin49,
  contin_table_signal = contin_table_signal
)
result_1

# identify the (drug, AE) signals for step 5
result_2 <- report_drug_AE_pairs(
  contin_table = statin49,
  contin_table_signal = contin_table_signal_corr
)
result_2

Run the code above in your browser using DataLab