Steady state block

I have a question about steady_state_block. Is it necessary that the equation system in the steady state block should be in a recurisive form? I get the error message that my variable lg is undefined in the declaration of lh. This is bound to happen if the steady state equation system is not in a recursive form which is very likely for a nonlinear equation system. I attach my programme. Any help please?

AP17_jan2015.mod (4.14 KB)

Yes, it needs to be recursive as the steady_state_model-block takes a fully computed solution. It is not there for you entering an equations system to be solved. If you want to do something like this, the solution is a bit more involved. The easiest way is to use a steady state file to call a nonlinear solver. See the NK_baseline.mod in the Dynare examples folder.

Thank you.