I am having some difficulties solving my model, or computing the steady state of it that is, due to wrong initial values I assume. I have tried several alternatives of solve algo and homotopy:

Using homotopy I get the following error message in Matlab:

STEADY: numerical initial values incompatible with the following equations
1 2 3 4 6 9 11 12 14 16 18 21

??? Error using ==> dynare_solve
exiting …

Error in ==> steady_ at 124
[oo_.steady_state,check] = dynare_solve([M_.fname ‘_static’],…

Error in ==> steady at 52
steady_;

Error in ==> model_1 at 228
steady;

Error in ==> dynare at 132
evalin(‘base’,fname) ;

I have attached my mod-file below, I am thankful for all suggestions. In case there shouldn’t be some way to solve the model in dynare, does anyone maybe have an example file on how to compute the steady outside of dynare in matlab?

have you tried simplifying the model to see if you can get a steady state? That is, maybe cut some of the variables, then add them in one by one to see when it fails. To be honest, your model is too big for me to have time to look hard at it.

thanks for your help. I was really hoping I could avoid doing that this time. I am currently trying to do it variable by variable. Let’s see which one causes the problem.

so this took a while, sorry about the delay. I have consctructed a working model, which however lacks several exponents here and there. I have been trying to add the missing variables and parameters, which was unsuccesful however.

Would it be necessary to change the ‘model(linear)’ option? Which solving algorithm for the steady state would be appropriate?

I am also currently trying to compute the steady state in a separate m-file (based on the m-file by Stephan Adjeman-like my predecessor in the earlier post, I am also not familiar with the intricacies of the process), however I get the following error message:

??? Error: File: model1_steadystate.m Line: 36 Column: 38
The expression to the left of the equals sign is not a valid target for an assignment.

I am thankful for any suggestions. What exactly are the requirements for entering the equations into the m-file. I simply copied them exactly the way they are from the mod-file, I assume this must be the mistake, but I am not sure how else to enter them???

The problem lies at line 36 of model1_steadystate.m

You cannot say MATLAB something like that:

a+b=c;

Because in MATLAB the equal sign is the operator assignment. So MATLAB doesn’t know which value to assign to which variable.

In the _steadystate file, you don’t write equations like you do in the MOD file: you explictly resolve your steady state by recursively assigning values to the endogenous.

thank you, I do understand. Now that you have said it, I am realising that Stephan’s steadystate file was built exactly that way.

I do have a problem however solving my equations recursively because of all the interdependencies between them. Do you think it makes sense to try to solve it recursively considering its size or is there a way to solve for the steady state inside of dynare?

If you can’t solve it recursively, you can isolate a small subset of variables for which you need a numerical solver, and run that numerical solver from inside the _steadystate file.

Otherwise if you drop the _steadystate.m file, you can use the solver embedded inside Dynare.

problem is, solving it inside of Dynare did not work very well, I assume because of wrong initial values. I am getting the following error code:

STEADY: numerical initial values incompatible with the following equations
1 2 3 4 6 9 11 12 14 16 18

??? Error using ==> dynare_solve
exiting …

Error in ==> steady_ at 124
[oo_.steady_state,check] = dynare_solve([M_.fname ‘_static’],…

Error in ==> steady at 52
steady_;

Error in ==> model1 at 202
steady;

Error in ==> dynare at 132
evalin(‘base’,fname) ;

Like I said, I was able to make the reduced version below work, but I am not able to add anymore parameters or variables to that one. I have also tried the other solving algorithms and get similar error messages.

since my previous error message referred to wrong initial values, I entered initial values for all endogenous variables (including lots of trial and error) and achieved a spurios convergence. After an attempt to compute the steady state I am getting the following error message:

You should use the instruction “resid(1)” (before “steady;”) to identify which equation fail to hold. In ur case, only equation 8 has a residual equal to 0. You need to check ur initial values. Plus, as your model is non linear, u better remove the option “linear” in the block model.

I have added ‘resid(1)’ before the steady command and you are right, only one equation had a residual of 0. (I have deleted the linear option, thank you).

If I am understanding the ‘resid(1)’ command correctly, it calculates, the difference that is left, using the given initial values. Do I need to get zero for all euqations or are values close to zero also acceptable to compute the steady state?

By the way, I have seen/heard of possibilites to solve for the steady state of my model using mathematica. Would this be an alternative?

well, it can happen that Dynare computes the steady-state while you have non-zero residuals on certain equations, but generally they r pretty close to 0. Yet to avoid potential issues, that’s better to choose initial guesses that will give u 0 residuals.

Regarding the Mathematica option, sure that’s a possibility. You can also solve for the steady-state by hand when the model isn’t too big.