basic: Construct Basic Bootstrap Intervals

Description Usage Arguments Value Author(s) References Examples

View source: R/Functions.R

Description

Implements the basic bootstrap method to construct interval estimates.

Usage

1
basic(sample, parameter, B = 999, siglevel = 0.05, onlyint = FALSE)

Arguments

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)

Value

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.

Author(s)

Njesa Totty

References

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.

Examples

1
basic(sample = rnorm(100), parameter = "mean", B = 999, siglevel = 0.05)

tottyn/bootEd documentation built on Feb. 10, 2022, 2:48 a.m.