Skip to contents

Calculate the variance scale exponent of a time series.

Usage

vse(x, m = 0.5, n = NULL, type = c("weak", "strong"))

Arguments

x

A time series vector.

m

A parameter to control the number of scales. Default is 0.5.

n

The number of scales. If NULL, it will be calculated as floor(N^m).

type

The type of variance scale exponent. Default is "weak".

Value

The variance scale exponent.

References

Fu, H., Chen, W., & He, X.-J. (2018). On a class of estimation and test for long memory. In Physica A: Statistical Mechanics and its Applications (Vol. 509, pp. 906–920). Elsevier BV. https://doi.org/10.1016/j.physa.2018.06.092

Examples

## Compute the variance scale exponent of a time series
# Generate a random time series
set.seed(123)
x <- rnorm(1024) # F = H = 0.5 also d = 0
vse(x)
#> [1] 0.4987233

## Compare the result with the Hurst exponent
library(pracma)

# A time series with Hurst exponent 0.72
data("brown72")
x <- brown72     # F = H = 0.72 also d = 0.22
hurstexp(x)
#> Simple R/S Hurst estimation:         0.6628842 
#> Corrected R over S Hurst exponent:   0.7378703 
#> Empirical Hurst exponent:            0.6920439 
#> Corrected empirical Hurst exponent:  0.6577233 
#> Theoretical Hurst exponent:          0.5404756 
vse(x)
#> [1] 0.7345032

# A time series with Hurst exponent 0.43
xlm <- numeric(1024); xlm[1] <- 0.1
for (i in 2:1024) xlm[i] <- 4 * xlm[i-1] * (1 - xlm[i-1])
x <- xlm         # F = H = 0.43 also d = -0.07
hurstexp(x)
#> Simple R/S Hurst estimation:         0.4762169 
#> Corrected R over S Hurst exponent:   0.4722421 
#> Empirical Hurst exponent:            0.4872281 
#> Corrected empirical Hurst exponent:  0.4460807 
#> Theoretical Hurst exponent:          0.5404756 
vse(x)
#> [1] 0.3793589