View source: R/surrogate.data.R
FFTsurrogate | R Documentation |
Generates surrogate samples from the original time series.
FFTsurrogate(time.series, n.samples = 1)
time.series |
The original time.series from which the surrogate data is generated. |
n.samples |
The number of surrogate data sets to generate, |
This function uses the phase randomization procedure for generating the surrogated data. This algorithm generates surrogate data with the same mean and autocorrelation function (and thus, the same power spectrum because of the Wiener-Khinchin theorem) as the original time series.
The phase randomization algorithm is often used when the null hypothesis being tested consist on the assumption that the time.series data comes from a stationary linear stochastic process with Gaussian inputs. The phase randomization preserves the Gaussian distribution.
A matrix containing the generated surrogate data (one time series per row).
Constantino A. Garcia
H. Kantz and T. Schreiber: Nonlinear Time series Analysis (Cambridge university press)
## Not run:
# generate 20 surrogate sets using as original time series
# an arma(1,1) simulation
time.series = arima.sim(list(order = c(1,0,1), ar = 0.6, ma = 0.5), n = 200)
surrogate = FFTsurrogate(time.series, 20)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.