全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
4438 4
2013-04-19
    在检验GARCH(1,2)模型的时候,想用广义混合检验。    也就是R程序中的gBox()函数,检验标准残差。
    R帮助如下:

Generalized Portmanteau Tests for GARCH ModelsDescriptionPerform a goodness-of-fit test for the GARCH model by checking whether the standardized residuals are iid based on the ACF of the absolute residuals or squared residuals.
UsagegBox(model, lags = 1:20, x, method = c("squared", "absolute")[1], plot = TRUE)Arguments
modelfitted model from the garch function of the tseries library
lagsa vector of maximum ACF lags to be used in the test
xtime series data to which the GARCH model is fitted
method"squared": test is based on squared residuals; "absolute": test is based on absolute residuals
plotlogical variable, if TRUE, the p-values of the tests are plotted
Value
lagslags in the input
pvaluea vector of p-values of the tests
methodmethod used
xx
Author(s)Kung-Sik Chan
References"Time Series Analysis, with Applications in R" by J.D. Cryer and K.S. Chan
Exampleslibrary(tseries)data(CREF)r.cref=diff(log(CREF))*100m1=garch(x=r.cref,order=c(1,1))summary(m1)#gBox(m1,x=r.cref,method='squared')############################################

我的这段程序如下gBox(g09,x=DEC09_R1,method='squared')但是运行过后老是出错如:“错误于filter(M, filter = beta, method = "recursive", sides = 1, init = rep(sigma2,:dims [product 2]与对象长度[1]不匹配”查看residuals(g09)残差序列时,发现前几个值是NA,于是我用例子里面的garch(1,1)模型又做了一遍,还是这样,这个和空值有关么???为什么会有这样的错误提示啊??求解!!!
如果不用广义混合检验,只用ACF行不行丫?总感觉不完善……
还有模型拟合以后,在之后20多阶的时候出现一个相关性是不是能说明有异常值的存在?




二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2013-4-21 23:12:32
- - 没人顶么、自己支持一下、
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-6-24 09:36:20
用rugarch拟合之后后面不是还有一大段各种对残差的检验吗?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2013-6-25 08:09:59
不懂
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-10-30 11:18:22
我也遇到了同样的问题,求教楼主怎么解决啊?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群