# Bootstrapping time series

This example from Efron and Tibshirani’s Introduction to the Bootstrap.

Given a zero-centered time series $z_1, \ldots, z_N$, a first order autoregressive scheme is as follows:

$z_t = \beta z_{t-1} + \epsilon_t$

Or in words: the observed value at time t is a multiple of the time before plus some random error.

Using least squares or maximum likelihood, one can find an estimate $\hat{\beta}$ for $\beta$.

Then a bootstrap accuracy of $\hat{\beta}$ can be carried out by drawing bootstrap replicates from the empirical distribution of $\hat{F} = \{ \hat{\epsilon}_2, \ldots, \hat{\epsilon}_N \}$.  These ‘approximate distrubances’ can be calculated as:

$\hat{\epsilon}_t = z_t - \hat{\beta}^* z_{t-1}$

Then a new bootstrap time series $z^*$ is given by:

$z^*_1 = z_1$

$z^*_t = \hat{\beta}^* z^*_{t-1} + \epsilon^*$   (t = 2, \ldots, N)

Where $\epsilon^*$ is drawn from $\hat{F}$.

The bootstrapped time series using the first order autoregressive scheme resembles the original time series much more than simply bootstrapping the original $z_t$.

R script for this simulation