| surrog {wsyn} | R Documentation | 
Creates surrogate time series, either Fourier surrogates or amplitude adjusted Fourier surrogates
Description
For significance testing wavelet coherence and other purposes
Usage
surrog(dat, nsurrogs, surrtype, syncpres)
Arguments
dat | 
 A locations x time matrix of observations (for multiple-time series input), or a single vector  | 
nsurrogs | 
 The number of surrogates to produce  | 
surrtype | 
 Either "fft" (for Fourier surrogates) or "aaft" (for amplitude adjusted Fourier surrogates). Fourier surrogates are appropriate for time series with normal marginals; otherwise consider aaft surrogates.  | 
syncpres | 
 Logical. TRUE for "synchrony preserving" surrogates (same phase randomizations used for all time series). FALSE leads to independent phase randomizations for all time series.  | 
Details
Fourier surrogates are somewhat faster than aaft surrogates, and may be much faster when 
some of the time series in the data have ties. Prenormalization (e.g., using cleandat) can 
make it possible to use fft surrogates.
Value
surrog returns a list of nsurrogs surrogate datasets
Author(s)
Jonathan Walter, jaw3es@virginia.edu; Lawrence Sheppard, lwsheppard@ku.edu; Daniel Reuman, reuman@ku.edu
References
Sheppard, LW, et al. (2016) Changes in large-scale climate alter spatial synchrony of aphid pests. Nature Climate Change. DOI: 10.1038/nclimate2881
Schreiber, T and Schmitz, A (2000) Surrogate time series. Physica D 142, 346-382.
Prichard, D and Theiler, J (1994) Generating surrogate data for time series with several simultaneously measured variables. Physical Review Letters 73, 951-954.
See Also
wpmf, coh, wlmtest, synmat,
browseVignettes("wsyn")
Examples
times<-1:100
dat<-sin(2*pi*times/10)
nsurrogs<-10
surrtype<-"fft"
syncpres<-TRUE
res<-surrog(dat,nsurrogs,surrtype,syncpres)