Problem with Moments and Plots

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Problem with Moments and Plots

Postby jgrav » Wed Oct 02, 2013 12:48 am

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!
Attachments
GKExtension.mod
(2.99 KiB) Downloaded 101 times
jgrav
 
Posts: 9
Joined: Wed Oct 02, 2013 12:17 am

Re: Problem with Moments and Plots

Postby jpfeifer » Wed Oct 02, 2013 6:38 am

Given your unrealistic shock size of 100%, you should use either order=1 or pruning in stoch_simul to prevent explosive simulations.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Problem with Moments and Plots

Postby jgrav » Wed Oct 02, 2013 2:39 pm

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;" ?
jgrav
 
Posts: 9
Joined: Wed Oct 02, 2013 12:17 am

Re: Problem with Moments and Plots

Postby jpfeifer » Wed Oct 02, 2013 6:27 pm

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;
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests