Koopman et al. (1984) suggested methods for handling extreme cases of \(y_1\), \(n_1\), \(y_2\), and \(n_2\) (see below). These are applied through exception handling here (see Aho and Bowyer 2015).
Let \(Y_1\) and \(Y_2\) be multinomial random variables with parameters \(n_1, \pi_{1i}\), and \(n_2, \pi_{2i}\), respectively; where \(i = \{1, 2, 3, \dots, r\}\). This encompasses the binomial case in which \(r = 1\). We define the true selection ratio for the ith resource of r total resources to be:
$$\theta_{i}=\frac{\pi _{1i}}{\pi _{2i}}$$
where \(\pi_{1i}\) and \(\pi_{2i}\) represent the proportional use and availability of the ith resource, respectively. If \(r = 1\) the selection ratio becomes relative risk. The maximum likelihood estimators for \(\pi_{1i}\) and \(\pi_{2i}\) are the sample proportions:
$${{\hat{\pi }}_{1i}}=\frac{{{y}_{1i}}}{{{n}_{1}}},$$ and
$${{\hat{\pi }}_{2i}}=\frac{{{y}_{2i}}}{{{n}_{2}}}$$
where \(y_{1i}\) and \(y_{2i}\) are the observed counts for use and availability for the ith resource. If \(\pi_{2i}\)s are known, the estimator for \(\theta_i\) is:
$$\hat{\theta}_{i}=\frac{\hat{\pi}_{1i}}{\pi_{2i}}.$$
The function ci.prat.ak
assumes that selection ratios are being specified (although other applications are certainly possible). Therefore it assume that \(y_{1i}\) must be greater than 0 if \(\pi_{2i} = 1\), and assumes that \(y_{1i}\) must = 0 if \(\pi_{2i} = 0\). Violation of these conditions will produce a warning message.
Agresti Coull-Adjusted