Hi,

I am currently trying to work on an optimal Ramsey policy for the model in Dynare. I tried using Taylor rule for the same model and the results looked fine with no residuals. The problem now is that when I try to find the optimal Ramsey policy with single instrument(Inflation), I get the following error:

Index exceeds matrix dimensions.

Error in btl_old_ramsey_static (line 168)

residual(1) =

params(43)*T11*T27^(1-params(12))-params(52)*T34*params(43)*getPowerDeriv(params(43)*y(1),1+params(11),1)+params(43)*y(61)+y(45)*(-(params(23)*params(43)*y(11)))+y(43)*T54+T54*y(40);

Error in evaluate_static_model (line 63)

residuals = feval(fh_static,ys,exo_ss,params);

Error in evaluate_steady_state_file (line 133)

[residuals, check] = evaluate_static_model(ys, exo_ss, params, M, options);

Error in evaluate_steady_state (line 59)

[ys,params,info] = evaluate_steady_state_file(ys_init,exo_ss,M, …

Error in resol (line 104)

[dr.ys,M.params,info] =

evaluate_steady_state(oo.steady_state,M,options,oo,~options.steadystate.nocheck);

Error in stoch_simul (line 89)

[oo_.dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_);

Error in ramsey_policy (line 42)

info = stoch_simul(var_list);

Error in btl_old_ramsey (line 720)

ramsey_policy(var_list_);

Error in dynare (line 223)

evalin(‘base’,fname) ;

As I already have a steady state file from the Taylor rule, I tried using the same steady state file which didn’t work and also the second alternative-

I tried giving the numerical guess values of all the endogenous variables in the initial block and I got the same error. Can anyone please explain which matrix it refers to when it shows “Index exceeds matrix dimension”?

Thank you

Ruthvik