climpred.stats.corr¶
-
climpred.stats.
corr
(x, y, dim='time', lag=0, return_p=False)[source]¶ Computes the Pearson product-moment coefficient of linear correlation.
Note
This version calculates the effective degrees of freedom, accounting for autocorrelation within each time series that could fluff the significance of the correlation.
Parameters: - x (xarray object) – Independent variable time series or grid of time series.
- y (xarray object) – Dependent variable time series or grid of time series
- dim (optional str) – Correlation dimension
- lag (optional int) – Lag to apply to correlaton, with x predicting y.
- return_p (optional bool) – If True, return correlation coefficients as well as p values.
Returns: Pearson correlation coefficients If return_p True, associated p values.
References
- Wilks, Daniel S. Statistical methods in the atmospheric sciences. Vol. 100. Academic press, 2011.
- Lovenduski, Nicole S., and Nicolas Gruber. “Impact of the Southern Annular Mode on Southern Ocean circulation and biology.” Geophysical Research Letters 32.11 (2005).