surrogates {RTisean}R Documentation

Making surrogate data

Description

Reads data from a file and creates surrogate data with the same Fourier amplitudes and the same distribution of values.

Usage

surrogates(series, n = 1, i, S = FALSE, I, l, x = 0, m, c)

Arguments

series a vector or a matrix.
n number of surrogates.
i number of iterations.
S make spectrum exact rather than distribution.
I seed for random numbers.
l number of points.
x number of values to be skipped.
m number of columns to be read.
c columns to be read.

Details

If c is chosen larger than 1, multivariate surrogates are prepared. In that case, also the relative Fourier phases of the channels are matched to those of the data. Since for finite length, distribution and spectral properties cannot be guaranteed exactly at the same time, the default output contains the iteration stage with the exact amplitudes. With the parameter S set, the stage with the exact spectrum (resp. relative phases) is given. Asymptotically, the difference between both should converge to zero. It is advisable to select a suitable sub-sequence to minimize end effects by using endtoend before preparing surrogates

Value

A vector or a matrix containing the surrogate data as columns.

References

T. Schreiber and A. Schmitz, Improved surrogate data for nonlinearity tests, Phys. Rev. Lett. 77, 635 (1996).

See Also

endtoend

Examples


## Not run: 
dat <- logistic(1000)
surr <- surrogates(dat)
Z <- cbind(dat,surr)[1:100,]
colnames(Z) <- c("data","surrogate")
plot.ts(Z,  mar.multi = c(0, 5.1, 1, 2.1 ),main="Logistic model time series")
## End(Not run)


[Package RTisean version 3.0.10 Index]