Help Please: unknown paramater

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.

Help Please: unknown paramater

Postby sirene » Sun Jul 28, 2013 10:00 pm

dear all,

I'm very new to dynare and I'm trying to write my own code, I get an error saying that unknown parameter. I follow the manual,accordingly, ı define doublevariable as a deviation from its steady state. What is wrong here, could you help me please?

Thank you in advance,
var c r p k y I L iR ez eg ;
varexo ug uz ;
parameters alpha beta sigma delta lambda rho_g rho_z tao_inf tao_y tao_L si ci sis tax sigma_ug sigma_uz ;


alpha=0.3;
beta=0.99;
sigma=2;
delta=0.02;
lambda=0.3;
rho_g =0.7;
rho_z =0.7;
tao_inf=1.5;
tao_y=0.25;
tao_L=2;
si=0.3;
ci=0.7-ss;
tax=0.08;
sigma_ug=0.38;
sigma_uz=1;


model;

cc= EXPECTATION(CC(1))-(1\sigma)*(rr-EXPECTATION(pp(1)));
rr=(1-beta*(1-delta))*(sigma*EXPECTATION(cc(1))+(1/1-alpha)*(EXPECTATION(yy(1))-EXPECTATION(kk))+EXPECTATION(pp(1)));
pp=beta*EXPECTATION(pp(1))+lambda*(sigma*cc-(alpha/1-alpha)*(kk(-1)-yy))+ez;
KK(-1)=si*II(-1)+(1-delta)*kk(-2);
II(-1)=LL;
YY= ci*cc+si*II+tax*si*SS;
R=iR+tho_inf*pp+tho_y*yy+thao_l* (L-L(-1));

ez=rho_z*ez(-1)+uz;
eg=rho_g*eg(-1)+ug;
END;

initval;

CC=0;
RR=0;
KK=0;
PR=0;
iRiR=0;
YY=0;
LL=0;
II=0;
eg=0;
ez=0;


END;



steady (solve_algo=0);
check;

shocks;

var uz=(sigma_uz)^2;

stoch_simul(linear,irf=20)

End;
sirene
 
Posts: 14
Joined: Fri Jul 19, 2013 1:16 pm

Re: Help Please: unknown paramater

Postby jpfeifer » Tue Jul 30, 2013 8:13 am

Please go back to the manual and the user guide to learn how models are entered. Usually, there is no need to explicitly add expectations. All variables dated t+1 are automatically inside conditional expectations. Moreover, every expression used in the model block must be defined as either a parameter (if fixed for all times) or a variable.
------------
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: Help Please: unknown paramater

Postby sirene » Tue Jul 30, 2013 9:10 am

Thank you for your comment,.
I have read the manual again but I havent been sured how to define a variable that is deviation from its steady state. For instance,in the manual ,it is written as such: Repeating a variable means that deviation from its ss . Ok, but there is no explanation about how to enter ''var block'', I mean that ,for instance, Var c and in the model block cc, or instead, var cc and in the model block cc again. I have looked many times but ı havent get a clue.

I would appreciate any of your comment,

Thank you very much.
sirene
 
Posts: 14
Joined: Fri Jul 19, 2013 1:16 pm

Re: Help Please: unknown paramater

Postby jpfeifer » Wed Jul 31, 2013 7:26 am

I don't get what you mean. Once you have linearized your model by hand, Dynare does not distinguish between linear and nonlinear models. There is no special way to define variables that are deviations from steady state. They are just variables. For a linear example, see for example the model from Gali, Chapter 3, posted here: https://sites.google.com/site/pfeiferecon/dynare
------------
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: Help Please: unknown paramater

Postby sirene » Wed Jul 31, 2013 12:04 pm

Thank you very much for your patience and help ..I modify the model but it still does not work, it says'' unknown name''.Could you please look at it ? I have added the mod file.
Sincerely,

var c R p k y s I L inn ez eg ;
varexo ug uz ;
parameters alpha beta sigma delta lambda rho_g rho_z tao_inf tao_y tao_L si ci sis tax sigma_ug sigma_uz ;


alpha=0.3;
beta=0.99;
delta=0.02;
lambda=0.3;
sigma=2;

rho_g =0.7;
rho_z =0.7;

tao_inf=1.5;
tao_y=0.25;
tao_L=2;

si=0.3;
ci=0.6;
sis=0.1;

tax=0.08;

sigma_ug=0.38;
sigma_uz=1;



model(linear);

c=(c(+1))-(1/(sigma))*(R-(p(+1)));
R=(1-beta*(1-delta))*((sigma)*(c(+1))+(1/1-alpha)*(y(+1)-(k)+ p(+1)));
p=beta*(p(+1))+lambda*((sigma)*c-(alpha/1-alpha)*(k(-1)-y))+ez;
k(-1)=si*I(-1)+(1-delta)*k(-2);
I(-1)=L;
y= ci*c+si*I+tax*sis*s;
R=inn+tao_inf *p+tao_y*y+tao_L*(L(+1)-L);
ez=rho_z*ez(-1)+uz;
eg=rho_g*eg(-1)+ug;
END;

initval;

c=0;
R=2;
k=0;
p=4;
inn=0;
s=0
y=0;
L=0;
I=0;
eg=0;
ez=0;


END;



steady ;
check;

shocks;

var uz;(sigma_uz)^2;

stoch_simul(order=1,irf=20);

END;
Attachments
abcd.mod
(939 Bytes) Downloaded 52 times
sirene
 
Posts: 14
Joined: Fri Jul 19, 2013 1:16 pm

Re: Help Please: unknown paramater

Postby donihue » Wed Aug 07, 2013 12:30 pm

Yoiu have several problems.
The minor ones are:
- missing ";" after "s=0"
- missing "end;" to finish shocks statement
- in shocks, use "=" after var uz
The major problem is that you have 12 endogenous variables but only 10 equations!

Regards
Donihue
donihue
 
Posts: 34
Joined: Mon Sep 12, 2011 1:12 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests