Markov switching model

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

jpl
Posts: 4
Joined: Tue Sep 30, 2008 1:48 pm

Markov switching model

Postby jpl » Mon Dec 15, 2008 8:22 am

The reference guide mentions that the Kalman Filter function can be used to estimate markov switching models, MSM (pg 383 in User Guide II, Eviews 6). However, I do not know how to set up the state variables as discrete probabilities as would be needed to define the state-space model for a MSM. Does anyone have some simple sample code that shows how this is done? Or if there is some easier way to estimate these models, that would work too. Thanks much.

EViews Glenn
EViews Developer
Posts: 2672
Joined: Wed Oct 15, 2008 9:17 am

Re: Markov switching model

Postby EViews Glenn » Mon Dec 15, 2008 12:09 pm

The description in the manual was a general statement about the uses of the Kalman filter.

Unfortunately, the specifications allowed in the EViews state space object do not yet support implementing Markov switching, which requires a somewhat specialized setup for the filter. Markov switching is on our list of things to add for a future version of EViews.

In principle, you could set up estimation in the log-likelihood object using the sequential evaluation, but it's not likely to be particularly easy.

Sorry for the bad news.

lchelaru
Posts: 1
Joined: Wed Dec 09, 2009 2:11 pm

Re: Markov switching model

Postby lchelaru » Wed Dec 09, 2009 2:31 pm

I just stumbled over this forum reply when looking for an Eviews solution to modeling Markov chain regime switching models. I am using Eviews 6 and so unfortunately the above answer applies. However I was reading over Hamilton's initial paper on MCRS models where he compares an MCRS to an AR(1). He models the state variable St as an AR(1) with the only difference being that the AR(1) error term at time t e(t) in this case has a very particular distribution:
P(e(t)=1-p | S(t-1)=1)=p
P(e(t)=-p | S(t-1)=1)=1-p
P(e(t)=-(1-q) | S(t-1)=0)=q
P(e(t)=q | S(t-1)=0)=1-q

where p and q are the unconditional state transition probabilities:
P(S(t)=1|S(t-1)=1) = p
P(S(t)=0|S(t-1)=0) = q

I realize this may be a stretch, but can we train the error term in Eviews to behave this way? If so, I believe a 2-state MCRS model is doable in Eviews...
Thanks.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 35 guests