garchFit中的错误:名称属性必须与向量长度相同

时间:2018-10-03 11:09:24

标签: r

我正在将数据拟合为ARMA(1,1)+ GARCH(1,1)模型。以下是我的代码:

library(fGarch)
da=read.table("~/Desktop/IBM.csv",sep=",",header=TRUE)
gm=da[,2]
model<-garchFit(~arma(1,1)+garch(1,1), data = gm,trace = F)
summary(model)

它会产生以下错误:

Error in names(x) = rownames(data) : 
'names' attribute [939] must be the same length as the vector [938]

有人知道这是怎么回事吗?

我将不胜感激。谢谢!

0 个答案:

没有答案
相关问题