Wikipedia / Detrended fluctuation analysis
Wikipedia / Detrended fluctuation analysis
In stochastic processes, chaos theory and time series analysis, detrended fluctuation analysis (DFA) is a method for determining the statistical self-affinity of a signal. It is useful for analysing time series that appear to be long-memory processes (diverging correlation time, e.g. power-law decaying autocorrelation function) or 1/f noise.
The obtained exponent is similar to the Hurst exponent, except that DFA may also be applied to signals whose underlying statistics (such as mean and variance) or dynamics are non-stationary (changing with time). It is related to measures based upon spectral techniques such as autocorrelation and Fourier transform.
Peng et al. introduced DFA in 1994 in a paper that has been cited over 3,000 times as of 2022 and represents an extension of the (ordinary) fluctuation analysis (FA), which is affected by non-stationarities.
Systematic studies of the advantages and limitations of the DFA method were performed by PCh Ivanov et al. in a series of papers focusing on the effects of different types of nonstationarities in real-world signals: (1) types of trends; (2) random outliers/spikes, noisy segments, signals composed of parts with different correlation; (3) nonlinear filters; (4) missing data; (5) signal coarse-graining procedures and comparing DFA performance with moving average techniques (cumulative citations > 4,000). Datasets generated to test DFA are available on PhysioNet.
Definition
Algorithm
Given: a time series.
.
. This is the cumulative sum, or profile, of the original time series. For example, the profile of an i.i.d. white noise is a standard random walk.
. In other words, it is approximately a geometric progression.
. Within each segment, compute the least squares straight-line fit (the local trend be the resulting piecewise-linear fit.
Compute the root-mean-square deviation from the local trend (local fluctuationAnd their root-mean-square is the total fluctuation:
, then one can either discard the remainder of the sequence, or repeat the procedure on the reversed sequence, then take their root-mean-square.)
Make the log-log plot.
Interpretation
on the log-log plot indicates a statistical self-affinity.
is a generalization of the Hurst exponent, with the precise value giving information about the series self-correlations:
: anti-correlated
: uncorrelated, white noise
: correlated
: 1/f-noise, pink noise
: non-stationary, unbounded
Because the expected displacement in an uncorrelated random walk would correspond to uncorrelated white noise. When the exponent is between 0 and 1, the result is fractional Gaussian noise.
Pitfalls in interpretation
for any time series, it does not necessarily imply that the time series is self-similar. Self-similarity. Furthermore, a combination of techniques including maximum likelihood estimation (MLE), rather than least-squares has been shown to better approximate the scaling, or power-law, exponent.
Also, there are many scaling exponent-like quantities that can be measured for a self-similar time series, including the divider dimension and Hurst exponent is not a fractal dimension, and does not have certain desirable properties that the Hausdorff dimension has, though in certain special cases it is related to the box-counting dimension for the graph of a time series.
Generalizations
Generalization to polynomial trends (higher order DFA)
The standard DFA algorithm given above removes a linear trend in each segment. If we remove a degree-n polynomial trend in each segment, it is called DFAn, or higher order DFA.
before quantifying the fluctuation.
, and so on.
The Hurst R/S analysis removes constant trends in the original sequence and thus, in its detrending it is equivalent to DFA1.
Generalization to different moments (multifractal DFA)
..
. Essentially, the scaling exponents need not be independent of the scale of the system. In particular, DFA measures the scaling-behavior of the second moment-fluctuations.
for nonstationary cases.
Applications
The DFA method has been applied to many systems, e.g. DNA sequences; heartbeat dynamics in sleep and wake, sleep stages, rest and exercise, and across circadian phases; locomotor gate and wrist dynamics, neuronal oscillations, speech pathology detection, and animal behavior pattern analysis.
Relations to other methods, for specific types of signal
For signals with power-law-decaying autocorrelation
In the case of power-law decaying auto-correlations, the correlation function. In addition the power spectrum. The three exponents are related by:
and
.
The relations can be derived using the Wiener–Khinchin theorem. The relation of DFA to the power spectrum method has been well studied.
and is used to describe the color of noise.
For fractional Gaussian noise
For fractional Gaussian noise is the Hurst exponent.
For fractional Brownian motion
For fractional Brownian motion is the Hurst exponent. In this context, FBM is the cumulative sum or the integral of FGN, thus, the exponents of their power spectra differ by 2.
See also
References
External links
Tutorial on how to calculate detrended fluctuation analysis in Matlab using the Neurophysiological Biomarker Toolbox
FastDFA MATLAB code for rapidly calculating the DFA scaling exponent on very large datasets
Physionet A good overview of DFA and C code to calculate it.
MFDFA Python implementation of (multifractal) detrended fluctuation analysis