surrogate.ts: Create surrogate time series via Markov process

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Create surrogate time series with the same short-term time correlation and overall temporal pattern as the original time series using the Markov process described by Cazelles and Stones (2003)

Usage

1
surrogate.ts (ts, distr.ts = NULL, trans.ts = NULL, nbreaks = 10)

Arguments

ts

time series in matrix format (n rows x 2 columns). The first column should contain the time steps and the second column should contain the values. If ts is a column vector instead of a matrix, then it will be automatically converted to a matrix with column 1 corresponding to a time index ranging from 1 to the length of ts

distr.ts

binning of time series values. This parameter must be specified if trans.ts is not set to NULL. Default is NULL.

trans.ts

transition matrix from bin i to bin j. Default is NULL.

nbreaks

number of bins to use to group the time series values. Default is 10.

Details

The values of the time series x_n are grouped into nbreak equally-sized bins. The transition matrix M_{ij} describing the probability of x_{n+1} belonging to bin j based on x_n belonging to bin i is defined using the relative frequencies of the data such that: M_{ij}=Pr(x_{n+1} \in b_{j} | x_{n} \in b_{i}). The surrogate time series is then constructed by randomly selecting a starting value and randomly selecting the next value from the proper bin based on the transition matrix. This process is repeated until the surrogate time series has the same length as the original time series.

Value

Returns a named list containing:

surr.ts

surrogate time series in matrix format

trans

transition matrix M_{ij}

distr

binning of time series values

Author(s)

Tarik C. Gouhier (tarik.gouhier@gmail.com)

References

Cazelles, B., and L. Stone. 2003. Detection of imperfect population synchrony in an uncertain world. Journal of Animal Ecology 72:953-968.

See Also

phase.sync

Examples

1
2
3
4
t1=runif(100)
surr.t1=surrogate.ts(ts=t1)
plot(t1, t="l")
lines(surr.t1$surr.ts, col="red")

Example output

synchrony 0.3.7 loaded.

synchrony documentation built on March 26, 2020, 7:14 p.m.