Skip to content

Instantly share code, notes, and snippets.

@mlaib
Last active January 25, 2018 08:33
Show Gist options
  • Save mlaib/eb252b2dcf668d6cf854a273f67061af to your computer and use it in GitHub Desktop.
Save mlaib/eb252b2dcf668d6cf854a273f67061af to your computer and use it in GitHub Desktop.
Notes for MFDFA R library
## MFDFA package installation: from github ####
install.packages("devtools")
devtools::install_github("mlaib/MFDFA")
library(MFDFA)
#####
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment