I tried to run the code in the MSGARCH manual regarding ExtractStateFit:
# create model specification>
spec <- CreateSpec()
# load data
data("SMI", package = "MSGARCH")
# fit the model on the data with ML estimation
fit <- FitML(spec = spec, data = SMI)
SR.fit <- ExtractStateFit(fit)
print(SR.fit)
For FitML, it works.
However, when I try to do the same with FitMCMC, I get the following output and error:
# create model specification
spec <- CreateSpec()
# load data
data("SMI", package = "MSGARCH")
# fit the model on the data (here, I have changed to FitMCMC)
fit <- FitMCMC(spec = spec, data = SMI)
SR.fit <- ExtractStateFit(fit)
> SR.fit
[[1]]
Specification type: Single-regime
Specification name: sGARCH_norm
Number of parameters in variance model: 3
Number of parameters in distribution: 0
------------------------------------------
Posterior sample (size: 1000)
Error in summary(object$par)$stat[colnames(object$ctr$par0), ] : subscript out of bounds
Hi Sir,
Thank you for writing this wonderful package.
I tried to run the code in the MSGARCH manual regarding
ExtractStateFit
:For
FitML
, it works.However, when I try to do the same with
FitMCMC
, I get the following output and error:How can I rectify this?
Thank you for your help.