我将ugarchspec放入ugarchfit函数中,但得到有关均值(数据)== 0的错误。
我应该如何修改我的数据,以免发生此错误?
s
以下是数据样本
myfit<-ugarchfit(spec=myspec, data=mydata2, out.sample = 0, solver = "solnp", solver.control = list(),
fit.control = list(stationarity = 1, fixed.se = 0, scale = 0, rec.init = 'all'),
numderiv.control = list(grad.eps=1e-4, grad.d=0.0001,
grad.zero.tol=sqrt(.Machine$double.eps/7e-7), hess.eps=1e-4, hess.d=0.1,
hess.zero.tol=sqrt(.Machine$double.eps/7e-7), r=4, v=2))
Error in if (mean(data) == 0) { : missing value where TRUE/FALSE needed
它总共包含1700行。