## Surrogate data

Purpose

Description

Tips

Macro Synopsis

Modules

References

### Purpose

Generation of surrogate data

### Description

This function generates a surrogate signal out of the given data, i.e. a signal with similar spectral properties, by phase randomizing.
The surrogate data sequence has the same mean, the same variance, the same autocorrelation function and therefore the same power spectrum as the original sequence, but (nonlinear) phase relations are destroyed. In the case of data shuffling (see below), the histograms of the surrogate sequence and the reference sequence are identical, too.

Input parameter is

- the
`way` the random phase spectrum is generated:
- "Random phase" (0), where the complex phase values of the Fourier transformed input signal are chosen randomly,
- "Phase shuffle" (1), where the phase values of the original spectrum are used in random order, or
- "Data shuffle" (2), where the phase values of the original spectrum are used in random order (see above) and the sorted values of the surrogate sequence are substituted by the corresponding sorted values of the reference sequence additionally.

### Tips

Data shuffling usually leads to more reliable results due to a better adaptation of the statistic properties of the surrogate sequence to the reference sequence.

### Macro Synopsis

`y = Surrogate(x,way);`

signal x,y;

option way;

### Modules

Student, Professional

### References

Theiler et al. [57]