Learn R Programming

moonboot (version 1.0.1)

mboot: 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, ...)

Value

The returned value is an object of the class "mboot" containing the following components:

  • t0: The observed value of statistic applied to the data.

  • t: A matrix with R rows where each is a bootstrap replicate of the result of calling statistic.

  • m,n: Selected subsample size and data size.

  • data: The data passed to mboot.

  • statistic: The statistic passed to mboot.

  • replace: Whether the bootstrap replicates were done with or without replacement.

Arguments

data

The data to be bootstrapped. If it is multidimensional, each row is considered as one observation passed to the statistic.

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 ... argument.

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 statistic.

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).

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, tools:::Rd_expr_doi("10.1214/aos/1176325770")

See Also

mboot.ci estimate.m estimate.tau

Examples

Run this code
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)

Run the code above in your browser using DataLab