NonParRolCor-package: Non-parametric statistical significance test for rolling...

NonParRolCor-packageR Documentation

Non-parametric statistical significance test for rolling window correlation

Description

'NonParRolCor' estimates and plots as a single plot and as a heat map the rolling window correlation coefficients and their statistical significance between two regular (sampled on identical time points) time series. The statistical significance is computed through a non-parametric computing-intensive method (Telford 2013, Polanco-Martínez and López-Martínez 2021). This method (test) address the effects due to the multiple testing problem (inflation of the Type I error) when the statistical significance is estimated for rolling correlation coefficients. The method is based on Monte Carlo simulations by permuting one (e.g., the dependent) of the variables under analysis and keeping fixed the other (e.g., the independent) variable. We improve the computational efficiency of this method to reduce the computation time through parallel computing. It has been designed especially for environmental (climate and ecological) data although this can be applied to other kinds of data sets as well. 'NonParRolCor' contains four functions: (1) 'rolcor_estim_1win' and (2) 'rolcor_estim_heatmap' to estimate the rolling window correlation coefficients and their respective statistical significance for only one window-length and for all possible window-lengths; (3) 'plot_rolcor_estim_heatmap' and (4) 'plot_rolcor_estim_heatmap' to plot the time series under analysis and the correlation coefficients that are statistically significant for only one window-length as a simple plot and for all possible window-lengths as a heat map, respectively. The functions contained in 'NonParRolCor' are highly flexible since these contains several parameters to control the estimation of correlation and the features of the plots of the time series, e.g., to remove potential linear trend contained in the time series under analysis or to personalise the plot of the time series under analysis. The 'NonParRolCor' package also provides examples with synthetic ('syntheticdata' data set) and real-life environmental ('ecodata' data sets) time series to exemplify its use.

Details

Package: NonParRolCor
Type: Package
Version: 0.8
Date: 2020-10-30
License: GPL (>= 2)
LazyLoad: yes

NonParRolCor package contains four functions: (1) rolcor_estim_1win and (2)
rolcor_estim_heatmap that estimate the rolling window correlation coefficients and their respective statistical significance for only one window-length and for all possible window-lengths, respectively; (3) plot_rolcor_estim_1win and (4) plot_rolcor_estim_heatmap that plots the time series under scrutiny and that create a simple plot and a heat map of the rolling window correlation coefficients that are statistically significant, respectively. NonParRolCor also contains three data sets: (1) syntheticdata, (2) ecodata and (3) ecodata2 to exemplify the use of the aforementioned functions. The significance test is based on and inspired from Telford (2013) and Polanco-Martínez (2019) whereas the simple plots and heat maps are based on Polanco-Martínez (2020). The non-parametric statistical significance test is described in detail in Polanco-Martínez and López-Martínez (2021).

Note

Dependencies: stat, gtools, pracma, colorspace, scales, foreach, parallel, doParallel.

Author(s)

Josué M. Polanco-Martínez (a.k.a. jomopo).
Excellence Unit GECOS, IME, Universidad de Salamanca, Salamanca, SPAIN.
BC3 - Basque Centre for Climate Change, Leioa, SPAIN.
Web1: https://scholar.google.es/citations?user=8djLIhcAAAAJ&hl=en/.
Web2: https://www.researchgate.net/profile/Josue-Polanco-Martinez/.
Email: josue.m.polanco@gmail.com
José L. López-Martínez.
Faculty of Mathematics, Universidad Autónoma de Yucatán (UADY), Tizimín, MEXICO.
Web1: https://scholar.google.es/citations?user=552PKVEAAAAJ&hl=es/.
Web2: https://www.researchgate.net/profile/Jose-Lopez-Martinez-3/.
Email: jose.lopez@correo.uady.mx.

Acknowledgement:
The first author acknowledges to the SEPE (Spanish Public Service of Employment) and to the Excellence Unit GECOS (reference number CLU-2019-03), Universidad de Salamanca for its funding support. Special thanks to The Donegal Irish Pub (Portugalete) to provide space for research and code.

References

Polanco-Martínez, J. M. and López-Martínez, J.M. (2021). A non-parametric method to test the statistical significance in rolling window correlations, and applications to ecological time series. Ecological Informatics 60, 101379. <URL: doi: 10.1016/j.ecoinf.2021.101379>.

Polanco-Martínez, J. M. (2020). RolWinMulCor: an R package for estimating rolling window multiple correlation in ecological time series. Ecological Informatics, 60, 101163. <URL: doi: 10.1016/j.ecoinf.2020.101163>.

Polanco-Martínez, J. M. (2019). Dynamic relationship analysis between NAFTA stock markets using nonlinear, nonparametric, non-stationary methods. Nonlinear Dynamics, 97(1), 369-389. <URL: doi: 10.1007/s11071-019-04974-y>.

Telford, R.: Running correlations – running into problems. (2013). <URL:
https://quantpalaeo.wordpress.com/2013/01/04/>.


NonParRolCor documentation built on Oct. 31, 2022, 1:06 a.m.