Inf or NaN - steady state - stoch simul

Hi everyone,
It’s the first time I use dynare and I’m struggling with errors…

When I run my dynare code, appear this error:
Warning: Some of the parameters have no value (U, wgss, wbss, cgss) when using steady. If these parameters are
not initialized in a steadystate file or a steady_state_model-block, Dynare may not be able to solve the model…
Residuals of the static equations:

Equation number 1 : NaN
Equation number 2 : NaN
Equation number 3 : NaN
Equation number 4 : NaN
Equation number 5 : NaN
Equation number 6 : NaN
Equation number 7 : NaN
Equation number 8 : NaN
Equation number 9 : NaN
Equation number 10 : NaN
Equation number 11 : NaN
Equation number 12 : NaN
Equation number 13 : NaN
Equation number 14 : NaN
Equation number 15 : NaN
Equation number 16 : NaN
Equation number 17 : NaN
Equation number 18 : NaN
Equation number 19 : NaN
Equation number 20 : NaN
Equation number 21 : NaN
Equation number 22 : NaN
Equation number 23 : NaN
Equation number 24 : NaN
Equation number 25 : NaN

Error using print_info (line 90)
The steady state contains NaN or Inf
Error in steady (line 104)
print_info(info,options_.noprint, options_);
Error in withotjs (line 394)
steady;
Error in dynare (line 223)
evalin(‘base’,fname)

I attached my dynare code in document attached.
Could you please help me to solve it?
Thank you so much

withotjs.mod (3.1 KB)

You must define the parameter definitions in a proper sequential way. See e.g. Inf or NaN - steady state - stock simul

This is what I’ve done…

U=1-n;
n=ngss+nbss;

is clearly not sequential. You are using n before you define it.

Thank you for your help. I corrected the error and try to see if there was another one in the sequential way but I found none and I have still the same message error. I really don’t understand…

Please provide the updated file.

Here is the updated file. I think my mistakes are in the equations…

withonthejob.mod (3.2 KB)

Now there is a bracket missing in

Y=(yb^(alpha)*yg^(1-alpha);

oh yes, i didn’t save the file sorry…

Krause.mod (3.5 KB)

Now the entered equations do not match your steady state computations. So either the steady state is still wrong or the entered equations. Is this a replication you are working on?

It’s a replication of the paper of Krause and Lubik 'the cyclical upgrading of labor and the on-the-job search.
I tried to replicate the on-the-job search model