# 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 with ML estimation
fit <- FitML(spec = spec, data = SMI)
# compute the filtered state probabilities
state <- State(object = fit)
plot(state, type.prob = "smoothed")
plot(state, type.prob = "predictive")
plot(state, type.prob = "filtered")
plot(state, type.prob = "viterbi")
# }
Run the code above in your browser using DataLab