Error message: unknow symbol, even though symbol are defined

Dear all,

I’m new to dynare and not really familiar with it. I’m working on a Model for almost a week now without getting results once.

This time I’m getting the error unknown symbol for symbols i clearly declared. I would really appreciate it if someone could point out the problems in my code.

Here it is:

var n_t pH_t pL_t p_t N_t NH_t NL_t l_t lH_t lL_t L_t e_t K_t A_t y_t k_t r_t w_t wH_t wL_t vH_t vL_t tau_t tauH_t tauL_t sH_t sL_t s_t S_t uH_t uL_t cH_tt1 cH_tt2 cL_tt1 cL_tt2 B_t Z_t z_t v_t Y_t; //tauH_t tauL_t für modified payg

varexo dn_t dpH_t dpL_t;

parameter phi gamma alpha beta pi delta rho chi theta n_T n_1 pH_1 pH_T pL_1 pL_T;

n_1 = 0.1;
n_T = -0.15;
p_1 = 0.59;
p_T = 0.82;
pH_1 = 0.6482;
pH_T = 0.8516;
pL_1 = 0.5736;
pL_T = 0.8111;
phi = 0.22;
rho = 0.85;
delta = 2.25;
chi = 2.0;
beta = 3.0;
alpha = 0.4;
gamma = 0.9936;
pi = 0.0483;
theta = 0.9;

initval;
    n_t = n_1;
    pH_t = pH_1;
    pL_t = pL_1;
    dn_t = 0;
    dpH_t = 0;
    dpL_t = 0;
end;

shocks;
    var dn_t;
    periods 1 2 3 4;
    values 0.0833334 0.0833334 0.0833334 0; 

    var dpH_t;
    periods 1 2 3 4;
    values  0.0678 0.0678 0.0678 0;

    var dpL_t;
    periods 1 2 3 4;
    values 0.0792 0.0792 0.0792 0;
end;


model;

// Bevölkerungswachstumsrate n_t:
n_t = n_t(-1) - dn_t;

// Überlebenswahrscheinlichkeit pH_t:
pH_t = pH_t(-1) + dpH_t;

// Überlebenswahrscheinlichkeit pL_t:
pL_t = pL_t(-1) + dpL_t;

NH_t = phi * N_t;
NL_t = N_t - NH_t;
N_t = (1 + n_t(-1)) * N_t(-1);

vH_t = pi * A_t * wH_t * (1 - lH_t) * (1 + n_t) / pH_t;
vL_t = pi * A_t * wL_t * (1 - lL_t) * (1 + n_t) / pL_t;
v_t = pi * A_t * w_t * (1 - l_t) * (1 + n_t) / p_t;


cH_tt1 = ((1- pi) * A_t * wH_t + (1 - lH_t(+1)) * (1 + n_t(+1)) * pi / (1 + r_t (+1)) * A_t(+1) * wH_t(+1)) / (1 + pH_t(+1) * rho + delta);
cL_tt1 = ((1- pi) * A_t * wL_t + (1 - lL_t(+1)) * (1 + n_t(+1)) * pi / (1 + r_t (+1)) * A_t(+1) * wL_t(+1)) / (1 + pL_t(+1) * rho + delta);

cH_tt2 = rho / (1 + pH_t(+1) * rho + delta) *((1 + r_t(+1)) * (1 - pi) * A_t * wH_t + (1 - lH_t(+1)) * (1 + n_t(+1)) * pi * A_t(+1) * wH_t(+1));
cL_tt2 = rho / (1 + pL_t(+1) * rho + delta) *((1 + r_t(+1)) * (1 - pi) * A_t * wL_t + (1 - lL_t(+1)) * (1 + n_t(+1)) * pi * A_t(+1) * wL_t(+1));

lH_t = delta / (1 + pH_t(+1) * rho + delta) * ( 1 + ((1 - lH_t(+1)) * (1 + n_t(+1)) * pi * A_t(+1) * wH_t(+1)) / ((1 + r_t(+1)) * (1 - pi) * A_t * wH_t));
lL_t = delta / (1 + pL_t(+1) * rho + delta) * ( 1 + ((1 - lL_t(+1)) * (1 + n_t(+1)) * pi * A_t(+1) * wL_t(+1)) / ((1 + r_t(+1)) * (1 - pi) * A_t * wL_t));

sH_t = (pH_t(+1) * rho) / (1 + pH_t(+1) * rho + delta) * (1 - pi) * A_t * wH_t - (1 + delta) / (1 + pH_t(+1) * rho + delta) * ((1-lH_t(+1))* (1 + n_t(+1)) * pi) / (1 + r_t(+1)) * A_t(+1) * wH_t(+1);
sL_t = (pL_t(+1) * rho) / (1 + pL_t(+1) * rho + delta) * (1 - pi) * A_t * wL_t - (1 + delta) / (1 + pL_t(+1) * rho + delta) * ((1-lL_t(+1))* (1 + n_t(+1)) * pi) / (1 + r_t(+1)) * A_t(+1) * wL_t(+1);

z_t = Z_t / (A_t * L_t);
K_t = N_t(-1) * s_t(-1) + Z_t(-1);
S_t = N_t * s_t + Z_t;
s_t = phi * sH_t + (1 - phi) * sL_t;

uH_t = log(cH_tt1) + delta * log(lH_t) + pH_t(+1) * rho * log(cH_tt2);
uL_t = log(cL_tt1) + delta * log(lL_t) + pL_t(+1) * rho * log(cH_tt2);

A_t = (1 + gamma) * A_t(-1);
B_t = pi * A_t * w_t * L_t + tau_t * N_t;
Y_t = K_t^alpha * (A_t * L_t)^(1-alpha);
Z_t = 0;

y_t = Y_t / (A_t * L_t);
k_t = K_t/(A_t * L_t);
wH_t = (w_t - (1 - phi) * wL_t) / phi; //??
wL_t = wH_t / beta;                    //??
r_t = alpha * k_t^(alpha -1) - 1;
w_t = (1 - alpha) * k_t^alpha;

L_t = ((1-lH_t) * phi * N_t + (1 - lL_t) * (1- phi)) * N_t;

p_t = phi * pH_t + (1- phi) * pL_t;
l_t = 1 - ((1-lH_t) * phi + (1 - lL_t) * (1- phi));
e_t = 1-l_t;

tau_t = 0;
tauH_t = 0;
tauL_t = 0;

end;

steady;

Here is my current error:

Starting Dynare (version 6.1).
Calling Dynare with arguments: none
Starting preprocessing of the model file ... 
ERROR: NDC1.mod: line 60, cols 8-10: Unknown symbol: phi 
ERROR: NDC1.mod: line 64, cols 8-9: Unknown symbol: pi 
ERROR: NDC1.mod: line 65, cols 8-9: Unknown symbol: pi 
ERROR: NDC1.mod: line 66, cols 7-8: Unknown symbol: pi 
ERROR: NDC1.mod: line 69, cols 15-16: Unknown symbol: pi 
ERROR: NDC1.mod: line 69, cols 67-68: Unknown symbol: pi 
ERROR: NDC1.mod: line 69, cols 127-129: Unknown symbol: rho 
ERROR: NDC1.mod: line 69, cols 133-137: Unknown symbol: delta 
ERROR: NDC1.mod: line 70, cols 15-16: Unknown symbol: pi 
ERROR: NDC1.mod: line 70, cols 67-68: Unknown symbol: pi 
ERROR: NDC1.mod: line 70, cols 127-129: Unknown symbol: rho 
ERROR: NDC1.mod: line 70, cols 133-137: Unknown symbol: delta 
ERROR: NDC1.mod: line 72, cols 10-12: Unknown symbol: rho 
ERROR: NDC1.mod: line 72, cols 32-34: Unknown symbol: rho 
ERROR: NDC1.mod: line 72, cols 38-42: Unknown symbol: delta 
ERROR: NDC1.mod: line 72, cols 68-69: Unknown symbol: pi 
ERROR: NDC1.mod: line 72, cols 120-121: Unknown symbol: pi 
ERROR: NDC1.mod: line 73, cols 10-12: Unknown symbol: rho 
ERROR: NDC1.mod: line 73, cols 32-34: Unknown symbol: rho 
ERROR: NDC1.mod: line 73, cols 38-42: Unknown symbol: delta 
ERROR: NDC1.mod: line 73, cols 68-69: Unknown symbol: pi 
ERROR: NDC1.mod: line 73, cols 120-121: Unknown symbol: pi 
ERROR: NDC1.mod: line 75, cols 8-12: Unknown symbol: delta 
ERROR: NDC1.mod: line 75, cols 32-34: Unknown symbol: rho 
ERROR: NDC1.mod: line 75, cols 38-42: Unknown symbol: delta 
ERROR: NDC1.mod: line 75, cols 87-88: Unknown symbol: pi 
ERROR: NDC1.mod: line 75, cols 136-137: Unknown symbol: pi 
ERROR: NDC1.mod: line 76, cols 8-12: Unknown symbol: delta 
ERROR: NDC1.mod: line 76, cols 32-34: Unknown symbol: rho 
ERROR: NDC1.mod: line 76, cols 38-42: Unknown symbol: delta 
ERROR: NDC1.mod: line 76, cols 87-88: Unknown symbol: pi 
ERROR: NDC1.mod: line 76, cols 136-137: Unknown symbol: pi 
ERROR: NDC1.mod: line 78, cols 20-22: Unknown symbol: rho 
ERROR: NDC1.mod: line 78, cols 43-45: Unknown symbol: rho 
ERROR: NDC1.mod: line 78, cols 49-53: Unknown symbol: delta 
ERROR: NDC1.mod: line 78, cols 63-64: Unknown symbol: pi 
ERROR: NDC1.mod: line 78, cols 87-91: Unknown symbol: delta 
ERROR: NDC1.mod: line 78, cols 112-114: Unknown symbol: rho 
ERROR: NDC1.mod: line 78, cols 118-122: Unknown symbol: delta 
ERROR: NDC1.mod: line 78, cols 158-159: Unknown symbol: pi 
ERROR: NDC1.mod: line 79, cols 20-22: Unknown symbol: rho 
ERROR: NDC1.mod: line 79, cols 43-45: Unknown symbol: rho 
ERROR: NDC1.mod: line 79, cols 49-53: Unknown symbol: delta 
ERROR: NDC1.mod: line 79, cols 63-64: Unknown symbol: pi 
ERROR: NDC1.mod: line 79, cols 87-91: Unknown symbol: delta 
ERROR: NDC1.mod: line 79, cols 112-114: Unknown symbol: rho 
ERROR: NDC1.mod: line 79, cols 118-122: Unknown symbol: delta 
ERROR: NDC1.mod: line 79, cols 158-159: Unknown symbol: pi 
ERROR: NDC1.mod: line 84, cols 7-9: Unknown symbol: phi 
ERROR: NDC1.mod: line 84, cols 25-27: Unknown symbol: phi 
ERROR: NDC1.mod: line 86, cols 22-26: Unknown symbol: delta 
ERROR: NDC1.mod: line 86, cols 53-55: Unknown symbol: rho 
ERROR: NDC1.mod: line 87, cols 22-26: Unknown symbol: delta 
ERROR: NDC1.mod: line 87, cols 53-55: Unknown symbol: rho 
ERROR: NDC1.mod: line 89, cols 12-16: Unknown symbol: gamma 
ERROR: NDC1.mod: line 90, cols 7-8: Unknown symbol: pi 
ERROR: NDC1.mod: line 91, cols 11-15: Unknown symbol: alpha 
ERROR: NDC1.mod: line 91, cols 34-38: Unknown symbol: alpha 
ERROR: NDC1.mod: line 96, cols 20-22: Unknown symbol: phi 
ERROR: NDC1.mod: line 96, cols 35-37: Unknown symbol: phi 
ERROR: NDC1.mod: line 97, cols 15-18: Unknown symbol: beta 
ERROR: NDC1.mod: line 98, cols 7-11: Unknown symbol: alpha 
ERROR: NDC1.mod: line 98, cols 20-24: Unknown symbol: alpha 
ERROR: NDC1.mod: line 99, cols 12-16: Unknown symbol: alpha 
ERROR: NDC1.mod: line 99, cols 25-29: Unknown symbol: alpha 
ERROR: NDC1.mod: line 101, cols 19-21: Unknown symbol: phi 
ERROR: NDC1.mod: line 101, cols 48-50: Unknown symbol: phi 
ERROR: NDC1.mod: line 103, cols 7-9: Unknown symbol: phi 
ERROR: NDC1.mod: line 103, cols 24-26: Unknown symbol: phi 
ERROR: NDC1.mod: line 104, cols 23-25: Unknown symbol: phi 
ERROR: NDC1.mod: line 104, cols 46-48: Unknown symbol: phi 
Preprocessing time: 0h00m01s.
Error using dynare (line 297)
Dynare: preprocessing failed

thanks in advance,
Felix

The keyword is parameters not parameter.