DFA: Detrended Fluctuation Analysis

View source: R/DFA.R

DFAR Documentation

Detrended Fluctuation Analysis

Description

Detrended Fluctuation Analysis (DFA)

Usage

  DFA(data, scale = 2^(1/8), box_size = 4, m = 1)

Arguments

data

Univariate time series (must be a vector or data frame)

scale

Specifies the ratio between successive box sizes (by default scale = 2^(1/8))

box_size

Vector of box sizes (must be used in conjunction with scale = "F")

m

An integer of the polynomial order for the detrending (by default m=1)

Details

The DFA fluctuation can be computed in a geometric scale or for different choices of boxes sizes.

Value

A matrix with two columns:

box

The box sizes (time scales) used for the analysis.

DFA

The corresponding detrended fluctuation amplitudes (Root Mean Square).

Note

It is not possible estimating alpha for multiple time series at once.

Author(s)

Ian Meneghel Danilevicz <ian.meneghel-danilevicz@inserm.fr> Victor Barreto Mesquita <victormesquita40@hotmail.com> Jairo H Migueles <jairo@jhmigueles.com>

References

C.-K. Peng, S.V. Buldyrev, S. Havlin, M. Simons, H.E. Stanley, A.L. Goldberger Phys. Rev. E, 49 (1994), p. 1685 Mesquita, Victor & Filho, Florencio & Rodrigues, Paulo. (2020). Detection of crossover points in detrended fluctuation analysis: An application to EEG signals of patients with epilepsy. Bioinformatics. 10.1093/bioinformatics/btaa955.

Examples

  # Estimate self-similarity of a very known time series available
  # on R base: the sunspot.year.
  # Then the spend time with each method is compared.
  ## Not run: 
    dfa = DFA(sunspot.year)
  
## End(Not run)

GGIR documentation built on Nov. 9, 2026, 1:07 a.m.