corr_isospec (pyleoclim.utils.correlation.corr_isospec)

pyleoclim.utils.correlation.corr_isospec(y1, y2, alpha=0.05, nsim=1000)[source]

Estimates the significance of the correlation using phase randomization

Estimates the significance of correlations between non IID time series by phase randomization of original inputs. This function creates ‘nsim’ random time series that have the same power spectrum as the original time series but random phases.

Parameters
  • y1 (array) – vectors of (real) numbers with identical length, no NaNs allowed

  • y2 (array) – vectors of (real) numbers with identical length, no NaNs allowed

  • alpha (float) – significance level for critical value estimation [default: 0.05]

  • nsim (int) – number of simulations [default: 1000]

Returns

  • r (float) – correlation between y1 and y2

  • signif (bool) – true (1) if significant; false (0) otherwise

  • F (float) – Fraction of time series with higher correlation coefficents than observed (approximates the p-value).

References

  • Ebisuzaki, W, 1997: A method to estimate the statistical

significance of a correlation when the data are serially correlated. J. of Climate, 10, 2147-2153.

  • Prichard, D., Theiler, J. Generating Surrogate Data for Time Series

with Several Simultaneously Measured Variables (1994) Physical Review Letters, Vol 73, Number 7 (Some Rights Reserved) USC Climate Dynamics Lab, 2012.

See also

pyleoclim.utils.correlation.corr_ttest

Estimates Pearson’s correlation and associated significance using a t-test

pyleoclim.utils.correlation.corr_isopersist

Estimates Pearson’s correlation and associated significance using AR(1) simulations