The PRR is the proportion of reports with an event in set of exposed
cases, divided with the proportion of reports with the event in a background
or comparator, which does not include the exposed.
The PRR is estimated from a observed-to-expected ratio, based on
similar to the RRR and IC, but excludes the exposure of interest from the
comparator.
$$\hat{PRR} = \frac{\hat{O}}{\hat{E}}$$
where \(\hat{O}\) is the observed number of reports, and expected \(\hat{E}\)
is estimated as
$$\hat{E} = \frac{\hat{N}_{drug} \times (\hat{N}_{event} - \hat{O})}{\hat{N}_{TOT}-\hat{N}_{drug}}$$
where \(\hat{N}_{drug}\), \(\hat{N}_{event}\), \(\hat{O}\) and \(\hat{N}_{TOT}\) are
the number of reports with the drug, the event, the drug and event, and
in the whole database respectively.
A confidence interval is derived in Gravel (2009) using the delta method:
$$\hat{s} = \sqrt{ 1/\hat{O} - 1/(\hat{N}_{drug}) + 1/(\hat{N}_{event} - \hat{O}) - 1/(\hat{N}_{TOT} - \hat{N}_{drug})}$$
and $$[\hat{CI}_{\alpha/2}, \hat{CI}_{1-\alpha/2}] = $$
$$[\frac{\hat{O}}{\hat{E}} \times \exp(Q_{\alpha/2} \times \hat{s}),
\frac{\hat{O}}{\hat{E}} \times \exp(Q_{1-\alpha/2} \times \hat{s})]$$
where \(Q_{\alpha}\) denotes the quantile function of a
standard Normal distribution at significance level \(\alpha\).
Note: For historical reasons, another version of this standard deviation is sometimes used
where the last fraction under the square root is added rather than subtracted,
with negligible practical implications in large databases. This function uses the version
declared above, i.e. with subtraction.