boot_predint function

Bootstrap new data from uncalibrated prediction intervals

Bootstrap new data from uncalibrated prediction intervals

boot_predint() is a helper function to bootstrap new data from the simple uncalibrated prediction intervals implemented in predint.

boot_predint(pred_int, nboot)

Arguments

  • pred_int: object of class c("quasiPoissonPI", "betaBinomialPI", "quasiBinomialPI",negativeBinomialPI)
  • nboot: number of bootstraps

Returns

boot_predint returns an object of class c("predint", "bootstrap")

which is a list with two entries: One for bootstrapped historical observations and one for bootstrapped future observations.

Details

This function only works for binomial and Poisson type data. For the sampling of new data from random effects models see lmer_bs.

Examples

# Simple quasi-Poisson PI test_pi <- qp_pi(histoffset=c(3,3,3,4,5), newoffset=3, lambda=10, phi=3, q=1.96) # Draw 5 bootstrap samles test_boot <- boot_predint(pred_int = test_pi, nboot=50) str(test_boot) summary(test_boot) # Please note that the low number of bootstrap samples was chosen in order to # decrease computing time. For valid analysis draw at least 10000 bootstrap samples.
  • Maintainer: Max Menssen
  • License: GPL (>= 2)
  • Last published: 2024-03-04