report_drug_AE_pairs

report_drug_AE_pairs#

MDDC.utils.report_drug_AE_pairs(contin_table, contin_table_signal, along_rows='AE', along_columns='Drug')#

Report potential adverse events for drugs/vaccines based on the contingency table.

This function analyzes the provided contingency table and signal matrix to identify potential adverse events associated with each drug/vaccine. It computes the observed counts, expected counts, and standardized Pearson residuals for each (drug/vaccine, adverse event) pair.

Parameters:#

contin_tablenumpy.ndarray, pandas.DataFrame

A data matrix representing an I x J contingency table with rows corresponding to adverse events and columns corresponding to drugs/vaccines. The row and column names of this matrix are used in the analysis. It is advisable to check the input contingency table using the function check_and_fix_contin_table() before using this function.

contin_table_signalnumpy.ndarray, pandas.DataFrame

A data matrix of the same dimensions as contin_table, with entries of either 1 (indicating a signal) or 0 (indicating no signal). This matrix should have the same row and column names as contin_table and can be obtained using the function MDDC.MDDC.mddc().

along_rowsstr, optional, default = “AE”

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

along_columnsstr, optional, default = “Drug”

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

Returns:#

Identified Drug/Vaccine-AE pairspandas.DataFrame
A DataFrame with five columns:
  • Drug : str, The name of the drug/vaccine. In case the contin_table_signal is a numpy.ndarray the Drug represents the column index.

  • AE : str, The potential adverse event associated with the drug/vaccine. n case the contin_table_signal is a numpy.ndarray the AE represents the row index.

  • Observed Count : int, The observed count of the (drug/vaccine, adverse event) pair.

  • Expected Count : float, The expected count of the (drug/vaccine, adverse event) pair.

  • Standard Pearson Residual : float, The value of the standardized Pearson residual for the (drug/vaccine, adverse event) pair.