悬赏 200 个论坛币 未解决
代码:
z5=residuals(garch5)/sigma(garch5)
PIT_5=pdist('std',z5, mu = 0, sigma = 1,
shape=coef(garch5)["shape"])
PIT_5
运行结果:
[1] "Error in try(.C(\"c_pstd\", q = as.double(q), mu = as.double(mu), sigma = as.double(sigma), : \n NA/NaN/Inf in foreign function call (arg 4)\n"
attr(,"class")
[1] "try-error"
attr(,"condition")
<simpleError in doTryCatch(return(expr), name, parentenv, handler): NA/NaN/Inf in foreign function call (arg 4)>
其他6个变量用同样的代码和方法都运行成功了,但是这个变量一直报错。保证z5这个变量的数据里没有na,nan和inf值,查了很久没看到跟我一样是arg4报错的。请大佬们不吝指教,论坛币已奉上!!!救救孩子吧!!看的头秃也不知道是哪儿的问题