corr_isopersist (pyleoclim.utils.correlation.corr_isopersist)
- pyleoclim.utils.correlation.corr_isopersist(y1, y2, alpha=0.05, nsim=1000)[source]
Computes the Pearson’s correlation between two timeseries, and their significance using Ar(1) modeling.
The significance is gauged via a non-parametric (Monte Carlo) simulation of correlations with nsim AR(1) processes with identical persistence properties as x and y ; the measure of which is the lag-1 autocorrelation (g).
- 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 x and y
signif (bool) – true (1) if significant; false (0) otherwise
pval (float) – test p-value (the probability of the test statstic exceeding the observed one by chance alone)
Notes
The probability of obtaining a test statistic at least as extreme as the one actually observed, assuming that the null hypothesis is true. The test is 1 tailed on |r|: Ho = { |r| = 0 }, Ha = { |r| > 0 } The test is rejected (signif = 1) if pval <= alpha, otherwise signif=0; (Some Rights Reserved) Hepta Technologies, 2009 v1.0 USC, Aug 10 2012, based on corr_signif.
See also
pyleoclim.utils.correlation.corr_ttest
Estimates Pearson’s correlation and associated significance using a t-test.
pyleoclim.utils.correlation.corr_isospec
Estimates Pearson’s correlation and associated significance using