Learn R Programming

MFDFA (version 1.1)

MFsim: Simulated multifractal series.

Description

Generates series using the binomial multifractal model (see references).

Usage

MFsim(N,a)

Arguments

N

The length of the generated multifractal series.

a

Exponent that takes values in [0.6, 1].

Value

A vector containing the multifractal series.

References

J. Feder, Fractals, Plenum Press, New York, NY, USA, 1988.

E.L. Flores-M<U+00E1>rquez, A. Ram<U+00ED>rez-Rojas, L. Telesca, Multifractal detrended fluctuation analysis of earthquake magnitude series of Mexican South Pacific Region, Applied Mathematics and Computation, Volume 265, 2015, Pages 1106-1114, ISSN 0096-3003.

Examples

Run this code
# NOT RUN {
a<-0.9
N<-1024
tsx<-MFsim(N,a)
scale=10:100
q<--10:10
m<-1
b<-MFDFA(tsx, scale, m, q)

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

# }
# NOT RUN {
## Example with Levy distribution ####
require(rmutil)
tsx <- rlevy(1000, 0, 1)
scale=10:100
q<--10:10
m<-1
b<-MFDFA(tsx, scale, m, q)

dev.new()
plot(q, b$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(b$Hq),max(b$Hq)))
grid(col="midnightblue")
axis(1, cex=4)
axis(2, cex=4)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab