I’m trying to use stoch_simul to solve a model, getting a bevy of error messages (which message I get depends on whether I use first or second order approximation).

1st order errors:

After calculating policy functions, it displays theoretical moments, most of which are NaN, then a variance decomposition for one variable, then the following error messages:

??? Subscripted assignment dimension mismatch.

Error in ==> disp_th_moments at 105

z(:,i) = diag(oo_.gamma_y{i+1}(i1,i1));

Error in ==> stoch_simul at 73

disp_th_moments(oo_.dr,var_list);

For second order, I get to the same point in the process but instead get the following errors:

??? Error using ==> rdivide

Matrix dimensions must agree.

Error in ==> th_autocovariances at 162

Gamma_y{nar+2}(stationary_vars,i) = Gamma_y{nar+ …

Error in ==> disp_th_moments at 37

[oo_.gamma_y,stationary_vars] = th_autocovariances(dr,ivar,M_,options_);

Error in ==> stoch_simul at 73

disp_th_moments(oo_.dr,var_list);

Any ideas what’s going on or how to fix it?