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

更新时间:2023-07-18 08:18:53 阅读: 评论:0

关节分类
python怎么做q检验_关于eviews做时间序列模型的残差Q统计
只身孤影
量检验我决定写⼀些!...毕竟西湖六月中全诗
本⽂⽬的: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 obrved 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. Forsignificance levelα, thecritical regionfor rejection of the hypothesis of randomness is \chi_{1-\alpha,h}^2 "
src="upload.wikimedia/math/f/9/3/f934e8fde5eb44af530d2e75c233cf92.png">
where
is the α-quantileof thechi-squared distributionwith h degrees of freedom.
刍是什么意思
The Ljung–Box test is commonly ud inautoregressive integrated moving average(ARIMA) modeling. Note that it is applied to theresidualsof a fitted ARIMA model, not the original ries, 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.
上⾯这⼀段来⾃维基百科,解释了两个问题:
Q统计量和他的原假设备择假设,原假设是数据时相互独⽴分布的,对于残差⽽⾔就是相互独⽴那么就为⽩噪声,所以p如果很⼩就是拒绝原假设,就认为残差存在相关性,那么你的变量就没有完全把残差中的信息提取出来,说明模型不好,需要重新选择模型。
模型的Q统计量检验⽽不是对原数据的Q统计量,因为在检验模型是,并不根据模型结构进⾏调整。所以有时候你回去⽤resid做⾃相关检验的时候就会发现出来的结果和这⾥完全不⼀样,要⼩⼼。⾄于为什么eviews我将继续查资料解决。
PS:
在我做arma的时候,总是Q统计量检验通不过,总是p很⼩,残差项相关,不管如何改阶数都不好解决,(应该有不少⼈遇到这个问题)今天尝试分析季节趋势,确实,p很⼩这种情况往往发⽣在⽇数据上,我今⽇在做的股价模型就是因为数据量很多,画出图来之后很难发现季节趋势,在加⼊5天的季节趋势之后Q检验很好的通过了,多次尝试之后SAR,SMA加⼊就很好的提⾼的残差信息表⽰量,模型就可以了。不过这只是⼀般题⽬,实际问题还需要继续讨论。好看的网名
正在学习,欢迎⾼⼿指出错误共同交流。

本文发布于:2023-07-18 08:18:53,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/1086107.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:模型   检验   残差
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图