could somebody help me to solve the problem?

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.

could somebody help me to solve the problem?

Postby blackeif » Wed Aug 11, 2010 1:39 am

i tried many times but i still can not figure out why matlab show such message,could somebody help me? i am puzzled.

-------------------------------------------------matlab message---------------------------------------------------------
Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.

Starting Dynare (version 4.1.2).
Starting preprocessing of the model file ...
Found 14 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: File: C:\Users\Thinkpad\Desktop\dynare\quant and price\monetary.m Line: 131 Column: 1
Missing variable or function.

Error in ==> dynare at 132
evalin('base',fname) ;


-------------------------the mod file--------------------------------------------------------------------------------------------------------------


var c y k R i pai phai omigabar m z v n x r;
varexo eps1 eps2;
parameters h sigma alpha theta delta omiga beta bphai ingta psai l gamma la lb lc kk rhox;
h = 0.65;
sigma = 3.57;
alpha = 0.4;
theta = 11;
delta = 0.024;
omiga = 0.5884;
beta = 0.98;
bphai = 0.7533;
ingta = 0.9728;
psai = 0.60;
l = 2.0;
gamma = 6.16;
la = 0.62;
lb = 1.27;
lc = 0.9238;
kk = 0.66;
rhox = 0.85;
model(linear);
pai=omiga*pai(-1)/(1+beta*omiga^2)+(2-omiga-beta*omiga+beta*omiga^2)*pai(+1)/(1+beta*omiga^2)+(1-omiga)*(1-beta*omiga)*phai;
k(+1)=(1-delta)*k+delta*i;
c=h*c(-1)/(1+h)+c(+1)/(1+h)-(1-h)*(R-pai(+1))/((1+h)*sigma);
c=h*c(-1)+c(+1)-(1-h)*r(+1)/sigma;
y=(1+alpha*(theta-1)/theta)*c+(1-alpha)*(theta-1)*i/theta;
y=z+alpha*n+(1-alpha)*k;
omigabar/bphai=(1+ingta*l)*psai*(omigabar(-1)+pai(-1))-(1+beta)*(1+ingta*l)*psai*pai+(1+ingta*l)*psai*beta*(omigabar(+1)+pai(+1))+(1-beta*psai)*(1-psai)*(ingta*n+sigma*(c-c(-1))/(1-h));
m=sigma*c/((1-h)*gamma)- sigma*h*c(-1)/((1-h)*gamma)-R/gamma;
m=m(-1)-pai+v;
v=la*v(-1)-lb*pai(+1)-lc*y+x;
phai=alpha*omigabar+(1-alpha)*r-z;
n=r+k-omigabar;
z=kk*z(-1)+eps1;
x=rhox*x(-1)+eps2;
end;
steady;
check;
shocks;
var eps1; stderr 0.01;
var eps2; stderr 0.01;
end;
stoch_simul;
Attachments
monetary.mod
(1.21 KiB) Downloaded 74 times
Last edited by blackeif on Wed Aug 11, 2010 3:10 pm, edited 3 times in total.
blackeif
 
Posts: 31
Joined: Mon Apr 27, 2009 5:19 pm

Re: a strange error in the dynare code

Postby AssiaEzzeroug » Wed Aug 11, 2010 6:22 am

Hi,

Ive specified one more thing compared with the original, that is the command "predetermined_variables" associated with variable k due to dynare timing convention. Also Ive removed the instruction "linear" of the block model because if your model is linear you shouldnt have powers as line 42?? What does this equation represent btw, Phillips curve? With those changes you get a rank condition issue..

Best
Attachments
monetary.mod
(1.28 KiB) Downloaded 81 times
AssiaEzzeroug
 
Posts: 83
Joined: Tue Nov 24, 2009 3:48 pm

Re: error in my dynare code

Postby blackeif » Wed Aug 11, 2010 9:00 am

thanks for your help, but it still does not work, the mod file works well in matlab at first but later the machine appeared such message above
blackeif
 
Posts: 31
Joined: Mon Apr 27, 2009 5:19 pm

Re: could somebody help me to solve the problem?

Postby SébastienVillemot » Thu Aug 19, 2010 3:31 pm

Your example fails at line 131 of monetary.m (the M file generated by the preprocessor). At that line, it looks like there is an initialization of "alpha". Maybe you could try to rename that parameter, maybe it conflicts with some other function that you may have written.

And of course, contrary to what Assia said, the fact that you have a power does not necessarily means that the model is non linear. In your case, the power is on parameters so it's ok.
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: could somebody help me to solve the problem?

Postby blackeif » Fri Aug 20, 2010 8:51 am

thank you for your help,the problem has been solved,i found the error.
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 5 guests