Ljung-Box检验
外观
此条目可参照英语维基百科相应条目来扩充。 (2025年11月2日) |
Ljung-Box检验,又称增强的Box-Pierce检验[1]或Portmanteau检验[2], 是一个统计学检验,由Greta M. Ljung和George E.P. Box设计[3],旨在用于检验时间序列模型是否存在自相关性(拟合不足),该检验使用两个假设:H0和H1,H0代表残差的分布是独立的(也就代表数据可能是白噪声),而H1则代表残差的分布体现了一定的自相关性[4][5][6][7]。
公式
[编辑]我们在得到Q值后,就要根据alpha(统计显著性指数,通常为0.05),判断这个Q值的含义:
如果真,那么可以判定该数据满足H1假设,否则就代表该数据满足H0假设[4]。
在这个公式之中,有两个特别且重要的符号,分别是和 。
- n
- p(k)
在常见编程语言的实现
[编辑]- R
在R中,可通过Box.test函数并指定参数type为Ljung来调用该检验[5][8]。
- Python
在statsmodels库里,可通过acorr_ljungbox()函数来调用该检验[9][10]。
参考资料
[编辑]- ^ Box, G. E. P.; Pierce, David A. Distribution of Residual Autocorrelations in Autoregressive-Integrated Moving Average Time Series Models. Journal of the American Statistical Association. 1970-12, 65 (332): 1509–1526. doi:10.1080/01621459.1970.10481180.
- ^ T.2.3 - Testing and Remedial Measures for Autocorrelation | STAT 501. STAT 501: Regression Methods. 宾夕法尼亚州立大学 (英语).
- ^ 3.0 3.1 3.2 Understanding The Ljung-Box Test: A Comprehensive Guide To Time Series Autocorrelation - PSYCHOLOGICAL STATISTICS. statistics.arabpsychology.com. PSYCHOLOGICAL STATISTICS. [2025-11-02].
- ^ 4.0 4.1 Ljung Box Test: Definition. Statistics How To. 2018-09-07 [2025-10-30] (英语).
- ^ 5.0 5.1 5.2 5.3 5.4 Zach Bobbitt. Ljung-Box Test: Definition + Example. Statology. 2020-02-14 [2025-10-30] (英语).
- ^ 6.0 6.1 6.4.4.8.1. Box-Ljung Test. 国家标准技术研究所. [2025-10-30] (美国英语).
- ^ 7.0 7.1 G. M. Ljung; G. E. P. Box. On a measure of lack of fit in time series models. Biometrika. 1978-08-01, 65 (2): 297–303. doi:10.1093/biomet/65.2.297.
- ^ R Doc Authors. box.test: Box-Pierce and Ljung-Box Tests. rdrr.io. [2025-10-30] (英语).
- ^ Zach Bobbitt. How to Perform a Ljung-Box Test in Python. Statology. 2020-10-15 [2025-10-30] (英语).
- ^ Statsmodel Developers. statsmodels.stats.diagnostic.acorr_ljungbox - statsmodels 0.14.4. Statsmodel Docs. [2025-10-30] (英语).