Simulated trajectory graphs

Hello,
I am currently working on a medium size DSGE model. When I use the rplot command I got trajectory graphs for endogenous variables, but I am not quite sure how to interpret the graphs. Can we compare the graphs with actual data to evaluate the performance of the model?
I also tried plotting policy functions with command
state_range=0.1:0.1:10;
state_name=‘k’;
plot_var_name=‘c’;
plot_dummy=‘1’;
plot_policy_fun(state_name,state_range,plot_var_name,plot_dummy);
but got the error message
??? Error using ==> minus
Matrix dimensions must agree.
Error in ==> simult_ at 52
y_(:,1) = y_(:,1)-dr.ys;
Error in ==> plot_policy_fun at 84
temp=simult_(y0_temp,oo_.dr,shock_mat,options_.order);
Error in ==> simul at 279
plot_policy_fun(state_name,state_range,plot_var_name,plot_dummy);
Again, could you please show me how to interpret the policy function graphs?
I am looking forward to your reply.
Thank you
Hoang
simul.mod (3.29 KB)

There is no real interpretation. They show a simulated trajectory following an abitrary sequence of shocks. There is no relation to actual data. What people typically do is compare the second moments of this artificial economy with stochastic shocks with the one from the data. If the model is close to the data, it should give similar moments.

Regarding the plot_policy_fun: use the updated version at github.com/JohannesPfeifer/DSGE_mod/tree/master/Caldara_et_al_2012 with

state_range=0.1:0.1:10; state_name='k'; plot_var_name='c'; plot_policy_fun(state_name,state_range,plot_var_name);

Thanks. I used the updated file and provided code but still got this message
??? Input argument “plot_dummy” is undefined.

Error in ==> plot_policy_fun at 89
if plot_dummy

Error in ==> simul at 278
plot_policy_fun(state_name,state_range,plot_var_name);

Error in ==> dynare at 180
evalin(‘base’,fname) ;

Could you please figure this out? Thank you
Hoang

Did you adjust the call to the function as described? It should only take three input arguments.

yes I did. But then I got the error message.

Then you must have done something wrong in replacing the function. Line 43 clearly sets plot_dummy when you have only 3 input arguments. Use

to see which file is accessed and then check whether it is the updated one.

I fixed the error. A further question: how to plot the policy function of one endogenous variable with all the other states? Thanks!

What do you mean?

sorry for the confusion. For example, c is a function of state variables k and a. we plotted c with k, and now I wonder how to plot c with k and a. does it make more sense now?

That is more complicated. You would have to follow the logic of the plot_policy_fun.m to generate a three dimensional graph.

Thank you. I appreciate your help.