Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/Srho.ts_files.R

Starting from a time series `x`

given as input, the function generates surrogate series by means of the sieve bootstrap.
The surrogates can be used for testing for non linearity in time series.

1 2 | ```
surrogate.AR(x, order.max = 10, fit.method = c("yule-walker",
"burg", "ols", "mle", "yw"), nsurr)
``` |

`x` |
a univariate numeric time series object or a numeric vector. |

`order.max` |
maximum order of the AR model to fit. |

`fit.method` |
character string giving the method used to fit the AR model. Must be one of the strings in the default argument (the first few characters are sufficient). Defaults to "yule-walker". |

`nsurr` |
number of surrogates. |

`N`

is the length of the series `x`

. The best AR model is chosen by means of the AIC criterion. The residuals of the model are
resampled with replacement. Surrogate series are obtained by driving the fitted model with the resampled residuals.

A list with the following elements:

`surr` |
a matrix with |

`call` |
contains the call to the routine. |

Simone Giannerini<[email protected]>

Giannerini S., Maasoumi E., Bee Dagum E., (2015), Entropy testing
for nonlinear serial dependence in time series, *Biometrika*, **102(3)**, 661–675
http://doi.org/10.1093/biomet/asv007.

Buhlmann, P., (1997). Sieve bootstrap for time series.
*Bernoulli*, **3**, 123–148.

See also `surrogate.AR`

, `Trho.test.AR`

, `surrogate.SA`

, `Trho.test.SA`

.

1 2 3 4 5 6 7 8 9 10 11 | ```
set.seed(1345)
# Generates a AR(1) series
x <- arima.sim(n=120, model = list(ar=0.8));
x.surr <- surrogate.AR(x, order.max=10, nsurr=3);
plot.ts(x.surr$surr,col=4);
## Check that the surrogates have the same ACF of x
corig <- acf(x,10,plot=FALSE)$acf[,,1];
csurr <- acf(x.surr$surr[,1],10,plot=FALSE)$acf[,,1];
round(cbind(corig,csurr,"abs(difference)"=abs(corig-csurr)),3)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.