ar.boot {astsa}R Documentation

Bootstrap Distribution of AR Model Parameters

Description

Performs a nonparametric bootstrap to obtain the distribution of the AR model parameters.

Usage

ar.boot(series, order.ar, nboot = 500, seed = NULL, plot = TRUE, col = 5)

Arguments

series

time series data (univariate only)

order.ar

autoregression order - must be specified

nboot

number of bootstrap iterations (default is 500)

seed

seed for the bootstrap sampling (defalut is NULL)

plot

if TRUE (default) and order.ar > 1, returns a scatterplot matrix of the bootstrapped parameters, - the diagonals of the matrix show a histogram (or just a histogram if the order is 1) with the 2.5%, 50%, and 97.5% quantiles marked

col

color used in the display

Details

For a specified series, finds the bootstrap distribution of the Yule-Walker estimates of \phi_1,\dots,\phi_p in the AR model specified by order.ar,

x_t = \mu + \phi_1 (x_{t-1}-\mu) + \dots + \phi_p (x_{t-p}-\mu) + w_t ,

where w_t is white noise. The data are centered by the estimate of \mu prior to the bootstrap simulations.

The script displays a number of quantiles of the bootstrapped estimates, the means, the biases, and the root mean squared errors.

Value

Returned invisibly:

phi.star

bootstrapped AR parameters

x.sim

bootstrapped data

Author(s)

D.S. Stoffer

References

You can find demonstrations of astsa capabilities at FUN WITH ASTSA.

The most recent version of the package can be found at https://github.com/nickpoison/astsa/.

In addition, the News and ChangeLog files are at https://github.com/nickpoison/astsa/blob/master/NEWS.md.

The webpages for the texts and some help on using R for time series analysis can be found at https://nickpoison.github.io/.

Examples

## Not run: 

u = ar.boot(rec, 2)
head(u[[1]])       # some booted AR parameters
head(u[[2]][,1:5]) # some booted data

## End(Not run)

[Package astsa version 2.1 Index]