Description Usage Arguments Details Value References Examples
Calculate the variance of the mean with a bootstrap variance estimator.
1 |
x |
A numeric vector or a matrix. |
nb |
The number of bootstrap replication. |
type |
The bootstrap schemes c("stationary","circular"). |
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).
The variance estimator in the univariate case or the variance-covariance matrix estimator in the multivariate case.
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
n = 1000
ar = c(0.9,0.6)
mean = c(1,5)
sd = c(10,2)
nb = 100
Ts1 = as.vector(arima.sim(n = n, list(ar = ar[1]), sd = sd[1]) + mean[1])
Ts2 = as.vector(arima.sim(n = n, list(ar = ar[2]), sd = sd[2]) + mean[2])
Ts = cbind(Ts1,Ts2)
nse::nse.boot(x = Ts1, nb = nb, type = "stationary")
nse::nse.boot(x = Ts, nb = nb, type = "stationary")
nse::nse.boot(x = Ts1, nb = nb, type = "circular")
nse::nse.boot(x = Ts, nb = nb, type = "circular")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.