Markov-Switching Models (DSGE; BVAR...)

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Markov-Switching Models (DSGE; BVAR...)

Postby Fenix » Fri Feb 03, 2012 3:00 pm

Hey guys!

Can anyone tell me where I can read more about the advances of Markov Switching in BVARS in Dynare? For example how I can use the commands in the Wiki for Markov Switching (e.g. http://www.dynare.org/DynareWiki/Markov ... OptionsNew)? Or just point me to a help file, where I can read how to implement them, syntax, etc.?

I am new to dynare but had already a read through the manual and did some examples, so I got the basics of estimating DSGE models with Dynare (write "dynare model.mod" in the console and Pufff! - magic happens :)). What I have now is a Markov Switching DSGE Model (yes, I know Dynare cannot handle that yet), which I have solved for the state representation:

X_{t} = G(St)*X_{t-1} + Pi(St).Z_{t}
Y_t=H_{t}*X_{t]

where St is just indicating the matrix has some Markov Switching coefficients. Now I was to the point, where I would like to estimate the Likelihood of that to do Bayesian (where I could write a Matlab version of Kim&Nelson's 1999 code), but it relates to doing BVAR. (I guess Dynare uses K&N 1999?)

So far I have done this:
- I started here - http://www.dynare.org/DynareWiki/TableOfContents, looked through the MS part
- looked through the options - http://www.dynare.org/DynareWiki/Markov ... OptionsNew
- currently working through the example (which says SWZ but is not SWZ, a similar model of a different economy/data - http://www.dynare.org/DynareWiki/example_swz


anywhere I can read more about using only parts of dynare in matlab file? (e.g. I solve my model in Matlab, get it in State space form and then ask dynare to only do the ML estimation, or do the it with Bayesian, but not through a mod file?)


Thanks!

P.s. Dynare version 4.2.4, Matlab version 7.12.0.635 (R2011a), Win 7, dunno if you need this.
Fenix
 
Posts: 3
Joined: Fri Feb 03, 2012 2:04 pm

Re: Markov-Switching Models (DSGE; BVAR...)

Postby HoutanBastani » Mon Feb 06, 2012 10:53 am

Markov switching is only in the unstable version of Dynare, which is available from a snapshot created every night.

The options are documented in the user manual in that version as well as this wiki page: http://www.dynare.org/DynareWiki/MSSbvarOptions
Some of these options/statement usage may still change before Dynare 4.3 is released.
Best,
Houtan
HoutanBastani
 
Posts: 197
Joined: Fri Jan 22, 2010 4:11 pm
Location: Paris, France

Re: Markov-Switching Models (DSGE; BVAR...)

Postby Fenix » Thu Feb 09, 2012 12:43 pm

Thanks, I did have a look through the options but didn't know that each unstable version has a manual within, that is great! Just read through the Unstable version Manual.

However the example provided in the DynareWiki for BVAR is not working under the latest unstable (09.02.2012). Any ideas why?
I am talking about this example http://www.dynare.org/DynareWiki/example_swz

and I get this error:
Code: Select all
Starting Dynare (version 2012-02-09).
Starting preprocessing of the model file ...
ERROR: DH10.mod:10.27-42: syntax error, unexpected NAME, expecting RESTRICTIONS or CHAIN or DURATION or NUMBER_OF_REGIMES

??? Error using ==> dynare at 114
DYNARE: preprocessing failed




Thanks!
Fenix
 
Posts: 3
Joined: Fri Feb 03, 2012 2:04 pm

Re: Markov-Switching Models (DSGE; BVAR...)

Postby StephaneLhuissier » Thu Feb 09, 2012 4:53 pm

Change "number_of_states" by "number_of_regimes" in the "markov_switching" command.

Stephane
Stéphane Lhuissier
CEPII
http://www.stephanelhuissier.eu
StephaneLhuissier
 
Posts: 20
Joined: Fri Oct 30, 2009 1:47 pm

Re: Markov-Switching Models (DSGE; BVAR...)

Postby Fenix » Fri Feb 10, 2012 4:19 pm

Thanks, it worked! I didn't expect the fix was so simple.

Let the experimenting begin!
Fenix
 
Posts: 3
Joined: Fri Feb 03, 2012 2:04 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 11 guests