- Source: 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.
Definition
= Algorithm
=Given: a time series
x
1
,
x
2
,
.
.
.
,
x
N
{\displaystyle x_{1},x_{2},...,x_{N}}
.
Compute its average value
⟨
x
⟩
=
1
N
∑
t
=
1
N
x
t
{\displaystyle \langle x\rangle ={\frac {1}{N}}\sum _{t=1}^{N}x_{t}}
.
Sum it into a process
X
t
=
∑
i
=
1
t
(
x
i
−
⟨
x
⟩
)
{\displaystyle X_{t}=\sum _{i=1}^{t}(x_{i}-\langle x\rangle )}
. 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
=
{
n
1
,
.
.
.
,
n
k
}
{\displaystyle T=\{n_{1},...,n_{k}\}}
of integers, such that
n
1
<
n
2
<
⋯
<
n
k
{\displaystyle n_{1}
, the smallest
n
1
≈
4
{\displaystyle n_{1}\approx 4}
, the largest
n
k
≈
N
{\displaystyle n_{k}\approx N}
, and the sequence is roughly distributed evenly in log-scale:
log
(
n
2
)
−
log
(
n
1
)
≈
log
(
n
3
)
−
log
(
n
2
)
≈
⋯
{\displaystyle \log(n_{2})-\log(n_{1})\approx \log(n_{3})-\log(n_{2})\approx \cdots }
. In other words, it is approximately a geometric progression.
For each
n
∈
T
{\displaystyle n\in T}
, divide the sequence
X
t
{\displaystyle X_{t}}
into consecutive segments of length
n
{\displaystyle n}
. Within each segment, compute the least squares straight-line fit (the local trend). Let
Y
1
,
n
,
Y
2
,
n
,
.
.
.
,
Y
N
,
n
{\displaystyle Y_{1,n},Y_{2,n},...,Y_{N,n}}
be the resulting piecewise-linear fit.
Compute the root-mean-square deviation from the local trend (local fluctuation):
F
(
n
,
i
)
=
1
n
∑
t
=
i
n
+
1
i
n
+
n
(
X
t
−
Y
t
,
n
)
2
.
{\displaystyle F(n,i)={\sqrt {{\frac {1}{n}}\sum _{t=in+1}^{in+n}\left(X_{t}-Y_{t,n}\right)^{2}}}.}
And their root-mean-square is the total fluctuation:
F
(
n
)
=
1
N
/
n
∑
i
=
1
N
/
n
F
(
n
,
i
)
2
.
{\displaystyle F(n)={\sqrt {{\frac {1}{N/n}}\sum _{i=1}^{N/n}F(n,i)^{2}}}.}
(If
N
{\displaystyle N}
is not divisible by
n
{\displaystyle 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
)
{\displaystyle \log n-\log F(n)}
.
= Interpretation
=A straight line of slope
α
{\displaystyle \alpha }
on the log-log plot indicates a statistical self-affinity of form
F
(
n
)
∝
n
α
{\displaystyle F(n)\propto n^{\alpha }}
. Since
F
(
n
)
{\displaystyle F(n)}
monotonically increases with
n
{\displaystyle n}
, we always have
α
>
0
{\displaystyle \alpha >0}
.
The scaling exponent
α
{\displaystyle \alpha }
is a generalization of the Hurst exponent, with the precise value giving information about the series self-correlations:
α
<
1
/
2
{\displaystyle \alpha <1/2}
: anti-correlated
α
≃
1
/
2
{\displaystyle \alpha \simeq 1/2}
: uncorrelated, white noise
α
>
1
/
2
{\displaystyle \alpha >1/2}
: correlated
α
≃
1
{\displaystyle \alpha \simeq 1}
: 1/f-noise, pink noise
α
>
1
{\displaystyle \alpha >1}
: non-stationary, unbounded
α
≃
3
/
2
{\displaystyle \alpha \simeq 3/2}
: Brownian noise
Because the expected displacement in an uncorrelated random walk of length N grows like
N
{\displaystyle {\sqrt {N}}}
, an exponent of
1
2
{\displaystyle {\tfrac {1}{2}}}
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
α
{\displaystyle \alpha }
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
{\displaystyle 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
α
{\displaystyle \alpha }
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.
Since
X
t
{\displaystyle X_{t}}
is a cumulative sum of
x
t
−
⟨
x
⟩
{\displaystyle x_{t}-\langle x\rangle }
, a linear trend in
X
t
{\displaystyle X_{t}}
is a constant trend in
x
t
−
⟨
x
⟩
{\displaystyle x_{t}-\langle x\rangle }
, which is a constant trend in
x
t
{\displaystyle x_{t}}
(visible as short sections of "flat plateaus"). In this regard, DFA1 removes the mean from segments of the time series
x
t
{\displaystyle x_{t}}
before quantifying the fluctuation.
Similarly, a degree n trend in
X
t
{\displaystyle X_{t}}
is a degree (n-1) trend in
x
t
{\displaystyle x_{t}}
. For example, DFA1 removes linear trends from segments of the time series
x
t
{\displaystyle x_{t}}
before quantifying the fluctuation, DFA1 removes parabolic trends from
x
t
{\displaystyle x_{t}}
, 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 computing
F
q
(
n
)
=
(
1
N
/
n
∑
i
=
1
N
/
n
F
(
n
,
i
)
q
)
1
/
q
.
{\displaystyle F_{q}(n)=\left({\frac {1}{N/n}}\sum _{i=1}^{N/n}F(n,i)^{q}\right)^{1/q}.}
then making the log-log plot of
log
n
−
log
F
q
(
n
)
{\displaystyle \log n-\log F_{q}(n)}
, If there is a strong linearity in the plot of
log
n
−
log
F
q
(
n
)
{\displaystyle \log n-\log F_{q}(n)}
, then that slope is
α
(
q
)
{\displaystyle \alpha (q)}
. DFA is the special case where
q
=
2
{\displaystyle q=2}
.
Multifractal systems scale as a function
F
q
(
n
)
∝
n
α
(
q
)
{\displaystyle F_{q}(n)\propto n^{\alpha (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
)
{\displaystyle H=\alpha (2)}
for stationary cases, and
H
=
α
(
2
)
−
1
{\displaystyle H=\alpha (2)-1}
for nonstationary cases.
Applications
The DFA method has been applied to many systems, e.g. DNA sequences, neuronal oscillations, speech pathology detection, heartbeat fluctuation in different sleep stages, and animal behavior pattern analysis.
The effect of trends on DFA has been studied.
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
γ
{\displaystyle \gamma }
:
C
(
L
)
∼
L
−
γ
{\displaystyle C(L)\sim L^{-\gamma }\!\ }
.
In addition the power spectrum decays as
P
(
f
)
∼
f
−
β
{\displaystyle P(f)\sim f^{-\beta }\!\ }
.
The three exponents are related by:
γ
=
2
−
2
α
{\displaystyle \gamma =2-2\alpha }
β
=
2
α
−
1
{\displaystyle \beta =2\alpha -1}
and
γ
=
1
−
β
{\displaystyle \gamma =1-\beta }
.
The relations can be derived using the Wiener–Khinchin theorem. The relation of DFA to the power spectrum method has been well studied.
Thus,
α
{\displaystyle \alpha }
is tied to the slope of the power spectrum
β
{\displaystyle \beta }
and is used to describe the color of noise by this relationship:
α
=
(
β
+
1
)
/
2
{\displaystyle \alpha =(\beta +1)/2}
.
= For fractional Gaussian noise
=For fractional Gaussian noise (FGN), we have
β
∈
[
−
1
,
1
]
{\displaystyle \beta \in [-1,1]}
, and thus
α
∈
[
0
,
1
]
{\displaystyle \alpha \in [0,1]}
, and
β
=
2
H
−
1
{\displaystyle \beta =2H-1}
, where
H
{\displaystyle H}
is the Hurst exponent.
α
{\displaystyle \alpha }
for FGN is equal to
H
{\displaystyle H}
.
= For fractional Brownian motion
=For fractional Brownian motion (FBM), we have
β
∈
[
1
,
3
]
{\displaystyle \beta \in [1,3]}
, and thus
α
∈
[
1
,
2
]
{\displaystyle \alpha \in [1,2]}
, and
β
=
2
H
+
1
{\displaystyle \beta =2H+1}
, where
H
{\displaystyle H}
is the Hurst exponent.
α
{\displaystyle \alpha }
for FBM is equal to
H
+
1
{\displaystyle H+1}
. 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
Multifractal system
Self-organized criticality
Self-affinity
Time series analysis
Hurst exponent
References
External links
Tutorial on how to calculate detrended fluctuation analysis Archived 2019-02-03 at the Wayback Machine 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.
Kata Kunci Pencarian:
- Detrended fluctuation analysis
- Time series
- Hurst exponent
- Fractal analysis
- Multifractal system
- DFA
- Stochastic tunneling
- Self-organized criticality
- Econophysics
- List of statistics articles