| Title: | Computing Lower Bound of Ljung-Box Test |
|---|---|
| Description: | The Ljung-Box test is one of the most important tests for time series diagnostics and model selection. The Hassani SACF (Sum of the Sample Autocorrelation Function) Theorem , however, indicates that the sum of sample autocorrelation function is always fix for any stationary time series with arbitrary length. This package confirms for sensitivity of the Ljung-Box test to the number of lags involved in the test and therefore it should be used with extra caution. The Hassani SACF Theorem has been described in : Hassani, Yeganegi and M. R. (2019) <doi:10.1016/j.physa.2018.12.028>. |
| Authors: | Hossein Hassani [aut], Masoud Yarmohammdi [aut], Mohammad Reza Yeganegi [aut], Leila Marvian Mashhad [aut, cre] |
| Maintainer: | Leila Marvian Mashhad <[email protected]> |
| License: | GPL-3 |
| Version: | 2.0 |
| Built: | 2026-05-11 06:24:07 UTC |
| Source: | https://github.com/cran/Hassani.SACF |
Because of the sensitivity of the Ljung-Box test to the number of lags involved in the test, this function computes lower bound of this test and draws it's plot.
Q_H(simnum = 10000, TT = 50)Q_H(simnum = 10000, TT = 50)
simnum |
number of simulation iterations. |
TT |
length of time serie. |
Lower bound of the Ljung-Box test and it's plot.
Hossein hassani, Masoud yarmohammdi, Mohammad reza yeganegi and Leila Marvian Mashhad.
Hassani, H., & Yeganegi, M. R. (2019). "Sum of squared ACF and the Ljung-Box statistics." Physica A: Statistical Mechanics and Its Applications, 520, 81-86.
Box.test
Q_H(simnum = 10000, TT = 100)Q_H(simnum = 10000, TT = 100)
The sum of the sample autocorrelation function, found in many standard time series textbooks and software, at lag h is considered. It is shown that this sum is always minus half for any stationary time series with arbitrary length L.
SACF(x)SACF(x)
x |
it is stationary time series. |
A number. It computes SACF.
Hossein hassani, Masoud yarmohammdi, Mohammad reza yeganegi and Leila Marvian Mashhad.
A note on the sum of the sample autocorrelation function Hossein Hassani Statistics Group, Cardiff School of Mathematics, Cardiff University, CF24 4AG, UK 2-Statistical Research and Training Center, Tehran, 1413717911, Iran
Box.test
x = rnorm(50,mean = 0,sd = 1) SACF(x)x = rnorm(50,mean = 0,sd = 1) SACF(x)