title: Hurst exponent with R
body: <p>I would like calculate the Hurst exponent with R. Is there a library or built in function that can do this? any suggestion will be appreciated (even weblinks to references).</p>
  <p>update: thanks to the comment of Ben Bolker, I have found this script in the example of the function</p>
  <pre><code>hurst.est(wspec, range, nvoice, plot=TRUE)
  </code></pre>
  <p>at this page <a href="http://finzi.psych.upenn.edu/R/library/Rwave/html/hurst.est.html" rel="nofollow noreferrer">http://finzi.psych.upenn.edu/R/library/Rwave/html/hurst.est.html</a></p>
  <p>script:</p>
  <pre><code>wnoise &lt;- rnorm(8192)
  plot.ts(wnoise)
  spwnoise &lt;- fft(wnoise)
  spwnoise &lt;- Mod(spwnoise)
  spwnoise &lt;- spwnoise*spwnoise
  plot(spwnoise[1:4096], log=&quot;xy&quot;, type=&quot;l&quot;)
  lswnoise &lt;- lsfit(log10(1:4096), log10(spwnoise[1:4096]))
  abline(lswnoise$coef)
  cwtwnoise &lt;- DOG(wnoise, 10, 5, 1, plot=FALSE)
  mcwtwnoise &lt;- Mod(cwtwnoise)
  mcwtwnoise &lt;- mcwtwnoise*mcwtwnoise
  wspwnoise &lt;- tfmean(mcwtwnoise, plot=FALSE)
  wspec.pl(wspwnoise, 5)
  hurst.est(wspwnoise, 1:50, 5)
  </code></pre>
  <p>I guess that the first part generate a signal with memory effect, but I can't understand which part of the second part of code is strictly necessary to estimate the hurst exponent. Who can help me and would explain this? I am in doubt with</p>
  <pre><code>mcwtwnoise &lt;- Mod(cwtwnoise)
  mcwtwnoise &lt;- mcwtwnoise*mcwtwnoise 
  </code></pre>