Page 1 of 1

Problem with Moments and Plots

PostPosted: Wed Oct 02, 2013 12:48 am
by jgrav
Hello

I am new to Dynare and am trying to simulate an extension of the Gertler-Kiyotaki model (so many of the equations are the same as or similar to ones in the original paper). All of the computations go through and the steady state is found but many of the moments appear to have the wrong sign and no plots are being displayed (in fact, in the panel on the right side all of the variables say NaN in all periods). Also note that none of the variables are in exponential form (so the equations in the code are precisely those derived). I've attached my .mod file.

Thank you!

Re: Problem with Moments and Plots

PostPosted: Wed Oct 02, 2013 6:38 am
by jpfeifer
Given your unrealistic shock size of 100%, you should use either order=1 or pruning in stoch_simul to prevent explosive simulations.

Re: Problem with Moments and Plots

PostPosted: Wed Oct 02, 2013 2:39 pm
by jgrav
Thanks, the order=1 suggestion worked. When you say "shock size of 100%," you're referring to the fact that I set var e =1? If I change it to .01 then it becomes 1%? Also, suppose I wanted to plot some function of variables I defined (let's say S/N); then can I simply type something like "SoverN = S/N; rplot S/N;" ?

Re: Problem with Moments and Plots

PostPosted: Wed Oct 02, 2013 6:27 pm
by jpfeifer
Yes. 1 means 100% and 0.01 means 1%. And yes, if you have a model variable
Code: Select all
SoverN = S/N

you can plot the simulated variable with
Code: Select all
rplot SoverN;