*! version 1 06dec2024
help blockboot

Title

blockboot -- Block bootstrap for dependent time series

Syntax

blockboot varlist [if] [in] ,
type(string)
prefix(string)
lblock(string)
[ seed(integer)
]

You must tsset your data before using blockboot; see [TS] tsset.

varlist contains the list of variables to be bootstrapped.

Description

blockboot implements four bootstrap schemes for dependent time series data:

nbb: Nonoverlapping block bootstrap of observations; see Carlstein (1986)

mbb: Moving block bootstrap of observations; see Künsch (1989) and Liu and Singh (1992)

cbb: Circular block bootstrap of observations; see Politis and Romano (1992)

sbb: Stationary block bootstrap of observations; see Politis and Romano (1994)

Options

type must be used to choose among the four block bootstrap schemes implemented by blockboot, namely nbb for nonoverlapping block bootstrap, mbb for moving block bootstrap, cbb for circular block bootstrap, and sbb for the stationary block bootstrap. This is a required option.

prefix can be used to provide a `stub' with which variables created in blockboot will be named.
These variables must not already exist in memory.
This is a required option.

lblock sets the length of the block of observations to bootstrap. Note that in the case of sbb, lblock corresponds to the average length of the blocks.
Setting lblock equal to 1 yields the simple bootstrap, suitable for time independent processes, while lblock greater than 1 is suitable for time dependent processes. lblock can also be specified as auto, which triggers the optimal blocklength selection mechanism following Politis and White (2004), Patton et al. (2009) and Politis and Romano (1995). This is a required option.

seed sets the seed for random number generation in the bootstrap results.

Example of use

We illustrate the use of the blockboot command using generated data. To facilitate the visualisation of the resulting bootstrapped version of the series, the variables x1 and x2 are linear trends with different initial conditions.

. clear all

. set obs 40

. gen t = _n

. tsset t

. gen x1 = t + 100

. gen x2 = t + 1000

We would like to bootstrap x1 and x2, using a circular bootstrap where the length of each block of observations is equal to 12. To replicate the bootstrap random draws the seed is provided. The prefix option is used to generate the bootstrapped versions of the variables as cx1 and cx2.

. blockboot x*, type(cbb) prefix(c) lblock(12) seed(987)

To bootstrap using automatic selection of the block length:

. blockboot x*, type(cbb) prefix(ac) lblock(auto) seed(987)

To bootstrap a subset of the original data:

. blockboot x* if tin(11,35), type(cbb) prefix(cc) lblock(12) seed(987)

Next, we would like to draw 50 bootstrap replications of the variable x1. In this example, we use a stationary bootstrap with an average length of the blocks of observations equal to 12. The prefix option is used to generate the bootstrapped versions of the variable x1 as s1x1, s2x1, ..., and s50x1:

. forvalues i = 1/50 {

. blockboot x1, type(sbb) prefix(s`i') lblock(12) seed(`=`i'+987')

. }

References

Carlstein, E. (1986). The use of subseries methods for estimating the variance of a general statistic from a stationary time series. The Annals of Statistics 14(3), 1171-1179.

Künsch, H. R. (1989). The jackknife and the bootstrap for general stationary observations. The Annals of Statistics 17, 1217-1261.

Liu, R. Y. and Singh, K. (1992). Moving blocks jackknife and bootstrap capture weak dependence, in R. Lepage and L. Billard, eds, 'Exploring the Limits of the Bootstrap', Wiley, New York, pp. 225-248.

Patton, A., Politis, D. N. and White, H. (2009). Correction to "automatic block-length selection for the dependent bootstrap" by D. Politis and H. White. Econometric Reviews 28(4), 372–375

Politis, D. N. and Romano, J. P. (1992). A circular block resampling procedure for stationary data, in R. Lepage and L. Billard, eds, 'Exploring the Limits of Bootstrap', Wiley, New York, pp. 263-270.

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

Politis, D. N. and Romano J. P. (1995). Bias-corrected nonparametric spectral estimation. Journal of Time Series Analysis 16(1), 67–103.

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

Authors

Christopher F Baum

Boston College

Chestnut Hill, MA USA

baum@bc.edu

Jesús Otero

Universidad del Rosario

Bogotá, Colombia

jesus.otero@urosario.edu.co