Number of endogenous variables should always match the number of equations in the model. In the example below, there are 8 endogenous variables and 8 equations. If you add J to the first equation - `UC = betta*UCp*(1-delt+R) + J;`

, dynare will throw up `unknown symbol:J`

because it is not declared here `var Y C K L A R W I`

. If you want to keep J as part of the model, you should include it in the variable block like this `var Y C K L A R W I J`

. You now have 9 endogenous variables so you should add one more non-redundant equation to the model so that number of endogenous variables (9) = the number of equations (9).

By the way, you should not just check the example, you should practice it in dynare. Get some simple models, practice with it, before building your own model. Here is a tutorial (NTG8.pdf (1.1 MB) ). Read it, practice with it, and then apply that knowledge to build your own model. It is a step by step approach. You can find many others on the internet.

Your problem is kinda very basic and that it seems this is your first time using dynare:). That is why I suggest practicing simple models first in dynare. Don’t just copy-paste the codes, read through the tutorial I sent, you will get the full picture of how to run models in dynare.

```
var Y C K L A R W I;
varexo eps_A;
parameters alph betta delt gam pssi rhoA;
alph = 0.35; betta = 0.99; delt = 0.025; gam = 1; pssi = 1.6; rhoA = 0.9;
model;
#UC = gam*C^(-1);
#UCp = gam*C(+1)^(-1);
#UL = -pssi*(1-L)^(-1);
UC = betta*UCp*(1-delt+R);
W = -UL/UC;
K = (1-delt)*K(-1)+I;
Y = I+C;
Y = A*K(-1)^alph*L^(1-alph);
W = (1-alph)*Y/L;
R = alph*Y/K(-1);
log(A) = rhoA*log(A(-1))+eps_A;
end;
```