phase.partnered function

Phase partnered time series

Phase partnered time series

Create two time series with specific autocorrelation γ\gamma, cross-correlation ρ\rho, mean ts.mean, and standard deviation ts.sd using the phase partnered algorithm described by Vasseur (2007)

phase.partnered (n = 2000, rho = 1, gamma = 1, sigma = 0.1, mu = 0)

Arguments

  • n: number of time steps in time series. Default is 2000.
  • rho: cross-correlation between the two time series (1ρ1-1\le \rho \le 1). Default is 1.
  • gamma: autocorrelation of each time series. Gamma (γ\gamma) describes the relationship between frequency ff and power PP: P(f)=1/fγP(f)=1/f^\gamma. If 2γ0-2\le \gamma \le 0: blue noise and 0γ20\le \gamma \le 2: red noise. Default is 1.
  • sigma: standard deviation of both time series. Default is 0.1.
  • mu: mean of both time series. Default is 0.

Returns

Returns a named list containing the following:

  • rho: Cross-correlation of the time series

  • gamma: Autocorrelation of the time series

  • sigma: Standard deviation of the time series

  • mu: Mean of the time series

  • timeseries: n x 2 matrix containing the time series

References

Gouhier, T. C., F. Guichard, and A. Gonzalez. 2010. Synchrony and stability of food webs in metacommunities. The American Naturalist 175:E16-E34.

Vasseur, D. A. 2007. Environmental colour intensifies the Moran effect when population dynamics are spatially heterogeneous. Oikos 116:1726-1736.

Author(s)

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

Examples

# Positively cross-correlated white noise pos.corr=phase.partnered(n = 100, rho = 0.7, gamma = 0) # Negatively cross-correlated white noise neg.corr=phase.partnered(n = 100, rho = -1, gamma = 0) par(mfrow=c(2,1)) matplot (pos.corr$timeseries, t="l", lty=1) matplot (neg.corr$timeseries, t="l", lty=1)