Skip to contents

Calculates Reporting Odds Ratio ("ROR") and confidence intervals, used in disproportionality analysis.

Usage

ror(a = NULL, b = NULL, c = NULL, d = NULL, conf_lvl = 0.95)

Arguments

a

Number of reports for the specific drug and event (i.e. the observed count).

b

Number of reports with the drug, without the event

c

Number of reports without the drug, with the event

d

Number of reports without the drug, without the event

conf_lvl

Confidence level of confidence or credibility intervals. Default is 0.95 (i.e. 95 % confidence interval).

Value

A tibble with three columns (point estimate and credibility bounds). Number of rows equals length of inputs a, b, c, d.

Details

The ROR is an odds ratio calculated from reporting counts. The R for Reporting in ROR is meant to emphasize an interpretation of reporting, as the ROR is calculated from a reporting database. Note: the function is vectorized, i.e. a, b, c and d can be vectors, see the examples.

A reporting odds ratio is simply an odds ratio based on adverse event reports. $$\hat{ROR} = \frac{a/b}{c/d}$$

where \(a\) = observed count (i.e. number of reports with exposure and outcome), \(b\) = number of reports with the drug and without the event, \(c\) = number of reports without the drug with the event and \(d\) = number of reports with neither of the drug and the event.

A confidence interval for the ROR can be derived through the delta method, with a standard deviation:

$$\hat{s} = \sqrt{1/a + 1/b + 1/c + 1/d}$$

with the resulting confidence interval for significance level \(\alpha\)

$$[\hat{ROR} \times exp(\Phi_{\alpha/2} \times \hat{s}), \hat{ROR} \times exp(\Phi_{1-\alpha/2} \times \hat{s})]$$

References

Montastruc J, Sommet A, Bagheri H, Lapeyre-Mestre M (2011). “Benefits and strengths of the disproportionality analysis for identification of adverse drug reactions in a pharmacovigilance database.” British Journal of Clinical Pharmacology, 72(6), 905--908. doi:10.1111/j.1365-2125.2011.04037.x , https://doi.org/10.1111/j.1365-2125.2011.04037.x.

Examples


ror(
  a = 5,
  b = 10,
  c = 20,
  d = 10000
)
#> # A tibble: 1 × 3
#>   ror2.5   ror ror97.5
#>    <dbl> <dbl>   <dbl>
#> 1   78.4   250    797.

# Note that a, b, c and d can be vectors (of equal length, no recycling)
pvda::ror(
  a = c(5, 10),
  b = c(10, 20),
  c = c(15, 30),
  d = c(10000, 10000)
)
#> # A tibble: 2 × 3
#>   ror2.5   ror ror97.5
#>    <dbl> <dbl>   <dbl>
#> 1  102.   333.   1092.
#> 2   72.0  167.    386.