Help with fsolve in solving multiple steady states

Dear All

I am fairly new to dynare/matlab, and i am having some troubles with solving the steady states for my model using numerical methods (fsolve). I am trying to solve 7 equations with 7 unknowns from Iacoviello (2017) but where i have changed from log-utility to non-separable utility which complicates things a bit.
I am trying to solve the model in a zero-lower-bound setting.
The codes for the steady states and fsolve file are attached, and the “error” i am having is the following:
“Error using Vertcat. Dimensions of matrices being concatenated are not consistent” I know this is an error in the dimensions of the equations, i just don’t know where the error lies (probably in the solver file).
Other than this i am not even sure i can use Fsolve the way I have tried to, so please point out if it is all wrong from a methodology perspective.
(All the estimations values are from Iacoviello (2017) and Christiano (2011))

Thank you all in advance.

baby00_steadystate_example.m (212 Bytes)

findSS.m (1.2 KB)

Notice: The Steady_state_example file is NOT cleaned up, hence so many equations commented out.

The files you uploaded are not sufficient to reproduce the problem.

Hi Johannes,
I am sorry for the inconvenience, i have attached here the last file (which should be making the figure i am searching).
I forgot all about it in my original post. runsimFig_3.m (4.8 KB)

Kind Regards

There are still files missing, e.g. paramfile_baby00.

Again, i am very sorry!
Please find the paramfile here.paramfile_baby00.m (818 Bytes)

Now I get that solve_two_constraints is missing. This sounds like you are using Occbin. In that case, I cannot really help you.

Yes i am using OccBin (or trying to).

But thank you for the help anyway.
I will see if i can find a way around it.

My problem with Occbin always was that the steady state files do not conform to Dynare best practices, i.e. do not use the generic loops as in


to pass back the steady states. The manual coding with returning a manually defined ys is very error-prone.

Okay I think I understand.

One last question, does this mean that i cannot finish this assigment, or does it merely mean i should change my model, such that the steady states can be solved analytically?

The major problem I am facing is that I have no idea of where i should go from here.

It’s not about solving analytically. You can use a steady state file to return a numerically computed steady state. It is about using the correct structure/syntax.

I have followed your advice from earlier threads about starting from a working (simpler) model, and working my way forward. Hope it turns out well.

But thank you very much for your guidance!