corr_ttest (pyleoclim.utils.correlation.corr_ttest)
- pyleoclim.utils.correlation.corr_ttest(y1, y2, alpha=0.05)[source]
Estimates the significance of correlations between 2 time series using the classical T-test adjusted for effective sample size.
The degrees of freedom are adjusted following n_eff=n(1-g)/(1+g) where g is the lag-1 autocorrelation.
- 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]
- 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 statistic exceeding the observed one by chance alone)
See also
pyleoclim.utils.correlation.corr_isopersist
Estimate Pearson’s correlation and associated significance using AR(1)
pyleoclim.utils.correlation.corr_isospec
Estimate Pearson’s correlation and associated significance using phase randomization