I created 100 randome time series to fit GARCH-Model on them later. Here are my codes:
#create randome time series
d <- data.frame(replicate(100,sample(0:100,1000,rep=TRUE)))
library(forecast)
lst1 <- lapply(d, ts, start = 2000, end = 2009)
print(lst1)
df<- as.data.frame(lst1)
df1 <- as.matrix(as.data.frame(lst1), 1)
# fit DCC-GARCH on the time series
install.packages("rmgarch")
require(rmgarch)
garch100.spec <- ugarchspec(mean.model = list(armaOrder=c(0,0)),variance.model = list(garchOrder=c(1,1),model="sGARCH"),distribution.model = "std")
dcc.garch100.spec= dccspec(uspec = multispec(replicate(3,garch100.spec)),dccOrder = c(1,1),distribution = "mvt")
dcc.fit <- dccfit(dcc.garch100.spec, data=df1)
I got the following error message: error in dimnames(x) - dn length of 'dimnames' 2 not equal to array extent
Can somebody help me with it?