boot_predint {predint}R Documentation

Bootstrap new data from uncalibrated prediction intervals

Description

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

Usage

boot_predint(pred_int, nboot)

Arguments

pred_int

object of class c("quasiPoissonPI", "betaBinomialPI", "quasiBinomialPI", negativeBinomialPI)

nboot

number of bootstraps

Details

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

Value

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.

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.


[Package predint version 2.2.1 Index]