Description Usage Arguments Details Value Author(s) References Examples
Compute the phase synchrony between two quasi-periodic time series by quantifying their phase difference at each time step
1 2 |
t1 |
time series 1 in matrix format ( |
t2 |
time series 2 in matrix format ( |
nrands |
number of randomizations to perform (default is 0) |
mod |
flag to indicate whether to compute phase difference modulus 2π
between 0 and 2π ( |
method |
method to generate surrogate time series for Monte Carlo simulations.
This can be set to |
nbreaks |
number of bins to use to group the values in the time series.
Default is |
quiet |
Suppress progress bar when set to |
mins |
use local minima instead of local maxima to compute and the interpolate the phase. Default is
|
Two time series are phase-locked if the relationship between their phases remains constant over time. This function computes the phase of successive local maxima or minima for each time series and then uses linear interpolation to find the phase at time steps that fall between local maxima/minima. A histogram can be used to determine if the distribution of the phase difference at each time step is uniform (indicating no phase locking) or has a clear peak (indicating phase locking).
Returns a list containing Q.obs
, pval
, rands
,
phases1
, phases2
, deltaphase
, and icdf
:
Q.obs |
Phase synchrony ranging from 0 (no phase synchrony) to 1 (full phase synchrony) |
pval |
p-value of observed phase synchrony based on randomization test |
rands |
Monte Carlo randomizations |
phases1 |
|
phases2 |
|
deltaphase |
|
icdf |
Inverse cumulative distribution of Q values obtained from Monte Carlo randomizatons |
Tarik C. Gouhier (tarik.gouhier@gmail.com)
Cazelles, B., and L. Stone. 2003. Detection of imperfect population synchrony in an uncertain world. Journal of Animal Ecology 72:953–968.
Theiler, J., S. Eubank, A. Longtin, B. Galdrikian, and J. Doyne Farmer. 1992. Testing for nonlinearity in time series: the method of surrogate data. Physica D: Nonlinear Phenomena 58:77–94.
1 2 3 4 5 6 7 8 | t1=runif(100)
t2=runif(100)
# Compute and interpolate phases using successive local minima
sync.mins=phase.sync(t1, t2, mins=TRUE)
# Compute and interpolate phases using successive local maxima
sync.maxs=phase.sync(t1, t2)
# Plot distribution of phase difference
hist(sync.mins$deltaphase$mod_phase_diff_2pi)
|
synchrony 0.2.3 loaded.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.