Publications by Sang-Heon Lee
Carter-Kohn algorithm for State Space Models in R : Univariate Case
This post implements a R code for Carter-Kohn algorithm in a simple univariate state space model. For clear understanding of this backward sampling algorithm, only Gibbs sampling for state estimates is considered with other parameters being fixed or known. Gibbs Sampling for State Space Models in R In the previous posts below, we have im...
3616 sym 4 img 3 tbl
Understanding Hamilton Regime Switching Model using R package
This post explains how to model a regime switching (Markov switching) model which is based on Hamilton (1989). the estimation is done by 1) predicting states by each regimes, 2) constructing a likelihood from data and state predictions, and 3) updating states. This is the Hamilton filter which is a kind of Bayesian updating procedure. Hamil...
7117 sym 8 img 3 tbl
Hamilton Regime Switching Model using R code
This post estimates parameters of a regime switching model directly by using R code. The same model was already implemented by using MSwM R package in the previous post. Through this hand-on example I hope we can learn the process of Hamilton filtering more deeply. Hamilton Regime Switching Model using R code In the previous post below, we...
3635 sym 4 img 2 tbl
Kim (1994) Smoother Algorithm in Regime Switching Model using R code
This post explains smoothing algorithm of a regime switching model, which is known as Kim (1994) smoother. It is known that smoothing algorithm is more difficult to understand than filtering algorithm. For this perspective, I give detailed derivations and use more simplified expressions with which I match variables in R code. Kim’s Smooth...
7559 sym 4 img 4 tbl
Regime Switching State Space Model with R code
This post explains a Markov regime switching state space model. The bottom line is two-fold: 1) expanding states by each regime transitions and 2) collapsing each updated estimates for the next state prediction. The step 2) is necessary to fix the dimension of previous states so that Kalman recursion does not produce exponentially increasing s...
10094 sym 4 img 2 tbl
Markov Switching Multifractal (MSM) model using R package
This post explains the Markov switching multifractal (MSM) model of Calvet and Fisher (2004) and introduces a R package for this model. It is well-known that MSM model can describe stylized facts of volatility such as long memory, volatility clustering, and so on. Since It is a variant of Hamilton regime switching model with high-dimensional s...
6696 sym 4 img 3 tbl