Lably
Skip to content

Detrended fluctuation analysis

Method to detect power-law scaling in time series

  • 5 min read
  • 4 chapters

Related on Lably

Through Stochastic process, Time series and Self-similarity

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 x1,x2,...,xN.

Compute its average value ⟨x⟩=1N∑t=1Nxt.

Sum it into a process Xt=∑i=1t(xi−⟨x⟩). 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.

Select a set T={n1,...,nk} of integers, such that n1<n2<⋯<nk, the smallest n1≈4, the largest nk≈N/4<ref></ref>, and the sequence is roughly distributed evenly in log-scale: log⁡(n2)−log⁡(n1)≈log⁡(n3)−log⁡(n2)≈⋯. In other words, it is approximately a geometric progression.

For each n∈T, divide the sequence Xt into consecutive segments of length n. Within each segment, compute the least squares straight-line fit (the local trend). Let Y1,n,Y2,n,...,YN,n be the resulting piecewise-linear fit.

Compute the root-mean-square deviation from the local trend (local fluctuation):F(n,i)=1n∑t=in+1in+n(Xt−Yt,n)2.And their root-mean-square is the total fluctuation:

F(n)=1N/n∑i=1N/nF(n,i)2.

(If N is not divisible by n, 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 log⁡n−log⁡F(n).

Interpretation

A straight line of slope α on the log-log plot indicates a statistical self-affinity of form F(n)∝nα. Since F(n) monotonically increases with n, we always have α>0.

The scaling exponent α is a generalization of the Hurst exponent, with the precise value giving information about the series self-correlations:

Because the expected displacement in an uncorrelated random walk of length N grows like N, an exponent of 12 would correspond to uncorrelated white noise. When the exponent is between 0 and 1, the result is fractional Gaussian noise.

Pitfalls in interpretation

Though the DFA algorithm always produces a positive number α for any time series, it does not necessarily imply that the time series is self-similar. Self-similarity requires the log-log graph to be sufficiently linear over a wide range of n. 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. Therefore, the DFA scaling 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.

Sign in to keep reading

3 more chapters are free with a Lably account.

More in Statistics