# NOT RUN {
# load data
data("SMI", package = "MSGARCH")
# create model specification
# MS(2)-GARCH(1,1)-Normal (default)
spec <- CreateSpec()
# fit the model on the data by ML
fit <- FitML(spec = spec, data = SMI)
# run Pred method in-sample
pred.its <- Pred(object = fit, log = TRUE, do.its = TRUE)
# create a mesh
x <- seq(-3,3,0.01)
# run pred method on mesh at T + 1
pred.x <- Pred(object = fit, x = x, log = TRUE, do.its = FALSE)
# }
Run the code above in your browser using DataLab