Hello,
I’m trying to run the attached code. It’s a small open economy model with 2 frictions: capital adjustment costs and government reversal expenditure. I closed the model by specifying a foreign debt elastic interest rate.
When running the code, I get this error message: “numerical initial values incompatible with the following equations 22”. It weird since I don’t see why the initial values (calculated by hands) should be incompatible.

Could anyone please help me?
Many thanks!
RT newsalex.mod (2.15 KB)

Your steady state values don’t solve the model, however the problem is not in equation 22. I don’t know why it is giving that error, but if you replace ‘initval’ with ‘steady_state_model’ (see the documentation here dynare.org/manual/index_20.h … _005fmodel if you are interested), and you will see that the residuals of equations 6-8 are not zero. I would focus on those equations…

After making the change, the output from Dynare in Matlab is

Residuals of the static equations:

Equation number 1 : 0
Equation number 2 : 0
Equation number 3 : 0
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : 0.28083
Equation number 7 : 0.15556
Equation number 8 : 0.95483
Equation number 9 : 0
Equation number 10 : 0
Equation number 11 : 0
Equation number 12 : 0
Equation number 13 : 0
Equation number 14 : 0
Equation number 15 : 0
Equation number 16 : 0
Equation number 17 : 0
Equation number 18 : 0
Equation number 19 : 0
Equation number 20 : 0
Equation number 21 : 0
Equation number 22 : 0
Equation number 23 : 0

??? Error using ==> steady_ at 104
The steadystate values returned by newsalex_steadystate.m don’t solve the static model!

Hi bkjecn,
Thanks for your reply!!
Those equations are:

Production function: y=a*k^(alpha)*h^(1-alpha);

Marginal productivity of capital: rk=aalphak^(alpha-1)h^(1-alpha);
Marginal productivity of labor: w=a(1-alpha)*k^(alpha)*h^(-alpha);

I think the issue is with a (the TFP process): a=rhoa*a(-1)+ea;
I specified the steady state value to zero and the steady state of equations 6, 7, and 8 as:

If the steadystate value of ‘a’ is zero, then the steadystate value of equations 6-8 is zero. They are all multiplied by ‘a’. I think right now your model implies a zero steady state for output.

[quote=“bkjecn”]Your steady state values don’t solve the model, however the problem is not in equation 22. I don’t know why it is giving that error, but if you replace ‘initval’ with ‘steady_state_model’ (see the documentation here dynare.org/manual/index_20.h … _005fmodel if you are interested), and you will see that the residuals of equations 6-8 are not zero. I would focus on those equations…

After making the change, the output from Dynare in Matlab is

Residuals of the static equations:

Equation number 1 : 0
Equation number 2 : 0
Equation number 3 : 0
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : 0.28083
Equation number 7 : 0.15556
Equation number 8 : 0.95483
Equation number 9 : 0
Equation number 10 : 0
Equation number 11 : 0
Equation number 12 : 0
Equation number 13 : 0
Equation number 14 : 0
Equation number 15 : 0
Equation number 16 : 0
Equation number 17 : 0
Equation number 18 : 0
Equation number 19 : 0
Equation number 20 : 0
Equation number 21 : 0
Equation number 22 : 0
Equation number 23 : 0

??? Error using ==> steady_ at 104
The steadystate values returned by newsalex_steadystate.m don’t solve the static model!

Error in ==> steady at 54
steady_;

Error in ==> newsalex at 185
steady;

Error in ==> dynare at 120
evalin(‘base’,fname) ;[/quote]

I also have a model which residuals are not all zeros. What does these residuals mean, please tell me!! Thank you!!!

rteconomics: you have to change the model so that the steady state of ‘a’ actually is something other than zero. One way to do this would be to say that log(a) = rho * log(a(-1)) + e where ‘e’ is a shock. Then ‘a’ is always positive and the steady state is 1.

flyingpig: if you take all of your equations and write them so that they are of the form ‘0 = equation’, the residual is the value of the right-hand side when you plug in the values you gave the model for steady-state values. These all have to be zero for the steady-state values to actually satisfy the equations of the model. If you have non-zero residuals, then you failed to solve for the steady-state values.