Hi, everyone:

my code for simulation goes well. But for estimation with the data simulated,It doesn’t and it says:

Some element of Newton direction isn’t finite. Jacobian maybe singular or there is a problem withinitial values

my steady state values are the steady state value .I wonder if there is sth wrong with my code or my model.

my code for estimation and simulation are attached.

Thanks a lot.waiting for your repy!

First_simul.m (9.42 KB)

es_2013_31.mod (3.95 KB)

sm_2013_31.mod (3.39 KB)

The problem is that given your new draw in estimation, the steady state cannot be found. You should move the definition of the steady state values to the initval-block so that they are updated every iteration. Alternatively, you can use a steady state file.