README.md

MFDFA: MultiFractal Detrended Fluctuation Analysis for Time Series

Applies the MultiFractal Detrended Fluctuation Analysis (MFDFA) to time series. The package contains some suggestion plot of the MFDFA results.

The MFDFA R library is now available on CRAN. Further update will be added soon.

A new file is available Here. It proposes the MFDFA with a parallel version (MFDFA2.R). Useful for long time series. It can be used as the first one with same parameters. It uses (N-1) of CPU cores of your computer.

Use the following to get it:

devtools::source_gist("bb0c09df9593dad16ae270334ec3e7d7", filename = "MFDFA2.r")

ENJOY ...

alt text

Version

1.1

Authors

Mohamed Laib, Luciano Telesca and Mikhail Kanevski

Maintainer

Mohamed Laib [mohamed.laib (at) unil.ch] or [laib.med (at) gmail.com]

URL

https://cran.r-project.org/package=MFDFA

https://mlaib.github.io/MFDFA/

https://mlaib.github.io

License

GPL-3

Downloads from the RStudio CRAN mirror

Note

If the codes are used in scientific publications please cite the following:

MFDFA package installation: from github

install.packages("devtools")
devtools::install_github("mlaib/MFDFA")
library(MFDFA)

Example

a<-0.9
N<-1024
tsx<-MFsim(N,a)
scale=10:100
q<--10:10
m<-1
mfdfa<-MFDFA(tsx, scale, m, q)

Results plot

dev.new()
par(mai=rep(1, 4))
plot(q, mfdfa$Hq, col=1, axes= F, ylab=expression('h'[q]), pch=16, cex.lab=1.8,
     cex.axis=1.8, main="Hurst exponent",
     ylim=c(min(mfdfa$Hq),max(mfdfa$Hq)))
grid(col="midnightblue")
axis(1)
axis(2)

Little comparison

library(MFDFA)
a<-0.9
N<-10000
tsx<-MFsim(N,a)

scale=10:1000
q<--10:10
m<-1
system.time(mfdfa<-MFDFA(tsx, scale, m, q))
#  ~ 47.60 s

devtools::source_gist("bb0c09df9593dad16ae270334ec3e7d7", filename = "MFDFA2.r")
system.time(mfdfa<-MFDFA2(tsx, scale, m, q))
#  ~ 12s


mlaib/MFDFA documentation built on June 14, 2019, 2:14 p.m.