Assignment has more non-singleton rhs dimensions

Hi, will someone help check this programme for me? It’s a bit long, but I just need some general tips to cope with the error that Matlab tells me, i.e. someone please tell me which block I have to change, is it parameters, models or variables? Seems that there are some non-stationarity problems.
Many Thanks!
Programme is in the attach, and following is the error message:

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

Error in ==> th_autocovariances at 154
Gamma_y{nar+2}(stationary_vars,i) = vx2;

Error in ==> disp_th_moments at 37
[oo_.gamma_y,stationary_vars] = th_autocovariances(dr,ivar,M_,options_);

Error in ==> stoch_simul at 73

Error in ==> FDI at 485
info = stoch_simul(var_list_);

Error in ==> dynare at 132
evalin(‘base’,fname) ;
FDI.mod (6.82 KB)

As far as I can remember, when I have had similar error messages in the past it was because I had got the names of my variables mixed up. For example, when I had declared e_a under varexo but ea for the standard deviation of the shocks just before the stoch_simul command.

What I understand the error message to mean (I might be wrong, of course) is that when the Matlab routine is going through your variable names one name at a time (element-by-element) from one matrix and looking up a value in a different matrix, then the dimensions don’t match. In that case, the corresponding value that Matlab tries to associated with a variable doesn’t exist. With me, this was because I had mistyped a name so Matlab was looking for a value that didn’t exist…

I hope this helps…


Thanks for reporting this.

It is a bug in Dynare, which only appears when all the variables listed after “stoch_simul” are non-stationary.

This is the case with your MOD file. If you remove the list on the “stoch_simul” line, you should get a correct output.

This problem will be fixed in Dynare 4.1.3.

Thank you very much for both of your help.
I remove the variable list and it does work out.