ar.boot | R Documentation |
Performs a nonparametric bootstrap to obtain the distribution of the AR model parameters.
ar.boot(series, order.ar, nboot = 500, seed = NULL, plot = TRUE, col = 5)
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 |
col |
color used in the display |
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.
Returned invisibly:
phi.star |
bootstrapped AR parameters |
x.sim |
bootstrapped data |
D.S. Stoffer
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/.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.