Title: | Methods for Time Series Analysis |
---|---|
Description: | A collection of functions to perform Detrended Fluctuation Analysis (DFA exponent), GUEDES et al. (2019) <doi:10.1016/j.physa.2019.04.132> , Detrended cross-correlation coefficient (RHODCCA), GUEDES & ZEBENDE (2019) <doi:10.1016/j.physa.2019.121286>, DMCA cross-correlation coefficient and Detrended multiple cross-correlation coefficient (DMC), GUEDES & SILVA-FILHO & ZEBENDE (2018) <doi:10.1016/j.physa.2021.125990>, both with sliding windows approach. |
Authors: | Everaldo Freitas Guedes [aut, cre]
|
Maintainer: | Everaldo Freitas Guedes <[email protected]> |
License: | GPL-3 |
Version: | 0.2.0 |
Built: | 2025-02-28 05:02:01 UTC |
Source: | https://github.com/cran/SlidingWindows |
This function generates descriptive statistics of a univariate time series with sliding windows approach.
descritive.SlidingWindows(y, w = 99, skewness = "moment", kurtosis = "moment")
descritive.SlidingWindows(y, w = 99, skewness = "moment", kurtosis = "moment")
y |
A vector containing univariate time series. |
w |
An integer value indicating the window size |
skewness |
A non-numeric value. See PerformanceAnalytics package. |
kurtosis |
A non-numeric value. See PerformanceAnalytics package. |
This function include following measures: min, max, mean, median, standard deviation, skewness and kurtosis.
A list containing "w", "min","max","mean", "median", "standard deviation","skewness" and "kurtosis".
Guedes, E.F. Modelo computacional para análise de movimentos e co-movimentos de mercados financeiros, Ph.D. thesis, Programa de Pós-graduação em Modelagem Computacional e Tecnologia Industrial. Centro Universitário Senai Cimatec, 2019.
y <- rnorm(100) descritive.SlidingWindows(y, w=99, skewness="moment", kurtosis="moment")
y <- rnorm(100) descritive.SlidingWindows(y, w=99, skewness="moment", kurtosis="moment")
This function generates scaling exponents (long-range correlations) of a univariate time series with sliding windows approach.
dfa.SlidingWindows(y, w = 98, k = 10, npoints = 15)
dfa.SlidingWindows(y, w = 98, k = 10, npoints = 15)
y |
A vector containing univariate time series. |
w |
An integer value indicating the window size |
k |
An integer value indicating the boundary of the division |
npoints |
The number of different time scales that will be used to estimate the Fluctuation function in each zone. See nonlinearTseries package. |
This function include following measures: alpha_dfa, se_alpha_dfa, r2_alpha_dfa.
A list contaning "w", "alpha_dfa", "se_alpha_dfa", "r2_alpha_dfa".
GUEDES, E.F.;FERREIRA, P.;DIONISIO, A.; ZEBENDE,G.F. An econophysics approach to study the effect of BREXIT referendum on European Union stock markets. PHYSICA A, v.523, p.1175-1182, 2019. doi = "doi.org/10.1016/j.physa.2019.04.132".
FERREIRA, P.; DIONISIO, A.;GUEDES, E.F.; ZEBENDE, G.F. A sliding windows approach to analyse the evolution of bank shares in the European Union. PHYSICA A, v.490, p.1355-1367, 2018. doi = "doi.org/10.1016/j.physa.2017.08.095".
y <- rnorm(100) dfa.SlidingWindows(y,w=99,k=10,npoints=15)
y <- rnorm(100) dfa.SlidingWindows(y,w=99,k=10,npoints=15)
This function generates DMC Coefficient of three time series with sliding windows approach.
dmc.SlidingWindows(x1, x2, y, w = 98, k = 10, method = "rhodcca", nu = 0)
dmc.SlidingWindows(x1, x2, y, w = 98, k = 10, method = "rhodcca", nu = 0)
x1 |
A vector containing univariate time series. |
x2 |
A vector containing univariate time series. |
y |
A vector containing univariate time series. |
w |
An integer value indicating the window size |
k |
An integer value indicating the boundary of the division |
method |
A character string indicating which correlation coefficient is to be used. If method = "rhodcca" (default) the dmc coefficient is generated from the DCCA coefficient. If method = "dmca", the dmc coefficient is generated from the DMCA coefficient. |
nu |
An integer value. See the DCCA package. |
This function include following measures: w, timescale, dmc and cross-correlation between: yx1, yx2, x1x2
A list containing "w", "dmc", "yx1", "yx2", "x1x2".
ZEBENDE, G.; SILVA-FILHO, A.M. Detrended multiple cross-correlation coefficient, Physica A 510, 91-97, 2018. doi="doi.org/10.1016/j.physa.2018.06.119".
GUEDES,E.F.;SILVA-FILHO, A.M.; ZEBENDE, G.F. Detrended multiple cross-correlation coefficient with sliding windows approach. Physica A, 125990, 2021. doi="doi.org/10.1016/j.physa.2021.125990".
x1 <- rnorm(100) x2 <- rnorm(100) y <- rnorm(100) dmc.SlidingWindows(x1,x2,y,w=99,k=10,nu=0, method="rhodcca") dmc.SlidingWindows(x1,x2,y,w=99,k=10,nu=0, method="dmca")
x1 <- rnorm(100) x2 <- rnorm(100) y <- rnorm(100) dmc.SlidingWindows(x1,x2,y,w=99,k=10,nu=0, method="rhodcca") dmc.SlidingWindows(x1,x2,y,w=99,k=10,nu=0, method="dmca")
This function generates Detrending moving-average cross-correlation coefficient of two time series with sliding windows approach.
dmca.SlidingWindows(x, y, w = 98, k = 10)
dmca.SlidingWindows(x, y, w = 98, k = 10)
x |
A vector containing univariate time series. |
y |
A vector containing univariate time series. |
w |
An integer value indicating the window size |
k |
An integer value indicating the boundary of the division |
This function include following measures: w, timescale, dmca
A list containing "w", "timescale", "dmca".
KRISTOUFEK, L. Detrending moving-average cross-correlation coefficient: Measuring cross-correlations between non-stationary series. PHYSICA A, v.406, p.169-175, 2014. doi="doi.org/10.1016/j.physa.2014.03.015".
x <- rnorm(100) y <- rnorm(100) dmca.SlidingWindows(x,y,w=99,k=10)
x <- rnorm(100) y <- rnorm(100) dmca.SlidingWindows(x,y,w=99,k=10)
This function computes approximate entropy of a univariate time series with sliding windows approach.
entropy.SlidingWindows(y, w = 99, k = 4, dim = 2, r = 0.5, lag = 1)
entropy.SlidingWindows(y, w = 99, k = 4, dim = 2, r = 0.5, lag = 1)
y |
A vector containing univariate time series. |
w |
An integer value indicating the window size |
k |
An integer value indicating the boundary of the division |
dim |
The dimension of given time series. See TSEntropies package. |
r |
The radius of searched areas. See TSEntropies package. |
lag |
The downsampling. See TSEntropies package. |
This function return the list with time series sliding windows.
A list contaning "w", "ApEn", "FastApEn".
Pincus, S.M. (1991). Approximate entropy as a measure of system complexity. Proc. Natl. Acad. Sci. USA, Vol. 88, pp. 2297–2301. doi="doi.org/10.1073/pnas.88.6.2297".
y <- rnorm(100) entropy.SlidingWindows(y, w=99, k=4, dim=2, r=.2,lag=1)
y <- rnorm(100) entropy.SlidingWindows(y, w=99, k=4, dim=2, r=.2,lag=1)
This function generates Detrended Cross-Correlation Coefficient of two time series with sliding windows approach.
rhodcca.SlidingWindows(x, y, w = 98, k = 10, nu = 0)
rhodcca.SlidingWindows(x, y, w = 98, k = 10, nu = 0)
x |
A vector containing univariate time series. |
y |
A vector containing univariate time series. |
w |
An integer value indicating the window size |
k |
An integer value indicating the boundary of the division |
nu |
An integer value. See DCCA package. |
This function include following measures:
w, timescale, rhodcca
A list containing "w", "timescale", "rhodcca".
GUEDES, E.F.; ZEBENDE, G.F. DCCA cross-correlation coefficient with sliding windows approach. PHYSICA A, v.527, p.121286, 2019. doi="doi.org/10.1016/j.physa.2010.10.022".
ZEBENDE, G.F. DCCA cross-correlation coefficient: Quantifying level of cross-correlation, Physica A, v. 390, n. 4, p. 614-618, 2011. doi="doi.org/10.1016/j.physa.2019.121286".
x <- rnorm(100) y <- rnorm(100) rhodcca.SlidingWindows(x,y,w=99,k=10,nu=0)
x <- rnorm(100) y <- rnorm(100) rhodcca.SlidingWindows(x,y,w=99,k=10,nu=0)
This function generates sliding windows approach of a time series.
SlidingWindows(y, w = 99)
SlidingWindows(y, w = 99)
y |
A vector containing univariate time series. |
w |
An integer value indicating the window size |
This function return the matrix with time series sliding windows.
A list containing "w", "SlidingWindows".
Guedes, E.F. Modelo computacional para análise de movimentos e co-movimentos de mercados financeiros, Ph.D. thesis, Programa de Pós-graduação em Modelagem Computacional e Tecnologia Industrial. Centro Universitário Senai Cimatec, 2019.
y <- rnorm(100) SlidingWindows(y,w=99)
y <- rnorm(100) SlidingWindows(y,w=99)