DFA {DFA} | R Documentation |
Detrended Fluctuation Analysis (DFA)
Description
Applies the Detrended Fluctuation Analysis (DFA) to nonstationary time series.
Usage
DFA(file,scale = 2^(1/8),box_size = 4,m=1)
Arguments
file |
Univariate time series (must be a vector or data frame) |
scale |
Specifies the ratio between successive box sizes (by default |
box_size |
Vector of box sizes (must be used in conjunction with |
m |
An integer of the polynomial order for the detrending (by default |
Details
The DFA fluctuation can be computed in a geometric scale or for different choices of boxes sizes.
Value
boxe |
Size |
DFA |
Detrended Fluctuation function. |
Note
The time series file
and file2
must have the same sample size.
Author(s)
Victor Barreto Mesquita
References
C.-K. Peng, S.V. Buldyrev, S. Havlin, M. Simons, H.E. Stanley, A.L. Goldberger Phys. Rev. E, 49 (1994), p. 1685
H.E. Stanley, L.A.N. Amaral, A.L. Goldberger, S. Havlin, P.Ch. Ivanov, C.-K. Peng Physica A, 270 (1999), p. 309
P.C. Ivanov, A. Bunde, L.A.N. Amaral, S. Havlin, J. Fritsch-Yelle, R.M. Baevsky, H.E. Stanley, A.L. Goldberger Europhys. Lett., 48 (1999), p. 594
P. Talkner, R.O. Weber Phys. Rev. E, 62 (2000), p. 150
M. Ausloos, K. Ivanova Physica A, 286 (2000), p. 353
H.E. Hurst, R.P. Black, Y.M. Simaika Long-Term Storage, An Experimental Study, Constable, London (1965)
Examples
#The following examples using the database of financial time series
#collected during the United States bear market of 2007-2009.
library(DFA)
data("NYA2008")
file = NYA2008
DFA(file,scale = 2^(1/8),box_size = c(4,8,16),m=1)
# Example with different polynomial fit order.
library(DFA)
data("LSE.L2008")
file = LSE.L2008
DFA(file,scale = 2^(1/8),box_size = c(4,8,16),m=2)
# Example using different choice of overlapping boxes sizes.
library(DFA)
data("NYA2008")
file = NYA2008
DFA(file,scale = "F",box_size = c(4,8,16),m=1)