Random shuffle surrogates (RS)
TimeseriesSurrogates.randomshuffle
— Function.randomshuffle(ts)
Generate a random constrained surrogate for ts
. Destroys any linear correlation in the signal, but preserves its amplitude distribution.
ts
Is the time series for which to generate an AAFT surrogate realization.
The easiest way of constructing a constrained surrogate is just shuffling the time indices of the original time series. Here's an example:
using TimeseriesSurrogates
# Generate a time series. Here, we'll use an AR1 process.
ts = AR1()
# Generate a random shuffle surrogate realization
surrogate = randomshuffle(ts)
# Plot the surrogate along with the time series it is based on, along with autocorrelation
# and periodogram plots.
surrplot(ts, surrogate)