分享

关于eviews做时间序列模型的残差Q统计量检验我决定写一些!

 imelee 2016-01-22
 本帖最后由 wanghaidong918 于 2013-1-13 08:06 编辑

本文目的:1、做arima模型的时候你需要在模型拟合完之后做残差的Q统计量检验,但是你又不会看结果;
2、你会看结果,但是是否发现疑问:为什么直接在模型中选择残差检验中的Q统计量检验得出的结果与选择resid数据进行序列相关检验得出的结果天壤之别。
有这种疑问看下文:

本科时候做ARIMA模型的时候就发现Q-statistic of residual和resid的序列相关检验出来的Q统计量不一样,很纠结,今日再做, 不想把这个问题再放下去,所以查资料解决之。既然说到这问题,那我从头说起:


什么是Q统计量检验:The Ljung–Box test test can be defined as follows.

H0: The data are independently distributed (i.e. the correlations in the population from which the sample is taken are 0, so that any observed correlations in the data result from randomness of the sampling process).Ha: The data are not independently distributed.The test statistic is:
统计量where n is the sample size, is the sample autocorrelation at lag k, and h is the number of lags being tested. For significance level α, the critical region for rejection of the hypothesis of randomness is \chi_{1-\alpha,h}^2
" src="http://upload./math/f/9/3/f934e8fde5eb44af530d2e75c233cf92.png">
where is the α-
quantile of the chi-squared distribution with h degrees of freedom.
The Ljung–Box test is commonly used in
autoregressive integrated moving average (ARIMA) modeling. Note that it is applied to the residuals of a fitted ARIMA model, not the original series, and in such applications the hypothesis actually being tested is that the residuals from the ARIMA model have no autocorrelation. When testing ARIMA models, no adjustment to the test statistic or to the critical region of the test are made in relation to the structure of the ARIMA model.
http://en./wiki/Ljung-Box_test
上面这一段来自维基百科,解释了两个问题:


  • Q统计量和他的原假设备择假设,原假设是数据时相互独立分布的,对于残差而言就是相互独立那么就为白噪声,所以p如果很小就是拒绝原假设,就认为残差存在相关性,那么你的变量就没有完全把残差中的信息提取出来,说明模型不好,需要重新选择模型。
  • 模型的Q统计量检验而不是对原数据的Q统计量,因为在检验模型是,并不根据模型结构进行调整。所以有时候你回去用resid做自相关检验的时候就会发现出来的结果和这里完全不一样,要小心。至于为什么eviews我将继续查资料解决。

PS:
在我做arma的时候,总是Q统计量检验通不过,总是p很小,残差项相关,不管如何改阶数都不好解决,(应该有不少人遇到这个问题)今天尝试分析季节趋势,确实,p很小这种情况往往发生在日数据上,我今日在做的股价模型就是因为数据量很多,画出图来之后很难发现季节趋势,在加入5天的季节趋势之后Q检验很好的通过了,多次尝试之后SAR,SMA加入就很好的提高的残差信息表示量,模型就可以了。不过这只是一般题目,实际问题还需要继续讨论。
正在学习,欢迎高手指出错误共同交流。

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多