fastcohtest {wsyn} | R Documentation |
Fast algorithm for significance testing coherence using Fourier surrogates
Description
This is the algorithm of Sheppard et al. (2017) (see references).
Usage
fastcohtest(
dat1,
dat2,
scale.min,
scale.max.input,
sigma,
f0,
nrand,
randnums,
randbits,
norm
)
Arguments
dat1 |
A locations (rows) x time (columns) matrix (for spatial coherence), or a single time series |
dat2 |
Same format as |
scale.min |
The smallest scale of fluctuation that will be examined. At least 2. |
scale.max.input |
The largest scale of fluctuation guaranteed to be examined |
sigma |
The ratio of each time scale examined relative to the next timescale. Should be greater than 1. |
f0 |
The ratio of the period of fluctuation to the width of the envelope |
nrand |
Number of surrogate randomizations to use for significance testing |
randnums |
A bunch of independent random numbers uniformly distributed on (0,1).
There must be |
randbits |
A bunch of random bits (0 or 1). There must be |
norm |
The normalization of wavelet transforms to use. Controls the version of the
coherence that is performed. One of "none", "powall", "powind". See details in
the documentation of |
Value
fastcohtest
returns a list with these elements:
timescales |
The timescales used |
coher |
The magnitude of this is the fast-algorithm version of the coherence between
the two datasets, for comparison with |
scoher |
A matrix with |
Note
Internal function, minimal error checking.
Author(s)
Lawrence Sheppard, lwsheppard@ku.edu; Daniel Reuman, reuman@ku.edu
References
Sheppard, L.W., et al. (2017) Rapid surrogate testing of wavelet coherences. European Physical Journal, Nonlinear and Biomedical Physics, 5, 1. DOI: 10.1051/epjnbp/2017000