Learn R Programming

nse (version 1.21)

nse.boot: Bootstrap estimator

Description

Function which calculates the numerical standard error with bootstrap estimator.

Usage

nse.boot(x, nb, type = c("stationary", "circular"), b = NULL, lag.prewhite = 0)

Value

The NSE estimator.

Arguments

x

A numeric vector.

nb

The number of bootstrap replications.

type

The bootstrap scheme used, among "stationary" and "circular". Default is type = "stationary".

b

The block length for the block bootstrap. If NULL automatic block length selection. Default is b = NULL.

lag.prewhite

Prewhite the series before analysis (integer or NULL). When lag.prewhite = NULL this performs automatic lag selection. Default is lag.prewhite = 0 that is no prewhitening.

Author

David Ardia and Keven Bluteau

References

Politis, D.N., Romano, and J.P. (1992). A circular block-resampling procedure for stationary data. In Exploring the limits of bootstrap, John Wiley & Sons, 263-270.

Politis, D.N., Romano, and J.P. (1994). The stationary bootstrap. Journal of the American Statistical Association 89(428), 1303-1313.

Politis, D.N., White, H. (2004). Automatic block-length selection for the dependent bootstrap. Econometric Reviews 23(1), 53-70.

Examples

Run this code
if (FALSE) {
n    = 1000
ar   = 0.9
mean = 1
sd   = 1

set.seed(1234)
x = c(arima.sim(n = n, list(ar = ar), sd = sd) + mean)

set.seed(1234)
nse.boot(x = x, nb = 1000, type = "stationary", b = NULL, lag.prewhite = 0)
nse.boot(x = x, nb = 1000, type = "circular", b = NULL, lag.prewhite = NULL)
nse.boot(x = x, nb = 1000, type = "circular", b = 10, lag.prewhite = NULL)
}

Run the code above in your browser using DataLab