我想使用fitMvdc将copula与我的数据相匹配,但是我收到错误。我相信它与我如何指定边距的起点有关的语法,但是我无法找到正确的格式。
例如,以下代码可以正常工作:
normal <- normalCopula(param=rep(0.2, 3), dim=3 , dispstr="un")
myMvd<- mvdc(normal, c("exp","exp","exp"),
param = list(list(rate=1), list(rate=1), list(rate=1)))
n<- 1000
x <- rMvdc(n, myMvd)
fit2 <- fitMvdc(x, myMvd, start = c(2,2,2,.2,.2,.2))
但是当我将我的边距改为制服或其他任何东西时,如下所示:
normal <- normalCopula(param=rep(0.2, 3), dim=3 , dispstr="un")
myMvd<- mvdc(normal, c("unif","unif","unif"),
param = list(list(min=0,max=1), list(min=0,max=1),
list(min=0,max=1)))
n<- 1000
x <- rMvdc(n, myMvd)
fit2 <- fitMvdc(x, myMvd, start = c(0.1,1.1,0.1,1.1,0.1,1.1,.2,.2,.2))
我收到以下错误:
non-finite finite-difference value [2]
如果我使用method =&#34; Nelder&#34;文档错误建议:
possible convergence problem: optim gave code=1
我该如何解决?