Syntax Error in Model Block

Hi,
Dynare is giving me this error but my variables and model blocks are complete, i.e, totally the same number but this error is still popping up. The two shocks (epsAS and epsRS) were expressed in the model block.

“ERROR: epsAS epsRS not used in model block. To bypass this error, use the nostrict option. This may lead to crashes or unexpected behavior”.

Any advise please.

Thanks

Hi Chizzyman,

we would need to see your .mod file to help you.

Hi, you mean I should post my codes here? I am asking because I am new on the forum.

Yes, you can upload your .mod file here and we can then take a look and hopefully help you with your problem.

The above message means that the two shocks epsAS, epsRS you defined as varexo do not appear in the model-block. If you want to nevertheless run the model, you need to invoke dynare using

dynare name_of_the_mod_file nostrict

Okay. Thank you. In my model block, epsA and epsR are stated. I think I will just upload the preambles, parameters and model blocks for you to see if you do not mind. Thanks

Okay. epsAS and epsRS are captured in the model block. Let me upload the preambles, parameters and model block for your to see if you do not mind. Thanks

Codes_Exercise_05.zip (20.0 KB)
var y c h I kp kg w r gc gi gt rb b lambda A R;
varexo epsAS epsRS;
parameters betta alphaa theta1 theta2 theta3 delta_p delta_g gamma tau_c
tau_k tau_h rhoA rhoR;

betta = 0.922;
alphaa = 0.3501;
theta1 = 0.2413;
theta2 = 0.6381;
theta3 = 0.1206;
delta_p = 0.070;
delta_g = 0.016;
gamma = 0.020;
tau_c = 0.050;
tau_k = 0.300;
tau_h = 0.200;
rhoA = 0.9933;
rhoR = 0.9475;

model;
theta1/c=lambda*(1+tau_c);
theta2/1-h=lambda*(1-tau_h)w;
lambda=betta
lambda(+1)((1-tau_k)r(+1)+(1-delta_p));
lambda=betta
lambda(+1)
(1+rb(+1));
y=Ak^alphaah^1-alphaa*(gi)^gamma;
w=(1-alphaa)y/h;
r=alphaa
y/h;
kp(+1)=I+(1-delta_p)kp;
kg(+1)=I+(1-delta_g)kg;
gc+gi+gt+(1+rb)b=b(+1)+tau_c
c+tau_k
rk+tau_hwh+R;
gc=g^c
yy;
gi=g^i
yy;
gt=b
y;
log(eps_A)=rhoAlog(epsA(-1))+epsAS;
log(eps_R)=rhoR
log(epsR(-1))+epsRS;
y=c+kp(+1)-(1-delta_p)*kp+gc+gi;

initval;
y=1.0000;
c=0.5874;
h=0.33; // This is an exogenously set target.
I=0.1977;
kp=I+(1-delta_p)*kg;
kg=I+(1-delta_g)*kg;
w=(1-alphaa)y/h;
r=alphaa
y/k;
gc=0.07102;
gi=0.1309;
rb=0.0871;
b=0.4901;

end;

var y c h I kp kg w r gc gi gt rb b lambda A R;
varexo epsAS epsRS;
parameters betta alphaa theta1 theta2 theta3 delta_p delta_g gamma tau_c
tau_k tau_h rhoA rhoR;

betta = 0.922;
alphaa = 0.3501;
theta1 = 0.2413;
theta2 = 0.6381;
theta3 = 0.1206;
delta_p = 0.070;
delta_g = 0.016;
gamma = 0.020;
tau_c = 0.050;
tau_k = 0.300;
tau_h = 0.200;
rhoA = 0.9933;
rhoR = 0.9475;

model;
theta1/c=lambda*(1+tau_c);
theta2/1-h=lambda*(1-tau_h)*w;
lambda=betta*lambda(+1)*((1-tau_k)*r(+1)+(1-delta_p));
lambda=betta*lambda(+1)*(1+rb(+1));
y=A*k^alphaa*h^1-alphaa*(gi)^gamma;
w=(1-alphaa)*y/h;
r=alphaa*y/h;
kp(+1)=I+(1-delta_p)*kp;
kg(+1)=I+(1-delta_g)*kg;
gc+gi+gt+(1+rb)b=b(+1)+tau_c*c+tau_k*r*k+tau_h*w*h+R;
gc=g^c*y*y;
gi=g^i*y*y;
gt=b*y;
log(eps_A)=rhoA*log(epsA(-1))+epsAS;
log(eps_R)=rhoR*log(epsR(-1))+epsRS;
y=c+kp(+1)-(1-delta_p)*kp+gc+gi;


initval;
y=1.0000;
c=0.5874;
h=0.33; // This is an exogenously set target.
I=0.1977;
kp=I+(1-delta_p)*kg;
kg=I+(1-delta_g)*kg;
w=(1-alphaa)*y/h;
r=alphaa*y/k;
gc=0.07102;
gi=0.1309;
rb=0.0871;
b=0.4901;

end;

There are many issues with the file, many related to the spelling/naming:

ERROR: junk9.mod: line 25, col 5: Unknown symbol: k
ERROR: junk9.mod: line 30, col 41: Unknown symbol: k
ERROR: junk9.mod: line 31, col 4: Unknown symbol: g
ERROR: junk9.mod: line 32, col 4: Unknown symbol: g
ERROR: junk9.mod: line 32, col 6: Unknown symbol: i
ERROR: junk9.mod: line 34, cols 5-9: Unknown symbol: eps_A
ERROR: junk9.mod: line 34, cols 21-28: Unknown symbol: epsA
ERROR: junk9.mod: line 35, cols 5-9: Unknown symbol: eps_R
ERROR: junk9.mod: line 35, cols 21-28: Unknown symbol: epsR
ERROR: junk9.mod: line 39, cols 1-7: Unknown symbol: initval
ERROR: junk9.mod: line 47, col 12: Unknown symbol: k

Okay. Starting from the beginning.

Thanks. I appreciate

Goodmorning,

I had to start all over again, line by line with the coding and dynare is still giving me the same response

“ERROR: epsAS epsRS not used in model block. To bypass this error, use the nostrict option. This may lead to crashes or unexpected behavior.”

See the code again.

var y c h I kp kg w r gc gi gt rb b lambda epsA epsR;
varexo epsAS epsRS;
parameters betta alphaa theta1 theta2 theta3 delta_p delta_g gamma tau_c
tau_k tau_h rhoA rhoR;

betta = 0.922;
alphaa = 0.3501;
theta1 = 0.2413;
theta2 = 0.6381;
theta3 = 0.1206;
delta_p = 0.070;
delta_g = 0.016;
gamma = 0.020;
tau_c = 0.050;
tau_k = 0.300;
tau_h = 0.200;
rhoA = 0.9933;
rhoR = 0.9475;

model;
theta1/c=lambda*(1+tau_c);
theta2/1-h=lambda*(1-tau_h)w;
lambda=betta
lambda(+1)((1-tau_k)r(+1)+(1-delta_p));
lambda=betta
lambda(+1)
(1+rb(+1));
y=epsAkp^alphaah^1-alphaa*(gi)^gamma;
w=(1-alphaa)y/h;
r=alphaa
y/h;
kp(+1)=I+(1-delta_p)kp;
kg(+1)=I+(1-delta_g)kg;
gc+gi+gt+(1+rb)b=b(+1)+tau_c
c+tau_k
rkp+tau_hwh+epsR;
gc=y;
gi=y;
gt=b
y;
log(epsA)=rhoAlog(epsA(-1))+epsAS;
log(epsR)=rhoR
log(epsR(-1))+epsRS;
y=c+kp(+1)-(1-delta_p)*kp+gc+gi;

end;

steady_state_model;
y=1.0000;
c=0.5874;
h=0.33; // This is an exogenously set target.
I=0.1977;
kp=I+(1-delta_p)*kp;
kg=I+(1-delta_g)*kg;
w=(1-alphaa)y/h;
r=alphaa
y/kp;
gc=0.07102;
gi=0.1309;
rb=0.0871;
b=0.4901;

end;
steady;

shocks;
var epsAS; sigmaA;
var epsRS; sigmaR;
end;

Don’t post text, post the file.

code_101.mod (1.3 KB)

You have an opening comment /* that is never closed by */
On top of that, your file is littered with mistakes like missing brackets, wrong equations etc. If fixed some of the problems, but many remain. How can

gc=y;
gi=y;
y=c+kp(+1)-(1-delta_p)*kp+gc+gi;

make sense?

code_101.mod (1.2 KB)