graph - plotting DCC results with R -
i have been running dcc garch on r; results presented matrix
i extract second column vector plot, date on x-axis. moment, if define dccrho = dccresults$dcc[,2] head(dccrho) yields this:
1 0.9256281
2 0.9256139
3 0.9245794 ...
any redefine simple vector of numerical values? other option graph results of dcc date on x-axis? lot!
while trying this
x <- cbind(dccrho, com_30[,2])
head(x)
and this: matplot(dccrho ~ x[,2], x, xaxt = "n", type='l')
yields following error message:
"error in array(x, c(length(x), 1l), if (!is.null(names(x))) list(names(x), : invalid first argument"
apparently matter of length of vector; date , dcc results need vectors of same length.
one needs plot both date , dccrho shown below.
matplot(com_30$date, dccrho, xaxt = "n", type='l') axis(1, com_30$date, format(com_30$date, "%y"), cex.axis = .7)
Comments
Post a Comment