I saw a plot policy function ‘plot_policy_fun.m’ from Johannes Pfeifer for using Dynare. Is there a corresponding function for Dynare++?

No, there is not. Is there a reason you are using Dynare++ and not Dynare?

Thanks a lot for your reply, Johannes. I use dynare++ to get higher order approximations (say fourth or fifth order) to calculate stock risk premium. I just compared dynare 3rd order (stoch_simul(order=3,periods=100000,drop=1000,irf=0)) and the default setting of dynare++ 3rd order (!dynare++ --sim 80 --per 100 XX.mod). The dyn_ss for dynare++ is slightly different from the simulated moments of dynare. Is this because I used different simulation settings? If I set the same simulation periods and simulation rounds for both, would dynare++ and dynare give the exact same results at 3rd order?

I’m also playing with your ‘plot_policy_fun.m’. Why does the plot show the state variable with one lag like a(-1)? ‘a’ is TFP. Would this period output be a function of this period TFP, Y(t) = f(a(t),K(t-1))? Could you explain this? Thanks again.

- What you compute in Dynare is the ergodic mean (simulation with shocks). In Dynare++ you compute the stochastic steady state (simulation without shocks). That should explain the difference.
- Technology at time t, a(t) is not a state variable. State variables must be predetermined.