Недавно я пытался самостоятельно изучить двухэтапную модель D CC в R. Очень полезная статья: https://www.r-bloggers.com/the-garch-dcc-model-and-2-stage-dccmvt-estimation/
Однако я застрял на
install.packages("rmgarch")
library(rmgarch)
install.packages("parallel")
library(parallel)
data(growthrates)
Dat = growthrates2[, 1:7, drop = FALSE]
# define a DCCspec object: 2 stage estimation should usually always use
# Normal for 1-stage (see below for
xspec = ugarchspec(mean.model = list(armaOrder = c(1, 1)), variance.model = list(garchOrder = c(1,1), model = 'eGARCH'), distribution.model = 'norm')
uspec = multispec(replicate(7, xspec))
spec1 = dccspec(uspec = uspec, dccOrder = c(1, 1), distribution = 'mvnorm')
spec1a = dccspec(uspec = uspec, dccOrder = c(1, 1), model='aDCC', distribution = 'mvnorm')
## aDDC for asymmetric DCC; The distributions supported are the multivariate normal (“mvnorm”) and the multivariate affine NIG (“manig”) and GHYP (“magh”) distributions of Schmidt
spec2 = dccspec(uspec = uspec, dccOrder = c(1, 1), distribution = 'mvlaplace')
spec2a = dccspec(uspec = uspec, dccOrder = c(1, 1), model='aDCC', distribution = 'mvlaplace')
cl = makePSOCKcluster(7)
## stopCluster(cl)
showconnections()
print(class(cl))
multf = multifit(multispec=uspec, Dat, cluster = cl)
Все строки кода работали гладко до последней строки Multifit. Ошибка показывает:
> multf = multifit(multispec=uspec, Dat, cluster = cl)
Error in checkForRemoteErrors(val) :
one node produced an error: no applicable method for 'convergence' applied to an object of class "try-error"
Я пытался найти, что в сети кто-то сказал, что это может быть наличие значений na в наборе данных, но в моем наборе данных не было значений na.
Так что может быть причиной ошибки? Спасибо
Редактировать: «dat2» заменено на «Dat» в последней строке кодов, чтобы избежать путаницы.