powered by
Boostrap using given data and statistic
bootstrap(fun, data, h0, nreps, conf.level = 0.95, verbose = 1)
function to calculate on each sample. This can be a user-defined function that takes in data as a vector and returns a statistic.
data to use for bootstrapping. Should be a respresentative sample
null hypothesis value
number of times to bootstrap
confidence value
default is 1 which will create a graph. To turn this off use verbose = 0.
results from boostrapping. A vector of length @param nreps containing each statistic calculated
# NOT RUN { x <- rnorm(100) bootstrap(mean, x, 0.5, 1000, verbose = 0) bootstrap(mean, x, 0.5, 1000) # }
Run the code above in your browser using DataLab