I have a model that I am trying to love. The following shows the error for each of the equation being close to zero.

Equation number 1 : -0.00019977 : Lambda

Equation number 2 : 0 : M

Equation number 3 : 0 : p

Equation number 4 : 0 : 4

Equation number 5 : -0.0010725 : 5

Equation number 6 : -0.0027062 : 6

Equation number 7 : 0 : 7

Equation number 8 : -8.6782e-05 : z_r

Equation number 9 : -7.9136e-05 : z_lr

Equation number 10 : -6.6192e-06 : y

Equation number 11 : -6.6173e-06 : pi

Equation number 12 : -6.9881e-06 : d

Equation number 13 : 0 : D

Equation number 14 : 0 : 14

Equation number 15 : 0 : 15

Equation number 16 : 0.001224 : 16

Equation number 17 : 0.0013341 : 17

Equation number 18 : -0.003505 : 18

Equation number 19 : -0.00094701 : 19

Equation number 20 : 0 : lev

Equation number 21 : 0 : log_p

Equation number 22 : 0 : log_e

Equation number 23 : 0 : log_md

Equation number 24 : 0 : log_mc

Equation number 25 : 0 : log_r

Equation number 26 : 0 : log_lev

Equation number 27 : 0 : log_ar

Equation number 28 : 0 : log_alr

Equation number 29 : 0 : log_as

However, there is still the â€śimpossible to find steady stateâ€ť error and it shows that â€śsum of square residuals of the static equationsâ€ť is 0.0000. The initial guess is solved directly using an external .m file.

Why is this happening? Can you give me some help to make this go through?

I followed suggestion from another post by adding

options_.dynatol.f=5e-4;

before the steady command, but I this does not seem to do anything.

Can you please give me some help? Thank you!

1 Like

Your largest residual is 2e-3, so using 5e-4 as a tolerance criterion will not work. If you solved for the steady state numerically, try increasing the precision of the solver.

I have changed the residual to value smaller than the largest residual, but it still does not work.

resid(1);

options_.dynatol.f= 5e-3;

steady(solve_algo = 2, maxit = 1000000);

check;

Is this the right syntax?

1 Like

I would need to see the full file.

model_xi8.mod (3.1 KB)

This is the model file. The vector x8 is the vector of initial guesses that I calculate outside of this file, it wonâ€™t run independently. However if I run it, I get the following error with residuals

Residuals of the static equations:

Equation number 1 : 0 : Lambda

Equation number 2 : 0 : M

Equation number 3 : 0 : p

Equation number 4 : 0 : 4

Equation number 5 : -0.00094814 : 5

Equation number 6 : -0.0025217 : 6

Equation number 7 : 0 : 7

Equation number 8 : 0 : z_r

Equation number 9 : 0 : z_lr

Equation number 10 : 0 : y

Equation number 11 : 0 : pi

Equation number 12 : 0 : d

Equation number 13 : 0 : D

Equation number 14 : 0 : 14

Equation number 15 : 0 : 15

Equation number 16 : 0.0010581 : 16

Equation number 17 : 0.0011037 : 17

Equation number 18 : -0.0031503 : 18

Equation number 19 : -0.00098856 : 19

Equation number 20 : 0 : lev

Equation number 21 : 0 : log_p

Equation number 22 : 0 : log_e

Equation number 23 : 0 : log_md

Equation number 24 : 0 : log_mc

Equation number 25 : 0 : log_r

Equation number 26 : 0 : log_lev

Equation number 27 : 0 : log_ar

Equation number 28 : 0 : log_alr

Equation number 29 : 0 : log_as

Error using print_info (line 32)

Impossible to find the steady state (the sum of square residuals of the static equations is 0.0000). Either the model doesnâ€™t have a steady

state, there are an infinity of steady states, or the guess values are too far from the solution

It seems I canâ€™t make the residuals smaller and the tolerance option does not seem to work. Could you help me get over this step. Thank you so much.

Jeremy

Then I need the values for `x8`

as well.

x8 = [1.0e+03 * 1.9489, 0.0001, 0.2661, 0.2534, 1.0667, 0.6164, 0.0006, 2.1071, 1.5861, 0.0000, 0.0000, 0.0006, 0.0136]

Here it is! Thank you!

Given the size differences in the vector, the posted vector does not have sufficient precision.

Then why does it say the sum of square residuals of the static equations is 0.0000?

Is there a way to control the tolerance level?

What I was saying is: you cannot post numerical values with single precision here and expect the code too work on my machine if double precision is needed. Use e.g. `format long`

.

Would it be possible to get a general advice on how to solve this problem? Judging by the error message â€śImpossible to find the steady state (the sum of square residuals of the static equations is 0.0000)â€ť, it seems like there is a way to adjust the tolerance level a bit to make this go through?

I tried adding

resid(1);

options_.dynatol.f= 5e-3;

steady(solve_algo = 2, maxit = 1000000);

check;

before the steady command but it does not work.

With `solve_algo=2`

, you need to use `options.solve_tolf`

, not `options_.dynatol.f`

.

3 Likes