Report the potential adverse events for drugs from contingency table
Source:R/report_drug_AE_pairs.R
report_drug_AE_pairs.Rd
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"
)
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 functionmddc_boxplot
ormddc_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).
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.
Examples
# 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
#> drug AE observed_num
#> 1 Atorvastatin Rhabdomyolysis 2041
#> 2 Atorvastatin Myalgia 5362
#> 3 Atorvastatin Myopathy 849
#> 4 Atorvastatin Necrotising Myositis 279
#> 5 Atorvastatin Blood Creatine Phosphokinase Increased 1175
#> 6 Fluvastatin Myalgia 341
#> 7 Fluvastatin Myopathy 64
#> 8 Fluvastatin Blood Creatine Phosphokinase Increased 125
#> 9 Lovastatin Myopathy 45
#> 10 Pravastatin Rhabdomyolysis 163
#> 11 Pravastatin Muscle Rupture 61
#> 12 Pravastatin Myalgia 939
#> 13 Pravastatin Myopathy 145
#> 14 Pravastatin Blood Creatine Phosphokinase Increased 200
#> 15 Rosuvastatin Rhabdomyolysis 936
#> 16 Rosuvastatin Muscle Disorder 191
#> 17 Rosuvastatin Muscular Weakness 808
#> 18 Rosuvastatin Myalgia 2757
#> 19 Rosuvastatin Myopathy 377
#> 20 Rosuvastatin Blood Creatine Phosphokinase Increased 562
#> 21 Rosuvastatin Blood Creatine Phosphokinase Mm Increased 9
#> 22 Simvastatin Rhabdomyolysis 1376
#> 23 Simvastatin Muscular Weakness 859
#> 24 Simvastatin Myalgia 3216
#> 25 Simvastatin Myopathy 544
#> 26 Simvastatin Necrotising Myositis 52
#> 27 Simvastatin Blood Creatine Phosphokinase Increased 768
#> 28 Other Other AE 61703817
#> expected_num std_pearson_res
#> 1 112.0567 182.5555
#> 2 483.119 222.5852
#> 3 26.9011 158.7594
#> 4 1.916 200.4873
#> 5 82.2769 120.6793
#> 6 14.0537 87.3237
#> 7 0.7825 71.4713
#> 8 2.3934 79.2713
#> 9 0.4402 67.1676
#> 10 12.7651 42.0686
#> 11 1.2801 52.795
#> 12 55.0353 119.3226
#> 13 3.0645 81.0995
#> 14 9.3727 62.2901
#> 15 69.5139 104.0555
#> 16 15.174 45.183
#> 17 219.6389 39.7736
#> 18 299.7007 142.2533
#> 19 16.688 88.2922
#> 20 51.0401 71.604
#> 21 0.0478 40.9642
#> 22 48.5064 190.7859
#> 23 153.2629 57.0958
#> 24 209.1296 208.3192
#> 25 11.6448 156.1188
#> 26 0.8294 56.2256
#> 27 35.6155 122.8288
#> 28 61678483.2716 228.1052
# 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
#> drug AE observed_num
#> 1 Atorvastatin Necrotising Myositis 279
#> 2 Fluvastatin Muscle Rupture 25
#> 3 Fluvastatin Musculoskeletal Discomfort 18
#> 4 Fluvastatin Myoglobinuria 4
#> 5 Lovastatin Musculoskeletal Discomfort 15
#> 6 Pravastatin Muscle Rupture 61
#> 7 Rosuvastatin Muscle Disorder 191
#> 8 Rosuvastatin Muscular Weakness 808
#> 9 Rosuvastatin Blood Creatine Phosphokinase Mm Increased 9
#> 10 Simvastatin Muscular Weakness 859
#> 11 Simvastatin Necrotising Myositis 52
#> expected_num std_pearson_res
#> 1 1.916 200.4873
#> 2 0.3269 43.1584
#> 3 1.8315 11.9498
#> 4 0.0302 22.827
#> 5 1.0302 13.7657
#> 6 1.2801 52.795
#> 7 15.174 45.183
#> 8 219.6389 39.7736
#> 9 0.0478 40.9642
#> 10 153.2629 57.0958
#> 11 0.8294 56.2256