Learn R Programming

SlidingWindows (version 0.2.0)

dfa.SlidingWindows: Detrended Fluctuation Analysis with sliding windows.

Description

This function generates scaling exponents (long-range correlations) of a univariate time series with sliding windows approach.

Usage

dfa.SlidingWindows(y, w = 98, k = 10, npoints = 15)

Arguments

y

A vector containing univariate time series.

w

An integer value indicating the window size \(w < length(y)\). If \(w = length(y)\), will be computed the function will not slide.

k

An integer value indicating the boundary of the division \((N/k)\). The smallest value of \(k\) is \(4\).

npoints

The number of different time scales that will be used to estimate the Fluctuation function in each zone. See nonlinearTseries package.

Value

A list contaning "w", "alpha_dfa", "se_alpha_dfa", "r2_alpha_dfa".

Details

This function include following measures: alpha_dfa, se_alpha_dfa, r2_alpha_dfa.

References

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".

Examples

Run this code
# NOT RUN {
y <- rnorm(100)
dfa.SlidingWindows(y,w=99,k=10,npoints=15)

# }

Run the code above in your browser using DataLab