surrogate.ts {synchrony} | R Documentation |
Create surrogate time series via Markov process
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
surrogate.ts (ts, distr.ts = NULL, trans.ts = NULL, nbreaks = 10)
Arguments
ts |
time series in matrix format ( |
distr.ts |
binning of time series values. This parameter must be specified
if |
trans.ts |
transition matrix from bin |
nbreaks |
number of bins to use to group the time series values. Default is |
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 |
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
Examples
t1=runif(100)
surr.t1=surrogate.ts(ts=t1)
plot(t1, t="l")
lines(surr.t1$surr.ts, col="red")