# SurrogateData: Simulation of surrogates for a given time series x, subject... In WaveletComp: Computational Wavelet Analysis

## Description

It simulates a surrogate for the time series x to be analyzed by wavelet transformation using either function `analyze.wavelet` or function `analyze.coherency`. A set of surrogates is used for significance assessment to test the hypothesis of equal periodic components.

Simulation is subject to model/method specification and parameter setting: Currently, one can choose from a variety of 6 methods (white noise, series shuffling, Fourier randomization, AR, and ARIMA) with respective lists of parameters to set.

The name and layout were inspired by a similar function developed by Huidong Tian (archived R package `WaveletCo`).

## Usage

 ```1 2 3 4``` ```SurrogateData(x, method = "white.noise", params = list( AR = list(p = 1), ARIMA = list(p = 1, q = 1, include.mean = TRUE, sd.fac = 1, trim = FALSE, trim.prop = 0.01))) ```

## Arguments

 `x` the given time series
`method`

the method of generating surrogate time series; select from:

 `"white.noise"` : white noise `"shuffle"` : shuffling the given time series `"Fourier.rand"` : time series with a similar spectrum `"AR"` : AR(p) `"ARIMA"` : ARIMA(p,0,q)

Default: `"white.noise"`.

`params`

a list of assignments between methods (AR, and ARIMA) and lists of parameter values applying to surrogates. Default: `NULL`.

Default includes:

`AR = list(p = 1)`,
where:

 `p` : AR order

`ARIMA = list(p = 1, q = 1, include.mean = TRUE, sd.fac = 1,`
`trim = FALSE, trim.prop = 0.01)`,
where:

 `p` : AR order `q` : MA order `include.mean` : Include a mean/intercept term? `sd.fac` : magnification factor to boost the residual standard deviation `trim` : Simulate trimmed data? `trim.prop` : high/low trimming proportion

## Value

A surrogate series for x is returned which has the same length and properties according to estimates resulting from the model/method specification and parameter setting.

## Author(s)

Angi Roesch and Harald Schmidbauer; credits are also due to Huidong Tian.

## References

Tian, H., and Cazelles, B., 2012. `WaveletCo`. Available at https://cran.r-project.org/src/contrib/Archive/WaveletCo/, archived April 2013; accessed July 26, 2013.

`analyze.wavelet`, `analyze.coherency`, `AR`, `ARIMA`, `FourierRand`