nse.boot: Bootstrap NSE estimators.

Description Usage Arguments Details Value References Examples

Description

Calculate the variance of the mean with a bootstrap variance estimator.

Usage

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

Arguments

x

A numeric vector or a matrix.

nb

The number of bootstrap replication.

type

The bootstrap schemes c("stationary","circular").

b

the block length. If NULL automatic block length selection.

lag.prewhite

Prewhite the serie before analysis (integer or NULL, i.e. automatic selection)

Details

Use the automatic blocksize in b.star from th np package which is based on Politis and White (2004) and Patton and al (2009). Two bootstrap schemes are available; The stationary bootstrap of Politis and Romano (1994) and the circular bootstrap of Politis and Romano (1992).

Value

The variance estimator in the univariate case or the variance-covariance matrix estimator in the multivariate case.

References

Politis, Dimitris N., and Joseph P. Romano. "A circular block-resampling procedure for stationary data." Exploring the limits of bootstrap (1992): 263-270.

Politis, Dimitris N., and Halbert White. "Automatic block-length selection for the dependent bootstrap." Econometric Reviews 23.1 (2004): 53-70.

Patton, Andrew, Dimitris N. Politis, and Halbert White. "Correction to "Automatic block-length selection for the dependent bootstrap" by D. Politis and H. White." Econometric Reviews 28.4 (2009): 372-375.

Politis, Dimitris N., and Joseph P. Romano. "The stationary bootstrap." Journal of the American Statistical association 89.428 (1994): 1303-1313.

Hayfield, Tristen, and Jeffrey S. Racine. "Nonparametric econometrics: The np package." Journal of statistical software 27.5 (2008): 1-32.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 
n    = 1000
ar   = 0.9
mean = 1
sd   = 1

set.seed(1234) 
x = as.vector(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 = "stationary", b = NULL, lag.prewhite = 1)
nse.boot(x = x, nb = 1000, type = "stationary", b = NULL, lag.prewhite = NULL)

nse.boot(x = x, nb = 1000, type = "stationary", b = 10, lag.prewhite = 0)
nse.boot(x = x, nb = 1000, type = "stationary", b = 10, lag.prewhite = 1)
nse.boot(x = x, nb = 1000, type = "stationary", b = 10, lag.prewhite = NULL)

nse.boot(x = x, nb = 1000, type = "circular", b = NULL, lag.prewhite = 0)
nse.boot(x = x, nb = 1000, type = "circular", b = NULL, lag.prewhite = 1)
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 = 0)
nse.boot(x = x, nb = 1000, type = "circular", b = 10, lag.prewhite = 1)
nse.boot(x = x, nb = 1000, type = "circular", b = 10, lag.prewhite = NULL)

braverock/nse documentation built on May 13, 2019, 5:03 a.m.