bisection function

Bisection algorithm for bootstrap calibration of prediction intervals

Bisection algorithm for bootstrap calibration of prediction intervals

This helper function returns a bootstrap calibrated coefficient for the calculation of prediction intervals (and limits).

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 BB that contains the expected future observations. Each entry in this list has to be a numeric vector of length MM.
  • pred_se: a list of length BB that contains the standard errors of the prediction. Each entry in this list has to be a numeric vector of length MM.
  • y_star: a list of length BB that contains the future observations. Each entry in this list has to be a numeric vector of length MM.
  • 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α1-\alpha)
  • traceplot: if TRUE: Plot for visualization of the bisection process

Returns

This function returns qcalibq^{calib} in the equation above.

Details

This function is an implementation of the bisection algorithm of Menssen and Schaarschmidt 2022. It returns a calibrated coefficient qcalibq^{calib} for the calculation of pointwise and simultaneous prediction intervals

[l,u]=y^m±qcalibse^(Ymym), [l,u] = \hat{y}^*_m \pm q^{calib} \hat{se}(Y_m - y^*_m),

lower prediction limits

l=y^mqcalibse^(Ymym) l = \hat{y}^*_m - q^{calib} \hat{se}(Y_m - y^*_m)

or upper prediction limits

u=y^m+qcalibse^(Ymym) u = \hat{y}^*_m + q^{calib} \hat{se}(Y_m - y^*_m)

that cover all of m=1,...,Mm=1, ... , M future observations.

In this notation, y^m\hat{y}^*_m are the expected future observations for each of the mm future clusters, qcalibq^{calib} is the calibrated coefficient and se^(Ymym)\hat{se}(Y_m - y^*_m)

are the standard errors of the prediction.

References

Menssen and Schaarschmidt (2022): Prediction intervals for all of M future observations based on linear random effects models. Statistica Neerlandica.

tools:::Rd_expr_doi("10.1111/stan.12260")

  • Maintainer: Max Menssen
  • License: GPL (>= 2)
  • Last published: 2024-03-04