Detrended fluctuation analysis

From testwiki
Jump to navigation Jump to search

Template:Short description 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[1] 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] (2) random outliers/spikes, noisy segments, signals composed of parts with different correlation;[3] (3) nonlinear filters;[4] (4) missing data;[5] (5) signal coarse-graining procedures [6] and comparing DFA performance with moving average techniques [7] (cumulative citations > 4,000).  Datasets generated to test DFA are available on PhysioNet.[8]

Definition

DFA on a Brownian motion process, with increasing values of n.

Algorithm

Given: a time series x1,x2,...,xN.

Compute its average value x=1Nt=1Nxt.

Sum it into a process Xt=i=1t(xix). 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 n14, the largest nkN, 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.[9]

For each nT, 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)=1nt=in+1in+n(XtYt,n)2.And their root-mean-square is the total fluctuation:

F(n)=1N/ni=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.[10])

Make the log-log plot lognlogF(n).[11][12]

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.[13]

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.

Generalizations

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.[14]

Since Xt is a cumulative sum of xtx, a linear trend in Xt is a constant trend in xtx, which is a constant trend in xt (visible as short sections of "flat plateaus"). In this regard, DFA1 removes the mean from segments of the time series xt before quantifying the fluctuation.

Similarly, a degree n trend in Xt is a degree (n-1) trend in xt. For example, DFA1 removes linear trends from segments of the time series xt before quantifying the fluctuation, DFA1 removes parabolic trends from xt, 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)

DFA can be generalized by computingFq(n)=(1N/ni=1N/nF(n,i)q)1/q.then making the log-log plot of lognlogFq(n), If there is a strong linearity in the plot of lognlogFq(n), then that slope is α(q).[15] DFA is the special case where q=2.

Multifractal systems scale as a function Fq(n)nα(q). 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.

Kantelhardt et al. intended this scaling exponent as a generalization of the classical Hurst exponent. The classical Hurst exponent corresponds to H=α(2) for stationary cases, and H=α(2)1 for nonstationary cases.[15][16][17]

Applications

The DFA method has been applied to many systems, e.g. DNA sequences;[18][19] heartbeat dynamics in sleep and wake,[20]  sleep stages,[21][22] rest and exercise,[23] and across circadian phases;[24][25] locomotor gate and wrist dynamics, [26][27][28][29] neuronal oscillations,[17] speech pathology detection,[30] and animal behavior pattern analysis.[31][32]

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 decays with an exponent γ: C(L)Lγ . In addition the power spectrum decays as P(f)fβ . The three exponents are related by:[18]

  • γ=22α
  • β=2α1 and
  • γ=1β.

The relations can be derived using the Wiener–Khinchin theorem. The relation of DFA to the power spectrum method has been well studied.[33]

Thus, α is tied to the slope of the power spectrum β and is used to describe the color of noise by this relationship: α=(β+1)/2.

For fractional Gaussian noise

For fractional Gaussian noise (FGN), we have β[1,1], and thus α[0,1], and β=2H1, where H is the Hurst exponent. α for FGN is equal to H.[34]

For fractional Brownian motion

For fractional Brownian motion (FBM), we have β[1,3], and thus α[1,2], and β=2H+1, where H is the Hurst exponent. α for FBM is equal to H+1.[16] 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

Template:Reflist