Hi, I’m making a simple code for DSGE model with Ramsey policy (commitment). I have seen similar codes but I don’t know if mine works correctly. here is the code. Thank you so much.

```
var y_gap pi u g i ;
varexo eps_u eps_g ;
parameters beta lyamda phi rho_g rho_u gamma_pi ;
beta=0.99;
phi=1;
rho_u = 0.7;
rho_a = 0.8;
lyamda=1.7;
rho_g=0.8;
gamma_pi=1.5;
model(linear);
y_gap= -phi*(i-pi(+1))+y_gap(+1)+g;
pi=lyamda*y_gap+beta*pi(+1)+u;
g=rho_g*g(-1)+eps_g;
u=rho_u*u(-1)+eps_u;
end;
shocks;
var eps_u = 1.4;
var eps_g=0;
end;
planner_objective (-1/2)*(0.5*(y_gap^2)+pi^2);
ramsey_policy(instruments=(i),irf=13,planner_discount=beta) y_gap pi i u;
```