SLmemory.test {vse4ts} | R Documentation |
Testing Long Memory in Time Series
Description
The function SLmemory.test computes the test statistic for long memory in time series based on the variance scale exponent. The null hypothesis is that the time series is white noise or short memory, while the alternative hypothesis is that the time series has long memory.
Usage
SLmemory.test(x, m = 0.5, n = NULL)
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 |
Value
A list with class "SLmemory.test" containing the following components:
SLmemory |
the test statistic |
df |
the degrees of freedom of the test. |
p.value |
the p-value of the test. |
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
## Test long memory in time series
library(pracma)
set.seed(123)
data("brown72")
x72 <- brown72 # H = 0.72
xgn <- rnorm(1024) # H = 0.50
xlm <- numeric(1024); xlm[1] <- 0.1 # H = 0.43
for (i in 2:1024) xlm[i] <- 4 * xlm[i-1] * (1 - xlm[i-1])
SLmemory.test(x72)
SLmemory.test(xgn)
SLmemory.test(xlm)