can dynare solve this linear system?

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.

can dynare solve this linear system?

Postby blackeif » Fri Jul 02, 2010 3:59 am

i want to use dynare to solve a linear system like this(some parameters may not be used in the model):
-----------------------------------the line.mod-----------------------------------------
var y i pai q qstar;
varexo eps1 eps2 eps3 eps4;
parameters a1 a2 phi beta sigma1 sigma2 b1 b2 gama1 gamma1s gama2 gama3 gama4 r pais;
a1 = 0.4;
a2 = 0.1;
phi = 0.8;
beta = 0.1;
sigma1 = 0.4;
sigma2 = 0.8;
b1 = 0.5;
b2 = 0.3;
gama1 = 0.8;
gama1s = 3;
gama2 = 0.1;
gama3 = 0.1;
gama4 = 0.85;
r = 0.035;
pais = 0.025;
model(linear);
qstar = sigma2*y(+1)-sigma1*(i-pai(+1))+eps3;
pai = (1-phi)*pai(+1)+phi*pai(-1)+beta*y+eps2;
y = y(+1)-a1*(i(-1)-pai)+a2*q(-1)+eps1;
q = (b1-b2)*q(-1)-b1*(q(-2)+b2*qstar;
i = (1-gama4)*(r+pai+gama1*(pai)+gama2*y+gama3*(q-qstar))+gamam4*i(-1)+eps4;
end;
initval;
qstar = 1;
pai = 0;
y = 0.1;
q = 1;
i = 0;
shocks;
var eps1; stderr 0.01;
var eps2; stderr 0.01;
var eps3; stderr 0.01;
var eps4; stderr 0.01;
end;
steady;
check;
stoch_simul(periods=2100);
-----------------------------------------------------------------------
however, the matlab said "qstar is an unrecognized symbol", the linear system is from"Should Monetary Policy Respond to Asset Price Misalignments?" with a little adjustment. i can not figure out whether the reason is dynare can not solve this type system or it is my wrong coding. could somebody help me with this problem?
Attachments
line.mod
(911 Bytes) Downloaded 55 times
Should Monetary Policy Respond to Asset Price Misalignments.pdf
(255.95 KiB) Downloaded 87 times
blackeif
 
Posts: 31
Joined: Mon Apr 27, 2009 5:19 pm

Re: can dynare solve this linear system?

Postby jpfeifer » Fri Jul 02, 2010 6:46 am

Code: Select all
q = (b1-b2)*q(-1)-b1*(q(-2)+b2*qstar;

misses a bracket at the end.

Code: Select all
i = (1-gama4)*(r+pai+gama1*(pai)+gama2*y+gama3*(q-qstar))+gamam4*i(-1)+eps4;

gamam4 should be gama4

The initval block misses an end;
Attachments
line.mod
Running file
(831 Bytes) Downloaded 69 times
------------
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: can dynare solve this linear system?

Postby blackeif » Fri Jul 02, 2010 7:37 am

thank you in advance. the dynare run it well.
blackeif
 
Posts: 31
Joined: Mon Apr 27, 2009 5:19 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests