This function returns bootstrap-calibrated prediction intervals as well as
lower or upper prediction limits.
If algorithm
is set to "MS22", both limits of the prediction interval
are calibrated simultaneously using the algorithm described in Menssen and
Schaarschmidt (2022), section 3.2.4. The calibrated prediction interval is given
as
$$[l,u]_m = n^*_m \hat{\pi} \pm q^{calib} \hat{se}(Y_m - y^*_m)$$
where
$$\hat{se}(Y_m - y^*_m) = \sqrt{\hat{\phi} n^*_m \hat{\pi} (1- \hat{\pi}) +
\frac{\hat{\phi} n^{*2}_m \hat{\pi} (1- \hat{\pi})}{\sum_h n_h}}$$
with \(n^*_m\) as the number of experimental units in the future clusters,
\(\hat{\pi}\) as the estimate for the binomial proportion obtained from the
historical data, \(q^{calib}\) as the bootstrap-calibrated coefficient,
\(\hat{\phi}\) as the estimate for the dispersion parameter
and \(n_h\) as the number of experimental units per historical cluster.
If algorithm
is set to "MS22mod", both limits of the prediction interval
are calibrated independently from each other. The resulting prediction interval
is given by
$$[l,u] = \Big[n^*_m \hat{\pi} - q^{calib}_l \hat{se}(Y_m - y^*_m), \quad
n^*_m \hat{\pi} + q^{calib}_u \hat{se}(Y_m - y^*_m) \Big]$$
Please note, that this modification does not affect the calibration procedure, if only
prediction limits are of interest.