multiple simulation

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.

multiple simulation

Postby naivej » Tue Jun 16, 2015 9:05 pm

Hi there,

I got a problem that dynare will sometimes gives nan when I have large number of simulations, say 5000, using loop. But the code works fine if number of simulation is small. I can check nan and discard it at each loop but I am curious about the reason.
new finding: the nan comes at certain loop, for example, the 7th always give nan

Another thing puzzling me is that in dyanre we have non zero coefficient of cross term between state variable and variance when approximated to second order. But according to Stephanie and Martin (2004), second order approximation should only change the constant.

Thanks in advance for any comments
Attachments
steadystate.m
(297 Bytes) Downloaded 38 times
low_frequency_mc.mod
(8.2 KiB) Downloaded 43 times
Last edited by naivej on Wed Jun 17, 2015 9:11 am, edited 1 time in total.
naivej
 
Posts: 9
Joined: Mon Jun 08, 2015 10:59 pm

Re: multiple simulation

Postby jpfeifer » Wed Jun 17, 2015 6:42 pm

This is because without pruning, second order perturbation solutions might result in explosive simulations. Thus, set
Code: Select all
pruning=1


Regarding the second point: there are no variance terms. You are looking at cross-terms between states and shocks. It is the level of shocks, not their variance that shows up in the policy functions.
------------
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: Google [Bot] and 7 guests