Solving RBC model from Dynare User Guide

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.

Solving RBC model from Dynare User Guide

Postby Carol » Wed Nov 30, 2011 12:16 am

Hi,
Can anyone help please?
I am trying to solve the stochastic RBC example model from Chapter 3 of the Dynare User Guide (by Tommaso Mancini Griffoile) but I cannot. What I did is define the steady state values (yss, css, kss etc) and I included the steady state equations in the .mod file. I also log linearized the equations in the model. However, I am not getting to simulate the model.

I have attached the file (which I adjusted slightly). The original file can be found in the User Guide (chapter 3) and also in the models folder under UserGuide in your installation of Dynare (the file name is RBC_Monop_JVC.mod).

Any assistance will be greatly appreciated. Thanks.
Attachments
rbctest_post.mod
(1.79 KiB) Downloaded 132 times
Carol
 
Posts: 29
Joined: Tue Nov 29, 2011 11:19 pm

Re: Solving RBC model from Dynare User Guide

Postby jpfeifer » Wed Nov 30, 2011 7:28 am

Code: Select all
alpha = 0.33;
beta  = 0.99;
delta = 0.023;
psi   = 1.75;
rho   = 0.95;
gamma = 0.5;
sigma  = (0.007/(1-alpha));
epsilon = 10;

yss = kss^alpha*(1-alpha);
css = 1/(beta+beta*rss-beta*delta); 
kss = alpha/(1-alpha)*wss*lss*1/rss;
iss = kss-(1-delta)*kss;
lss = 1-(css/wss)*psi;
wss = (1-alpha)*yss/lss*((epsilon-1)/epsilon);
rss = alpha*(yss/kss)*((epsilon-1)/epsilon);
zss = 0;

is not a simultaneous equation system that Dynare solves. Rather, it is usual Matlab code. This does not work, because you use kss to define yss, but kss is only computed three lines later. If you execute the above lines as Matlab code, you will see that all numbers are NaN. This part of the code outside the model block has to be computable in the order entered in the mod-file.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Solving RBC model from Dynare User Guide

Postby Carol » Wed Nov 30, 2011 11:34 pm

Thanks jpfeifer,
Are you indicating that I have to use a separate steady state file to get the steady state?
Carol
 
Posts: 29
Joined: Tue Nov 29, 2011 11:19 pm

Re: Solving RBC model from Dynare User Guide

Postby jpfeifer » Thu Dec 01, 2011 7:37 am

No. I am saying you must compute your steady state in terms of the deep parameters. You must not enter circular code that uses undefined variables. You cannot use
Code: Select all
yss = kss^alpha*(1-alpha);
css = 1/(beta+beta*rss-beta*delta);
kss = alpha/(1-alpha)*wss*lss*1/rss;

The first line uses kss to compute yss. But what is kss and how should Dynare know? It is only computed two lines later!
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Solving RBC model from Dynare User Guide

Postby Carol » Thu Dec 01, 2011 8:01 am

Thanks again jpfeifer.
Carol
 
Posts: 29
Joined: Tue Nov 29, 2011 11:19 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 5 guests