bisection {predint} | R Documentation |
Bisection algorithm for bootstrap calibration of prediction intervals
Description
This helper function returns a bootstrap calibrated coefficient for the calculation of prediction intervals (and limits).
Usage
bisection(
y_star_hat,
pred_se,
y_star,
alternative,
quant_min,
quant_max,
n_bisec,
tol,
alpha,
traceplot = TRUE
)
Arguments
y_star_hat |
a list of length |
pred_se |
a list of length |
y_star |
a list of length |
alternative |
either "both", "upper" or "lower".
|
quant_min |
lower start value for bisection |
quant_max |
upper start value for bisection |
n_bisec |
maximal number of bisection steps |
tol |
tolerance for the coverage probability in the bisection |
alpha |
defines the level of confidence ( |
traceplot |
if |
Details
This function is an implementation of the bisection algorithm of Menssen
and Schaarschmidt 2022. It returns a calibrated coefficient q^{calib}
for the
calculation of pointwise and simultaneous prediction intervals
[l,u] = \hat{y}^*_m \pm q^{calib} \hat{se}(Y_m - y^*_m),
lower prediction limits
l = \hat{y}^*_m - q^{calib} \hat{se}(Y_m - y^*_m)
or upper prediction limits
u = \hat{y}^*_m + q^{calib} \hat{se}(Y_m - y^*_m)
that cover all of m=1, ... , M
future observations.
In this notation, \hat{y}^*_m
are the expected future observations for each of
the m
future clusters, q^{calib}
is the
calibrated coefficient and \hat{se}(Y_m - y^*_m)
are the standard errors of the prediction.
Value
This function returns q^{calib}
in the equation above.
References
Menssen and Schaarschmidt (2022): Prediction intervals for all of M future
observations based on linear random effects models. Statistica Neerlandica.
doi:10.1111/stan.12260