Skip to content

kjartako/MS_VAR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MS_VAR

The repository contains code used in the following paper:

"MCMC for Markov-switching models — Gibbs sampling vs. marginalized likelihood",

by Kjartan Kloster Osmundsen, Tore Selland Kleppe & Atle Oglend.

The code fits a Markov-switching vector autoregressive (MS-VAR) model to data input. The user can specify the data, number of regimes and number of autoregressive terms. The regimes can be applied to the mean structure and/or the covariance structure.

The code for a two-dimensional Markov-Switching Vector Error Correction (MS-VECM) model is also included.

The MS folder includes a base Markov-switching model (without autoregressive lags).

See the readme files of the subfolders for detailed instructions. See also this blog post.

The code assumes that the R-packages rstan and coda are installed (and rstudioapi if you are using Rstudio).

About

Stan-code for Markov-switching vector autoregressive models

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published