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 B that contains the expected future observations. Each entry in this list has to be a numeric vector of length M.

pred_se

a list of length B that contains the standard errors of the prediction. Each entry in this list has to be a numeric vector of length M.

y_star

a list of length B that contains the future observations. Each entry in this list has to be a numeric vector of length M.

alternative

either "both", "upper" or "lower". alternative specifies if a prediction interval or an upper or a lower prediction limit should be computed

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 (1-\alpha)

traceplot

if TRUE: Plot for visualization of the bisection process

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


[Package predint version 2.2.1 Index]