Description Usage Arguments Details Value Author(s) References See Also Examples
Modified Ljung-Box test and volatility clustering test for time series. Time series can be univariate or multivariate. The modified Ljung-Box test checks whether there is linear autocorrelation in the time series. The volatility clustering test checks whether the time series has squared autocorrelation, which would indicate a presence of volatility clustering.
1 2 3 4 |
X |
A numeric vector/matrix or a univariate/multivariate time series object of class |
k |
A vector of lags. |
type |
The type of the autocorrelation test. Options are Modified Ljung-Box test ( |
In methods for class 'lbtest' only:
x |
An object of class lbtest |
digits |
The number of digits when printing an object of class lbtest. Default is 3 |
... |
Further arguments to be passed to or from methods. |
Assume all the individual time series X_i in X with T observations are scaled to have variance 1.
Then the modified Ljung-Box test statistic for testing the existence of linear autocorrelation in X_i (option = "linear"
) is
T*sum_j(sum_t (X_it X_(i, t + j))/(T - j))^2/V_j.
Here
V_j = sum_t (x_t^2 x_(t+j)^2)/(n-j) + 2*sum_k (n - k)/n * sum_s (x_s x_(s+j) x_(s+k) x_(s+k+j))/(n - k - j),
where t = 1, …, n - j, k = 1, …, n - j - 1 and s = 1, …, n - k - j.
The volatility clustering test statistic (option = "squared"
) is
T*sum_j(sum_t (X_it^2 X_(i, t + j)^2)/(T - j) - 1)^2/4.
Test statistic related to each time series X_i is then compared to χ^2-distribution with length(k)
degrees of freedom, and the corresponding p-values are produced. Small p-value indicates the existence of autocorrelation.
A list of class 'lbtest' containing the following components:
TS |
The values of the test statistic for each component of X as a vector. |
p_val |
The p-values based on the test statistic for each component of X as a vector. |
Xname |
The name of the data used as a character string. |
varnames |
The names of the variables used as a character string vector. |
k |
The lags used for testing the serial autocorrelation as a vector. |
K |
The total number of lags used for testing the serial autocorrelation. |
type |
The type of the autocorrelation test. |
Markus Matilainen, Jari Miettinen
Miettinen, M., Matilainen, M., Nordhausen, K. and Taskinen, S. (2020), Extracting Conditionally Heteroskedastic Components Using Independent Component Analysis, Journal of Time Series Analysis, 41, 293–311.
FixNA
, gFOBI
, gJADE
, vSOBI
, gSOBI
1 2 3 4 5 6 7 8 9 |
Loading required package: ICtest
Loading required package: JADE
Loading required package: ICS
Loading required package: mvtnorm
Loading required package: ggplot2
Registered S3 method overwritten by 'GGally':
method from
+.gg ggplot2
Registered S3 method overwritten by 'quantmod':
method from
as.zoo.data.frame zoo
Loading required package: stochvol
Serial autocorrelation test for S
Testing for squared autocorrelations based on lag(s) 1 2 3
Based on a chi squared test with 3 degrees of freedom
The test statistic and the corresponding p-value for each series:
Series Statistic p-value
s1 39.796 1.18e-08
s2 0.2 0.978
For each series the alternative hypothesis is: serial squared correlation exists
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.