Error in dynare (line 235) evalin('base',fname)

Hi everyone,
NKMODEL.mod (4.1 KB)

I attach my model where in another matlab script I attempt to loop over monetary authority’s parameters phiy and phipai (no problems there) and also over eta from 0 to 1 with 0.2 steps. As soon as eta=1 I get this error message:
Error in NKMODEL (line 241)
m(:,oo_.dr.state_var) = oo_.dr.ghx(oo_.dr.inv_order_var,:);
Error in dynare (line 235)
evalin(‘base’,fname) ;

Any suggestions ? Thank you in advance

  1. First of all, do not loop over stoch_simul and resol. You only need the latter. In particular, you are not supposed to loop over Dynare syntax, only over the calls to Matlab functions.
  2. You need to condition on the error code returned by resol, i.e. the content of info. It will tell you if the BK conditions are satisfied or not. You can see all cases in print_info.m:
      case 3
        error(['Blanchard Kahn conditions are not satisfied: no stable' ...
               ' equilibrium'])
      case 4
        error(['Blanchard Kahn conditions are not satisfied:' ...
               ' indeterminacy'])
      case 5
        error(['Blanchard Kahn conditions are not satisfied:' ...
               ' indeterminacy due to rank failure'])

The problem you experience is that you are trying to read out a decision rule coefficient, but the model does not have a solution. So the decision rule you are trying to access does not exist.

For a code mapping the determinacy region, see