Detrended fluctuation analysis
Description
Performs a detrended fluctuation analysis (DFA) and estimates the scaling exponent from the results. DFA is used to characterize long memory dependence in stochastic fractal time series.
Usage
1 2 3 
Arguments
x 
a vector containing a uniformlysampled realvalued time series. 
detrend 
a character string denoting the type of detrending to use on each block of the time series. Supported types are:
Default: 
overlap 
the overlap of blocks in partitioning the time data
expressed as a fraction in [ 0,1). A positive overlap will slow down the
calculations slightly with the (possible) effect of generating less biased
results. Default: 
scale.max 
an integer denoting the maximum block size to use in partitioning
the data. Default: 
scale.min 
an integer denoting the minimum block size to use in partitioning
the data. Default: for polynomial detrending the default value is
2*(K+1). For all other detrending techniques, the default value is
4 or 
scale.ratio 
the ratio of successive scales. This argument is used as an input
to the 
sum.order 
an integer denoting the number of differences or
cumulative summations to perform on the original data before performing
a DFA. Differences are specified by negative integers and cumulative summations
by positive integers. For example, to perform a second order difference, set

verbose 
a logical value. If 
Details
The DFA algorithm is implemented as follows:
 1
DFA is useful for characterizing longmemory correlations in stochastic fractal time series, i.e. sequences whose spectral density function S(f) obeys a power law S~f^alpha at low frequencies where 0 <= f <= 1/2 is the normalized frequency variable and alpha <= 1 is the long memory (scaling) exponent. If the scaling exponent for an original time series is alpha > 1, then (possibly multiple) cumulative summations of the original time series must be performed to increase the scaling exponent (each cumulative summation decreases the exponent by 2). For example, a (single) cumulative summation must be performed on a white noise realization since its scaling exponent is zero. We also provide the user with the ability to perform (consecutive) first order differencing operations on the original time series prior to a DFA. Each differencing operation raises the scaling exponent by 2. Differencing a series is acceptable prior to DFA as long as the resulting scaling exponent is less than 1.
 2
The series resulting from stage one is uniformly partitioned into blocks of a specified minimum size
(scale.min)
, and each block is (optionally) detrended. The variance of the detrended sequence in each block is calculated and the collection of variances is averaged to form the scalar value F^2(scale.min)
which summarizes the variability of the sequence at the current scale. 3
Stage two is repeated using successively larger blocks until the largest scale
(scale.max)
has been reached. 4
For longmemory processes, we expect to find a linear relation between log F(scale) and log scale. The slope of the line which best fits a plot of log F(scale) versus log scale is defined as the scaling exponent.
Value
an object of class fractalBlock
.
References
Peng CK, Buldyrev SV, Havlin S, Simons M, Stanley HE, and Goldberger AL (1994), Mosaic organization of DNA nucleotides, Physical Review E, 49, 1685–1689.
Peng CK, Havlin S, Stanley HE, and Goldberger AL (1995), Quantification of scaling exponents and crossover phenomena in nonstationary heartbeat time series, Chaos, 5, 82–87.
Goldberger AL, Amaral LAN, Glass L, Hausdorff JM, Ivanov PCh, Mark RG, Mietus JE, Moody GB, Peng CK, Stanley HE (2000, June 13), PhysioBank, PhysioToolkit, and Physionet: Components of a New Research Resource for Complex Physiologic Signals, Circulation, 101(23), e215e220.
See Also
logScale
, fractalBlock
.
Examples
1 2 3 4 5 6 7 8 9 