我正在尝试使用的方法将Copula拟合成两个变量的样本 'copula'和'VineCopula'套餐,但我有两个问题。
它给出错误的代码的最后一行,如下所示:
> fit <- fitCopula(cop_model, m, method = 'ml')
Error in .local(u, copula, log, ...) : unused argument (checkPar = FALSE)
你有什么想法我做错了吗?
# z <- my data - I know that is very small!!
# the output of dput(z)
structure(c(3.5448, 3.3863, 3.1097, 2.8126, 2.5005, 2.2661, 2.1308,
2.0771, 2.0377, 2.0769, 2.0608, 2.3478, 2.8888, 3.2404, 3.4623,
3.6302, 3.4086, 3.0667, 2.8401, 2.5854, 2.2845, 2.0605), .Dim = c(11L,
2L))
# or
> z
[,1] [,2]
[1,] 3.5448 2.3478
[2,] 3.3863 2.8888
[3,] 3.1097 3.2404
[4,] 2.8126 3.4623
[5,] 2.5005 3.6302
[6,] 2.2661 3.4086
[7,] 2.1308 3.0667
[8,] 2.0771 2.8401
[9,] 2.0377 2.5854
[10,] 2.0769 2.2845
[11,] 2.0608 2.0605
m <- pobs(as.matrix(cbind(z[,1],z[,2])))
selectedCopula <- BiCopSelect(m[,1],m[,2],familyset=NA)
selectedCopula
# Bivariate copula: Survival Joe (par = 2.11, tau=0.38)
# Pseudo observations are the observations in the [0,1] interval.
# But my data aren't in the [0,1]
cop_model <- surJoeBiCopula(selectedCopula$par)
cop_model
# method = mpl or ml
fit <- fitCopula(cop_model, m, method = 'ml')
fit