mboot {moonboot} | R Documentation |
m-Out-of-n Bootstrap Implementation
Description
Generate R
bootstrap replicates of the given statistic
applied to the data
.
Sampling can be done with or without replacement.
The subsample size m can either be chosen directly or estimated with estimate.m()
.
Usage
mboot(data, statistic, m, R = 1000, replace = FALSE, ...)
Arguments
data |
The data to be bootstrapped. If it is multidimensional, each row is considered as one observation passed to the |
statistic |
A function returing the statistic of interest. It must take two arguments. The first argument passed will be the original data, the second
will be a vector of indicies. Any further arguments can be passed through the |
m |
The subsampling size. |
R |
The number of bootstrap replicates. |
replace |
Whether sampling should be done with replacement or without replacement (the default). |
... |
Additional parameters to be passed to the |
Details
m
needs to be a numeric value meeting the condition 2<=m<=n
.
It must be chosen such that m goes to infinity as n goes to infinits,
but the ratio m/n must go to zero.
The m-out-of-n Bootstrap without replacement, known as subsampling, was introduced by Politis and Romano (1994).
Value
The returned value is an object of the class "mboot"
containing the following components:
t0: The observed value of
statistic
applied to thedata
.t: A matrix with
R
rows where each is a bootstrap replicate of the result of callingstatistic
.m,n: Selected subsample size and data size.
data: The
data
passed tomboot
.statistic: The
statistic
passed tomboot
.replace: Whether the bootstrap replicates were done with or without replacement.
References
Politis D.N. and Romano J.P. (1994) Large sample confidence regions based on subsamples under minimal assumptions. The Annals of Statistics, 22(4):2031-2050, doi:10.1214/aos/1176325770
See Also
mboot.ci estimate.m estimate.tau
Examples
data <- runif(1000)
estimate.max <- function(data, indices) {return(max(data[indices]))}
boot.out <- mboot(data, estimate.max, R = 1000, m = 2*sqrt(NROW(data)), replace = FALSE)