TransMat | R Documentation |
Method returning the transition matrix.
TransMat(object, ...) ## S3 method for class 'MSGARCH_SPEC' TransMat(object, par = NULL, nahead = 1L, ...) ## S3 method for class 'MSGARCH_ML_FIT' TransMat(object, nahead = 1L, ...)
object |
Model specification of class |
... |
Not used. Other arguments to |
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: |
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.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.