解决方案: 运行ugarchroll,报错Error in try(.C("c_qstd", p = as.double(p), mu = as.double(mu), sigma = as.double(sigma), : \n NA/NaN/Inf in foreign function call (arg 3)

 

cl = makePSOCKcluster(10)


roll = ugarchroll(myspec, rlogdiff, n.start = 200,refit.every = 20,
refit.window = "moving", solver = "hybrid",
calculate.VaR = TRUE, VaR.alpha = c(0.01, 0.025, 0.05),
cluster = cl, keep.coef = TRUE, stringsAsFactors = T)

加入红色的那个参数就可以了,没有这个参数就会报 Error in try(.C("c_qstd", p = as.double(p), mu = as.double(mu), sigma = as.double(sigma),  : \n  NA/NaN/Inf in foreign function call (arg 3)

 

可参考的资料:

https://discuss.analyticsvidhya.com/t/error-in-randomforest-default-m-y-na-nan-inf-in-foreign-function-call-arg-1-in-r/1264/3

 

 

posted on 2017-05-16 11:31  michael_YM  阅读(1024)  评论(0编辑  收藏  举报

导航