boot_predint | R Documentation |
boot_predint()
is a helper function to bootstrap new data from the simple
uncalibrated prediction intervals implemented in predint.
boot_predint(pred_int, nboot)
pred_int |
object of class |
nboot |
number of bootstraps |
This function only works for binomial and Poisson type data. For the sampling
of new data from random effects models see lmer_bs
.
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.
# 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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.