studentized: Construct Studentized Bootstrap Intervals

View source: R/Functions.R

studentizedR Documentation

Construct Studentized Bootstrap Intervals

Description

Implements the studentized bootstrap method to construct interval estimates.

Usage

studentized(sample, parameter, B = 999, siglevel = 0.05, onlyint = FALSE, M = 25)

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)

M

the number of second level bootstraps (defaults to 25; must be between 15 and 50)

onlyint

should the bootstrap interval alone be printed? (defaults to FALSE)

Value

If onlyint is set to FALSE, (1) a histogram of the bootstrap sample statistics, with a line at the observed sample statistic, (2) a histogram of the studentized bootstrap sample statistics, and (3) the bootstrap interval are all 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


studentized(sample = rnorm(100), parameter = "median", B = 999, siglevel = 0.05, M = 25)


tottyn/bootEd documentation built on Oct. 12, 2024, 7:47 a.m.