error in two-sector model
Posted: Wed May 23, 2007 10:02 am
Dear all,
I am working on a 2 sector Ramsy model, I know that it is often the case the one gets singularity in the model, I like to try to figure out if this is the problem in my case, but I get the following error message all the time:
??? Error: Missing operator, comma, or semicolon.
Error in ==> c:\dynare\matlab\dynare.m
On line 21 ==> evalin('base',fname) ;
I have the feeling that this error message comes not from a singularity. Does anybody have an idea to my problem?
bellow is my mod file
Thank's in advance
Johannes
periods = 400;
var C, Yc, Yh, H, N, K, Nc, Nd, Kc, Kd, L, Xl, r, w, Ph, Pl, Z;
varexo ep;
parameters alfa, gama, teta, mh, mc, bet, dk, dh, roh, b;
alfa = 0.4;
gama = 0.15;
teta = 0.894;
mh = 0.044;
mc = 0.32;
bet = 0.95;
dk = 0.05;
dh = 0.03;
roh = 0.95;
b = 1-mc-mh;
model;
mc/C = L;
bet*((mh/H(+1))+L(+1)*Ph(+1)*(1-dh)) = L*Ph;
bet*L(+1)*(r(+1)+(1-dk)) = L;
b/(1-N) = L*w;
C + K(+1) +Ph *H(+1) = w*N + r*K + Pl*Xl + (1-dk)*K + (1-dh)*Ph*H;
H(+1) = Yh + (1-dk)*H;
alfa*(Kc^(alfa-1))*((Z*Nc)^(1-alfa))= Ph*gama*teta*(Kd^(gama*teta-1))*((Z*Nd)^((1-gama)*teta))*(Xl^(1-teta));
(1-alfa)*(Kc^alfa)*(Z^(1-alfa))*(Nc^-alfa)= Ph*(1-gama)*teta*(Kd^(gama*teta))*(Z^((1-gama)*teta))*(Nd^((1-gama)*teta-1))*Xl^(1-teta);
Nc + Nd = N;
Kc + Kd = K;
Xl = 1;
Yc = Kc^alfa*(Z*Nc)^(1-alfa);
Yh = (Kd^(gama*teta))*((Z*Nd)^((1-gama)*teta))*(Xl^(1-teta));
Ph*gama*teta*(Yh/Kd)= r;
Ph*(1-gama)*teta*(Yh/Nd) = w;
Ph*(1-teta)*(Yh/Xl) = Pl;
Z=roh*Z(-1)*exp(ep);
end;
initval;
C = 0.5384385;
Yc = 0.67022096;
Yh = 0.0171486;
H = 1.2249047;
K = 2.7;
N = 0.275;
Nc = 0.27062340;
Nd = 0.00919934;
Kc = 2.6121432;
Kd = 0.0235045;
w = 1.2;
r = 0.3;
pl = 0.2;
L = 0.591247;
Ph = 1.04899637;
Xl =1;
Z = 1; ep = 0;
end;
shocks;
var ep = 0.001;
end;
stoch_simul;
I am working on a 2 sector Ramsy model, I know that it is often the case the one gets singularity in the model, I like to try to figure out if this is the problem in my case, but I get the following error message all the time:
??? Error: Missing operator, comma, or semicolon.
Error in ==> c:\dynare\matlab\dynare.m
On line 21 ==> evalin('base',fname) ;
I have the feeling that this error message comes not from a singularity. Does anybody have an idea to my problem?
bellow is my mod file
Thank's in advance
Johannes
periods = 400;
var C, Yc, Yh, H, N, K, Nc, Nd, Kc, Kd, L, Xl, r, w, Ph, Pl, Z;
varexo ep;
parameters alfa, gama, teta, mh, mc, bet, dk, dh, roh, b;
alfa = 0.4;
gama = 0.15;
teta = 0.894;
mh = 0.044;
mc = 0.32;
bet = 0.95;
dk = 0.05;
dh = 0.03;
roh = 0.95;
b = 1-mc-mh;
model;
mc/C = L;
bet*((mh/H(+1))+L(+1)*Ph(+1)*(1-dh)) = L*Ph;
bet*L(+1)*(r(+1)+(1-dk)) = L;
b/(1-N) = L*w;
C + K(+1) +Ph *H(+1) = w*N + r*K + Pl*Xl + (1-dk)*K + (1-dh)*Ph*H;
H(+1) = Yh + (1-dk)*H;
alfa*(Kc^(alfa-1))*((Z*Nc)^(1-alfa))= Ph*gama*teta*(Kd^(gama*teta-1))*((Z*Nd)^((1-gama)*teta))*(Xl^(1-teta));
(1-alfa)*(Kc^alfa)*(Z^(1-alfa))*(Nc^-alfa)= Ph*(1-gama)*teta*(Kd^(gama*teta))*(Z^((1-gama)*teta))*(Nd^((1-gama)*teta-1))*Xl^(1-teta);
Nc + Nd = N;
Kc + Kd = K;
Xl = 1;
Yc = Kc^alfa*(Z*Nc)^(1-alfa);
Yh = (Kd^(gama*teta))*((Z*Nd)^((1-gama)*teta))*(Xl^(1-teta));
Ph*gama*teta*(Yh/Kd)= r;
Ph*(1-gama)*teta*(Yh/Nd) = w;
Ph*(1-teta)*(Yh/Xl) = Pl;
Z=roh*Z(-1)*exp(ep);
end;
initval;
C = 0.5384385;
Yc = 0.67022096;
Yh = 0.0171486;
H = 1.2249047;
K = 2.7;
N = 0.275;
Nc = 0.27062340;
Nd = 0.00919934;
Kc = 2.6121432;
Kd = 0.0235045;
w = 1.2;
r = 0.3;
pl = 0.2;
L = 0.591247;
Ph = 1.04899637;
Xl =1;
Z = 1; ep = 0;
end;
shocks;
var ep = 0.001;
end;
stoch_simul;