Replicating Adjemian et al (2010) `Evaluation de la politique monétaire dans un modèle DSGE pour la zone Euro"

Hi, I am using dynare 4.4.3 (and matlab 2007) and I am running the code of Stephane Adjemian for his paper “evaluation de la politique monétaire dans un modèle DSGE pour la zone Euro (2010)”, extracted from his website https://stepan.adjemian.eu/research/, the zipped code is tar.bz2 and the dynare code is mze.mod. The error was :
ERROR: mze.mod: line 443, col 6: syntax error, unexpected TIMES, expecting EQUAL or '.'
so I put the beta into parenthesis and I run again the code, it show me the same error so I put the variable of interet into parenthesis and so on but now it show me an error for the capital accumulation equation that is:

dynare mze

Configuring Dynare …
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.

Starting Dynare (version 4.4.3).
Starting preprocessing of the model file …
ERROR: mze.mod: line 486, cols 17-30: Symbol Investment cannot take arguments.

??? Error using ==> dynare at 174
DYNARE: preprocessing failed
I read in another question on dynare forum that a person has posted something similar to that but there was no real clarification about how to fix the error, that’s why I am posting my question now
Thanks in advance
PS: the code show problem with the option_use_dll from the begining as I didn’t find how to slve that I preferred to not to use the use_dll options so in the mod code I eliminate that (line 430 //model(use_dll):wink:

@Houda_dynare The files work with 4.4.3 and 4.5 with and without the use_dll option. But you cannot use
//model(use_dll);
You must use
model;

Dear @jpfeifer ;
You are right, I replace "model(use_dll); by model; and it is running right now I will back to you as well as it finish
God bless you
Thanks
Houda

Dear @jpfeifer;
The code finish running, I get the results now I will compare it to those of the original paper. I tried to run the code with the use_dll and the error was the following

dynare mze

Configuring Dynare …
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.

Starting Dynare (version 4.4.3).
Starting preprocessing of the model file …
Substitution of endo lags >= 2: added 4 auxiliary variables and equations.
Found 96 equation(s).
Evaluating expressions…done
Computing static model derivatives:

  • order 1
    Computing dynamic model derivatives:
  • order 1
  • order 2
    Processing outputs …done
    Preprocessing completed.
    Starting MATLAB/Octave computing.

??? Error using ==> mze at 748
When using the USE_DLL option, you must give either ‘cygwin’ or ‘msvc’ option to the ‘dynare’ command

Error in ==> dynare at 180
evalin(‘base’,fname) ;
And I tried lso to run it in matlab 2015a and the error was related to the macro proccess!!!
thanks

That’s weird, the macroprocessor is independent of matlab, so it should work (or fail) with all matlab versions. I will try the files asap (later this week).

Best,
Stéphane.

Thanks dear Stéphane, but the code doesn’t reproduce the figure 3 of “variantes sur la politique monétaire” in page 25 so it shold be done by writing another code or should I change something in the existing code.
Thanks
Houda

@stepan-a I tried R2015a and the error message when you forget the provide a compiler is consistently the same.

Dear @jpfeifer Johannes and @stepan-a Stéphane;
Please find attached the link of the result of the mze running. The mze_output.txt contains all what has been written in the command window. These results are obtained using dynare 4.5.1 and matlab 2007a.


@stepan-a: The results of table 1 page 24 are hard to find in the results matrix, could you please just clarify that because as you see here someone can extend the taylor rule by including other arguments to the rule.
Thanks for all the help you provide to dynare community
Houda

I am lost with different issues here.

I have no problem running the code with and without use_dll… I suppose that the problem is that I almost never use windows, and that options cygwin or msvc are mandatory for this OS.

The codes on my webpage only provide the model and the data for estimation (it can also be used for the welfare evaluations with different specifications of the Taylor rule). The code for figure 3 is not available. Unfortunately I probably have lost the codes used to produce this figure. So you will have to do it yourself. We used perfect foresight simulation (for expected monetary policy) and extended path simulation (for non expected monetary policy).

Regarding the results for table 1, I wonder if you are not looking at the wrong table in mze_output.txt. The last table is the 2nd order reduced form solution (there is a stochastic_simul command after the estimation command in the mod file). You have to read the table following RESULTS FROM POSTERIOR ESTIMATION line.

Best,
Stéphane.

@stepan-a There is no real issue with running the codes on Windows provided a compiler is set and the correct option is invoked. That’s why I moved this post to the replication section.
@Houda_dynare I cannot speak to the paper’s content, but if you want to use the use_dll-option, you need to have a compiler installed on Windows and invoke the command line option for the respective compiler (see the manual). See https://de.mathworks.com/support/compilers.html for supported compilers. With R2007a, it might be a challenge. See also http://www.dynare.org/DynareWiki/ConfigureMatlabWindowsForMexCompilation