Hurst exponent with R

I would like to calculate the Hurst exponent with R. Is there a library or built-in function that can do this? any suggestion will be appreciated (even links to links). thanks

update: thanx in Ben Bolker comment, I found this script in a function example

hurst.est(wspec, range, nvoice, plot=TRUE) 

on this page http://finzi.psych.upenn.edu/R/library/Rwave/html/hurst.est.html

script:

 wnoise <- rnorm(8192) plot.ts(wnoise) spwnoise <- fft(wnoise) spwnoise <- Mod(spwnoise) spwnoise <- spwnoise*spwnoise plot(spwnoise[1:4096], log="xy", type="l") lswnoise <- lsfit(log10(1:4096), log10(spwnoise[1:4096])) abline(lswnoise$coef) cwtwnoise <- DOG(wnoise, 10, 5, 1, plot=FALSE) mcwtwnoise <- Mod(cwtwnoise) mcwtwnoise <- mcwtwnoise*mcwtwnoise wspwnoise <- tfmean(mcwtwnoise, plot=FALSE) wspec.pl(wspwnoise, 5) hurst.est(wspwnoise, 1:50, 5) 

I assume that the first part generates a signal with a memory effect, but I canโ€™t understand which part of the second part of the code is strictly necessary to refresh the hurst metric. Who can help me and explain it? I doubt

 mcwtwnoise <- Mod(cwtwnoise) mcwtwnoise <- mcwtwnoise*mcwtwnoise 
+8
r time-series
source share
4 answers

(Converted from comment.)

This is not quite the answer, but

 install.packages("sos") library("sos") findFn("hurst exponent") 

should get you there pretty quickly. Notes: (1) you only need to do install.packages(...) once per installation of R, but library("sos") in each session; (2) you still need to decide whether you are doing everything you need, but at least you know where to start.

+3
source share

The Hurst exponent, H, can be calculated from the fractal dimension D, since D = 2 - H.

I am using the fractaldim package available from CRAN to calculate the fractal dimension. There is a complete description of the methodologies in evaluating fractal dimension: the estimation of the roughness of time series and spatial data. University of Washington, Department of Statistics, Technical Report No. 577, http://www.stat.washington.edu/research/reports/2010/tr577.pdf .

With this package you can apply wavelet transforms, box package, etc. or the recommended madogram algorithm for calculating the fractal dimension.

+4
source share

The Rwave package uses the wavelet transform to estimate the Hurst exponent, so you can try the fArma package. It has many other functions for evaluating the Hurst indicator, except for bursts. There is currently no CRAN , except for the archive, but it works for me.

Here is the relevant section of the documentation from the package. http://rgm2.lab.nig.ac.jp/RGM2/func.php?rd_id=fArma:LrdModelling

+2
source share

The most complete set of methods (nine) is specified in the fArma' '(LrdModelling) function hurstSlider .

0
source share

All Articles