MSGARCH (version 2.3)

TransMat: Transition matrix.

Description

Method returning the transition matrix.

Usage

TransMat(object, ...)

# S3 method for MSGARCH_SPEC TransMat(object, par = NULL, nahead = 1L, ...)

# S3 method for MSGARCH_ML_FIT TransMat(object, nahead = 1L, ...)

Arguments

object

Model specification of class MSGARCH_SPEC created with CreateSpec or fit object of type MSGARCH_ML_FIT created with FitML.

...

Not used. Other arguments to TransMat.

par

Vector (of size d) of parameter estimates (not required when using a fit object) where d must have the same length as the default parameters of the specification.

nahead

Number of steps ahead. (Default: nahead = 1L)

Value

A matrix (of size K x K) in the case of a Markov-Switching model or a vector (of size K) in the case of a Mixture of GARCH model. The row indicates the starting states while the columns indicates the transition states.

Examples

Run this code
# NOT RUN {
# create model specification
spec <- CreateSpec()

# load data
data("SMI", package = "MSGARCH")

# fit the model on the data by ML
fit <- FitML(spec = spec, data = SMI)

# Extract the transition matrix 10 steps ahead
trans.mat <- TransMat(fit, nahead = 10)
print(trans.mat)
# }

Run the code above in your browser using DataCamp Workspace