powered by
Performs a Bayesian bootstrap for a statistic defined via a suitable function.
bayes.boot(x, fun, nboot = 1000, cluster = NULL, ...)
An object of class bayes.boot; a data frame with the following columns:
bayes.boot
the bootstrap iteration index
any columns returned by fun
fun
a numeric vector to be passed as the first argument to fun
the function to bootstrap; must accept data x and weights w (in that order), and return a data frame
x
w
the number of bootstraps to perform
an optional cluster for running bootstraps in parallel; must be set up using parallel::makeCluster
parallel::makeCluster
any other arguments for fun
Ryan Thompson <ryan.thompson-1@uts.edu.au>
set.seed(123) boot <- bayes.boot(MASS::galaxies, fun = fit.family, nboot = 100) head(boot)
Run the code above in your browser using DataLab