Index exceeds matrix dimensions & SS problems

Dear all,

I’m trying to replicate Sims 2017 Financial Frictions model in this link. I’m attaching my .mod and steady-state file.

The error I receive is “index exceeds matrix dimensions”. Additionally, I also couldn’t reach the steady state values of my system of equations as well. I would appreciate any help/guidance on these.

Many thanks for your time,

RBCSIMS_steadystate.m (1.8 KB) RBCSIMS.mod (2.6 KB)

I fixed some of the issues and moved to a Dynare 4.6 version of the steady state file. There is now only a problem with one of the equations.

RBCSIMS_steadystate.m (2.0 KB) RBCSIMS.mod (2.6 KB)

Dear Prof. Pfeifer,

Thank you so much for your reply and help in restructuring the ss file. I have two comments based on your reply:
i. I’m not clear why you set alpha and beta as zero in the steady state file. ii. I also went through my equations multiple times and could not notice the problem in the equations.

I’m attaching the current mod and steady-state file for reference.
The error I receive currently is “Not enough input arguments”. Any guidance would be much appreciated.

Best regards,

RBCSIMS.mod (2.5 KB) RBCSIMS_steadystate.m (2.0 KB)

  1. I do not really set them. I needed to put the explicit parameter name in the file, because otherwise Dynare thinks that alpha is the builtin-Matlab function. Next time use different names. The loop after that setting actually sets the parameter value to what you defined in the mod-file.
  2. As I wrote, you need to use Dynare 4.6 for the file. You will see the one file with a residual.
1 Like

Dear Prof Pfeifer,

Thank you so much! Indeed, I was able to see the error after updating to Dynare 4.6. I have one last clarification question. My impulse responses are slightly off the scales than the original paper, unless I shock the system using a very high value such as:

shocks;
var epsilona = 1;
end;

Compared to examples in your 2013 (specifying observation equation) document, setting this value seems too high to be true. Can the reason be some of the missing exp()s in my equations? Unfortunately, the moment I try exp()'ing all my endogenous variables, I start to get residuals greater than zero. I would be so grateful if you have any insight on this.

With many thanks,

RBCSIMS_steadystate.m (2.0 KB) RBCSIMS.mod (2.5 KB)

Instead of exp()-substitution, you should go for option 3 at

1 Like

Dear Prof Pfeifer,

I have followed option 3 example and succesfully generated the same impulse responses, thank you so much!

I am sending my updated code with one minor follow-up question. I tried to augment this system by adding taxes to it. Despite the fact that I tried to stick to the naming convention in dynare, I get the error of “not enough input arguments”. I’ve checked the previous posts in the forum, yet still could not figure out the source of this error. Would you have any insights about this?

Best wishes,

RBCSIMS_steadystate.m (2.2 KB) RBCSIMS.mod (2.6 KB) ?

You seem to again be using the wrong Dynare version. In 4.6 I am getting
Residuals of the static equations:

Equation number 1 : 0 : lambda
Equation number 2 : -0.60339 : 2
Equation number 3 : 0 : 3
Equation number 4 : -0.25821 : 4
Equation number 5 : 0 : 5
Equation number 6 : 0.0045804 : q
Equation number 7 : -0.25901 : 7
Equation number 8 : 0 : log_psi
Equation number 9 : 0 : y
Equation number 10 : 0 : 10
Equation number 11 : 0 : k
Equation number 12 : 0 : log_A
Equation number 13 : 0 : 13
Equation number 14 : 0 : 14
Equation number 15 : 0 : log_c
Equation number 16 : 0 : log_w
Equation number 17 : 0 : log_n
Equation number 18 : 0 : log_k
Equation number 19 : 0 : log_r
Equation number 20 : 0 : log_y
Equation number 21 : 0 : log_i

Error using print_info (line 32)
The steadystate file did not compute the steady state