DFA {mvDFA} | R Documentation |
Analyze univariate time series and estimate long memory using Detrended Fluctuations Analysis (DFA; Peng et al., 1995)
Description
Analyze univariate time series and estimate long memory using Detrended Fluctuations Analysis (DFA; Peng et al., 1995)
Usage
DFA(X, steps = 50, brownian = FALSE, degree = 1, verbose = TRUE, cores = 1)
Arguments
X |
Univariate time series. |
steps |
Maximum number of window sizes. These are spread logarithmically. If time series is short and steps is large, fewer window sizes are drawn. Default to |
brownian |
Indicator whether time series is assumed to be brownian (i.e. variance increases proportional to time) |
degree |
The maximum order of the detrending polynomial in the segments. This influences the smallest window size |
verbose |
Indicator whether additional info should be printed. Default to |
cores |
Number of cores used in computation. Default to |
Value
Returns list of Root Mean Squares per window size RMS_s
, the window sizes S
and the estimated long memory coefficient L
- the Hurst Exponent.
References
Peng, C. K., Havlin, S., Stanley, H. E., & Goldberger, A. L. (1995). Quantification of scaling exponents and crossover phenomena in nonstationary heartbeat time-series. Chaos, 5, 82–87. <doi:10.1063/1.166141>
Examples
X <- rnorm(500) # generate Gaussian white noise (i.i.d. standard normal variables)
DFA(X = X, steps = 5) # steps = 5 is only for demonstration,
# use many steps instead, e.g. steps = 50!