Hello everyone,
I’m currently adding extensions to the basic Neoclassical Business Cycle Model (say RBC model with annual data) with labour augmented technology introduced in the production function.
These model extensions are based on Eric Sims’ lecture notes available here under “RBC Extensions”: http://www3.nd.edu/~esims1/grad_macro_16.html
In particular, I’m taking the extensions on indivisibility of labour (pages 1-5) and Habit formation (pages 11-13).
Also, one “extension” on the “hidden” calibration of labour supply available under “RBC Model (quantitative)” in the same link from above (pages 9-11).
I managed to solve the standard case without any extension successfully for the country of Spain and the UK. Then I’ve tried to adapt these 3 extensions to my standard case.
The way I proceeded is as follows:
1. Take the Dynare script from the standard case and add the new parameters or variables resulting from the model extension. So I just included the new variables/parameters and its corresponding calibrated value in the preamble block.
2. Adapt the characteristic equations (from the standard case) to the model extension. Hence, the new set of characteristic equations contains the new parameters and variables.
3. Adapt the external Steady State solver Matlab function (from the standard case) to the model extension. These extensions usually affect the characteristic equations such that I needed to resolve the model with the new functional specifications (i.e. new labour supply equation or new Euler consumption).
In my opinion this is the logical way to proceed. However, once I do run the extended models on Dynare (with the changed scripts and Matlab functions) I do get different errors and I don’t understand why they appear. I’ve revised the characteristic equations and the corresponding resolved model, so its steady state solution, and I didn’t spot anything wrong so far.
I’m not sure whether Dynare cannot solve the model because of the changes I’ve undertaken in the characteristic equations in the script or rather because of the changes in the Matlab function with the new Steady State solution. I’d say the main root of the problem is this latter reason because when I undertake model extensions where the steady state solution isn’t affected (for instance adding other shocks different to the standard technology/TFP shock), Dynare solves the model correctly and I get an output.
This is the case for example of adding a preference shock (pages 29 -32 from the same document). Here I do get an output from Dynare (maybe because of the reason just exposed: I don’t change the Matlab SS function here because in the SS there are no shocks).
Going back to the 3 extensions where I have problems, I’m attaching the Dynare script for the extension of indivisibility of labour and habit formation and its corresponding Matlab functions. Plus I attach the Dynare file (with the SS solution already integrated in the SteadyState model block) for the preference shock (where Dynare did give me an output, and the SS solution is the same as in the standard case), so it is easier to track down the differences between extensions and spot possible errors. Note that all the files are for the specific case of Spain.
Also, here are the errors I get from Dynare when running the extended models:
1. “Hidden” Labour supply calibration
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 ...
Found 13 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.
Residuals of the static equations:
Equation number 1 : 0
Equation number 2 : -1.4462
Equation number 3 : 0
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : 0
Equation number 7 : 0
Equation number 8 : 0
Equation number 9 : 0
Equation number 10 : 0
Equation number 11 : 0
Equation number 12 : 0
Equation number 13 : 0
Error using print_info (line 72)
The steadystate file did not compute the steady state
Error in resid (line 112)
print_info(info,options_.noprint, options_)
Error in steady (line 90)
resid;
Error in Neoclassical_Model_SP_Hidden_Chi_1 (line 155)
steady;
Error in dynare (line 180)
evalin('base',fname) ;
2. Indivisibility of Labour
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 ...
Found 13 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.
Residuals of the static equations:
Equation number 1 : 0
Equation number 2 : -89.4122
Equation number 3 : 0
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : 0
Equation number 7 : 0
Equation number 8 : 0
Equation number 9 : 0
Equation number 10 : 0
Equation number 11 : 0
Equation number 12 : 0
Equation number 13 : 0
Error using print_info (line 72)
The steadystate file did not compute the steady state
Error in resid (line 112)
print_info(info,options_.noprint, options_)
Error in steady (line 90)
resid;
Error in Neoclassical_Model_SP_Indivisible (line 150)
steady;
Error in dynare (line 180)
evalin('base',fname) ;
3. Habit Formation
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: Neoclassical_Model_SP_HabitNEW.mod: line 20, cols 1-6: syntax error, unexpected NAME
Error using dynare (line 174)
DYNARE: preprocessing failed
I would be really thankful for any advice or help on this. Any insight counts for me and I’m glad that this forum does work so well, given I’ve always got a reply to my queries.
PD: I apologise if some of my questions are a bit naïve in some aspects, however I’m very new to Dynare (since I’ve started my Bachelorthesis in Septmeber) and hence I appreciate your comprehension.