Learn R Programming

MSGARCH (version 1.3)

ExtractStateFit: Single-regime model extractor.

Description

Extracts each regime from a fitted multiple regime specificaton and creates a fitted object for each extracted regime.

Usage

ExtractStateFit(object)

# S3 method for MSGARCH_ML_FIT ExtractStateFit(object)

# S3 method for MSGARCH_MCMC_FIT ExtractStateFit(object)

Arguments

object

Fit object of type MSGARCH_ML_FIT created with FitML or MSGARCH_MCMC_FIT created with FitMCMC.

Value

A list of with K element where each element is a fit object of type MSGARCH_ML_FIT or MSGARCH_MCMC_FIT.

Examples

Run this code
# 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)
SR.fit <- ExtractStateFit(fit)
# }

Run the code above in your browser using DataLab