Stoch_simul error message

Dear Prof. Pfeifer,

I am trying to run two files (cycle_moments.mod and second_moments) which calculate the second moments of model variables following an aggregate technology shock. However, when I try to do this, I get the following error message:

Assignment has more non-singleton rhs dimensions than non-singleton subscripts

Error in second_moments (line 52)
simulation_first(:,1) = oo_.dr.ghu*E(:,1);

Error in run (line 52)
second_moments;

Can you please advice me on how to overcome this issue? Please run the ‘run.m’ file to generate the error message. Running this file as it currently is will also run cycle_moments.mod and second_moments mentioned above.

Many thanks in advance.

Forum_non-singleton.zip (658.3 KB)

A post was split to a new topic: Problem with computing steady state

ghu is 58 by 3 as there are three shocks. You multiply it by a scalar. So the RHS will be 58 by 3, while the LHS takes only 58 by 1. I guess you forgot to select the column of ghu belonging to the shock.

Good day all, I am working on fiscal and monetary policy interactions. Being having issues with my codes. Does anyone has mode file (codes) on fiscal and monetary policy interactions. I would appreciate if this can be made available for me for a guide. Many thanks