basic | R Documentation |
Implements the basic bootstrap method to construct interval estimates.
basic(sample, parameter, B = 999, siglevel = 0.05, onlyint = FALSE)
sample |
a vector of data which the user desires to bootstrap from |
parameter |
the name of a pre-defined (possibly user-written) function in quotes whose output is one value (e.g. mean, min, max, median) |
B |
number of bootstrap samples to obtain (defaults to 999 and must be less than 5000) |
siglevel |
the significance level desired for the construction of the bootstrap interval (defaults to 0.05) |
onlyint |
should the bootstrap interval alone be printed? (defaults to FALSE) |
If onlyint is set to FALSE, a histogram of the bootstrap sample statistics, with a line at the observed sample statistic, and the bootstrap interval are returned.
If onlyint is set to TRUE, only the bootstrap interval is returned as a numeric vector.
Njesa Totty
Davison, A. C., & Hinkley, D. V. (1997). Bootstrap Methods and Their Application (No. 1). Cambridge University Press.
Efron, B., & Tibshirani, R. J. (1994). An Introduction to The Bootstrap. CRC Press.
basic(sample = rnorm(100), parameter = "mean", B = 999, siglevel = 0.05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.