hurstBlock {fractal} | R Documentation |
Function to estimate the Hurst parameter H of a long memory time series by one of several methods as specified in input. These methods all work directly with the sample values of the time series (not the spectrum).
hurstBlock(x, method="aggAbs", scale.min=8, scale.max=NULL, scale.ratio=2, weight=function(x) rep(1,length(x)), fit=lm)
x |
a vector containing a uniformly-sampled real-valued time series. |
fit |
a function representing the linear regression scheme to use in fitting
the resulting statistics (on a log-log scale). Supported functions are: lm ,
lmsreg , and ltsreg . See the on-line help documentation for each of these for
more information: in R, these are found in the MASS package while in S-PLUS they are indigenous
and found in the splus database. Default: lm . |
method |
a character string indicating the method to be used to estimate the Hurst coefficient (H).
Choices are:
Default: "aggabs" . |
scale.max |
an integer denoting the maximum scale (block size) to use in partitioning
the series. Default: length(x) . |
scale.min |
an integer denoting the minimum scale (block size) to use in partitioning
the series. Default: 8 . |
scale.ratio |
ratio of successive scales to use in partitioning the data. For example,
if scale.min=8 and scale.ratio=2 , the first scale will be 8, the second scale 16, the
third scale 32, and so on. Default: 2 . |
weight |
a function with a single required variable (x ) used to weight the
resulting statistics (x ) for each scale during linear regression. Currently, only supported
when fit=lm . Default: function(x) rep(1,length(x)) . |
an object of class fractalBlock
.
T. Higuchi (1988), Approach to an irregular time series on the basis of the fractal theory, Physica D, 31, 277–283.
M.S. Taqqu, V. Teverovsky, and W. Willinger, Estimators for Long- Range Dependence: an Empirical Study (1995), Fractals, 3, pp. 785–798.
M. S. Taqqu and V. Teverovsky, On Estimating the Intensity of Long- Range Dependence in Finite and Infinite Variance Time Series (1998), in A practical Guide to Heavy Tails: Statistical Techniques and Applications, pp. 177–217, Birkhauser, Boston.
## create test series set.seed(100) x <- rnorm(1024) walk <- cumsum(x) ## calculate the Hurst coefficient of a random ## walk series using various techniques methods <- c("aggabs","aggvar","diffvar","higuchi") z <- lapply(methods, function(method, walk){ hurstBlock(ifelse1(method=="higuchi",diff(walk),walk), method=method) },walk=walk ) names(z) <- methods ## plot results old.plt <- splitplot(2,2,1) for (i in 1:4){ if (i > 1) splitplot(2,2,i) plot(z[[i]], key=FALSE) mtext(paste(attr(z[[i]],"stat.name"), round(as.numeric(z[[i]]),3), sep=", H="), line=0.5, adj=1) } par(old.plt)