Page 1 of 1

syntax shock_decomposition

PostPosted: Wed May 19, 2010 4:58 pm
by Thorsten
Hi all,

I am having trouble implementing the description in the Dynare manual for shock_decomposition. My shocks are named ea, eg etc. I thought I could use:

shock_decomposition(shocks=ea) y;

but I get the error message, which I really don't understand.

"Starting Dynare (version 4.1.1).
Starting preprocessing of the model file ...
ERROR: my_mod_file.mod:697.42-43: syntax error, unexpected NAME, expecting LABELS or PARAMETERS or SHOCKS"

Using the "labels" option works in principle, so I am really puzzled about how to map the manual syntax into code. I would appreciate any help - although in the worst case I would build my own plots on basis of oo_.shock_decomposition.

Best,
Thorsten

Re: syntax shock_decomposition

PostPosted: Wed May 19, 2010 5:39 pm
by jpfeifer
Hi Thorsten,

could you please post the mod-file so one can replicate the error.

Re: syntax shock_decomposition

PostPosted: Wed May 19, 2010 6:07 pm
by Thorsten
Sure. Thanks for checking! I reproduced the same syntax problem in the baseline Smets-Wouters (2007, AER) model (see attached).

Thorsten

Re: syntax shock_decomposition

PostPosted: Thu May 20, 2010 6:02 am
by jpfeifer
Sorry, but the steady state file is missing.

Re: syntax shock_decomposition

PostPosted: Fri Jul 16, 2010 6:18 am
by jpfeifer
Hi,
unfortunately, the documentation of the syntax in the manual seems to be out of date. Try for example

Code: Select all
shock_decomposition y;


to get a shock decomposition for the variable y.

Re: syntax shock_decomposition

PostPosted: Thu Aug 19, 2010 2:19 pm
by SébastienVillemot
Thanks for noticing the error in the reference manual, this will be fixed.

Re: syntax shock_decomposition

PostPosted: Fri Sep 10, 2010 11:46 am
by Pert
I'm trying to make sense of what the new manual says on this (on the options)
The new manual says the options as parameters=..., shocks=..., labels =....

How does one actually implement these options and what do they do? I tried to implement these options but I am getting syntax-type of error messages, so I cannot see the output of what these options do. I wish the manual would say a little bit more, or with some example.

Any help please? Thank you very much. I am new to this, and for clarity, please explain like you are explaining to a second grader, you will not insult my intelligence :) thank you in advance guys.

Re: syntax shock_decomposition

PostPosted: Tue Sep 14, 2010 7:24 am
by SébastienVillemot
Hi,

Actually there was a mistake in the reference manual: no option is currently implemented to the “shock_decomposition” command. You can only specify a list of endogenous for which to compute the decomposition.

New options should be implemented in Dynare next major release 4.2.

Best,

Re: syntax shock_decomposition

PostPosted: Tue Sep 14, 2010 2:38 pm
by Pert
Ok Sebastien, thanks for clarifying. I spent a little time playing around with these options, I thought I was doing something wrong. Thanks for clarifying I was not in the wrong track.

Best.

Re: syntax shock_decomposition

PostPosted: Thu Apr 26, 2012 8:28 pm
by jpfeifer
For a version working in Dynare 4.2.5, see here: http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=3750