L-BFGS-B需要'fn'的有限值

时间:2020-01-30 13:34:44

标签: r

view(b)

data.class(b)

DF = data.frame(r=b)

data.matrix(DF)

str(DF)
> rt<- as.matrix(DF)

class(rt)

[1] "matrix"



str(rt)

 num [1:204, 1:2] 94.8 96.2 98.1 99.1 100 …

 - attr(*, "dimnames")=List of 2
  ..$ : NULL

  ..$ : chr [1:2] "r.tf" "r.usd"



nrow(rt)

[1] 204
 ncol(rt)

[1] 2
 str(rt)

 num [1:204, 1:2] 94.8 96.2 98.1 99.1 100 …

 - attr(*, "dimnames")=List of 2

  ..$ : NULL

  ..$ : chr [1:2] "r.tf" "r.usd"


> data.class(rt)

[1] "matrix"

> ts.plot(rt)

> acf(rt, lag=100)

> library(LongMemoryTS)

> VARFIMA.est(rt, approx = 100, rep= FALSE)

Error in optim(par = start2, fn = ll.VARFIMA, data = data[from[aa]:to[aa],
  L-BFGS-B needs finite values of 'fn'

Warning message:
In FUN(newX[, i], ...) : possible convergence problem: optim gave code = 1

我不明白为什么我的代码不起作用。有人可以帮忙吗?

0 个答案:

没有答案
相关问题