Simulation and analysis of multifractional processes

logo Rmfrac provides a collection of tools for simulating, analysing and visualising multifractional processes and time series. The package includes built-in estimation techniques for the Hurst function, Local Fractal Dimension and several other geometric statistics. It provides highly customisable plotting functions for simulated realisations, user-provided time series and their statistics.

Features

Installation

To install the development version of Rmfrac package version from GitHub:

# Install devtools if not available
# install.packages("devtools")
# devtools::install_github("Nemini-S/Rmfrac")
install.packages("Rmfrac", repos = c('https://nemini-s.r-universe.dev', 'https://cloud.r-project.org'))

Getting started

library(Rmfrac)

To simulate a Gaussian Haar-based multifractional process for a constant Hurst function

t <- seq(0, 1, by = (1/2)^10)
H1 <- function(t) {return(0.5 + 0 * t)}
X1 <- GHBMP(t, H1, J = 12)

Oscillating Hurst function

H2 <- function(t) {return(0.5 - 0.4 * sin(6 * 3.14 * t))}
X2 <- GHBMP(t, H2, J = 12)

Piecewise Hurst function

H3 <- function(x) {
ifelse(x >= 0 & x <= 0.8, 0.375 * x + 0.2,
      ifelse(x > 0.8 & x <= 1,-1.5 * x + 1.7, NA))
}
X3 <- GHBMP(t, H3, J = 12)

To estimate the Hurst function and Local Fractal Dimension with visualizations

Hurst_estimates <- Hurst(X2, N = 100)
LFD_estimates <- LFD(X2, N = 100)

plot(X2, H_EST = TRUE, H_Smooth_Est = TRUE, LFD_Est = TRUE, LFD_Smooth_Est = TRUE)
image

Citation

Ayache A, Olenko A, Samarakoon N (2025). “On Construction, Properties and Simulation of Haar-Based Multifractional Processes.” doi:10.48550/arXiv.2503.07286. Submitted, URL https://arxiv.org/abs/2503.07286.