two warnings during dynare stoch_simul

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.

two warnings during dynare stoch_simul

Postby xuz » Mon Aug 15, 2016 8:01 am

Hi all,

My .mod file ends with

Code: Select all
stoch_simul(order=2, pruning,irf=30, nograph);


The code goes through well except two earnings. The printout screen looks like:

MODEL SUMMARY
nothing special here

MATRIX OF COVARIANCE OF EXOGENOUS SHOCKS
nothing special here

POLICY AND TRANSITION FUNCTIONS
nothing special here

Warning: Matrix is close to singular or badly scaled. Results may be
inaccurate. RCOND = 1.451571e-18.
> In th_autocovariances at 149
In disp_th_moments at 37
In stoch_simul at 164
In modfilename at 687
In dynare at 180
Warning: Aggregate variance and sum of variances by shocks differ by more than
0.01 %
> In th_autocovariances at 198
In disp_th_moments at 37
In stoch_simul at 164
In modfilename at 687
In dynare at 180


APROXIMATED THEORETICAL MOMENTS

some "NAN"s

APPROXIMATED VARIANCE DECOMPOSITION (in percent)
nothing special here
APPROXIMATED MATRIX OF CORRELATIONS
nothing special here
APPROXIMATED COEFFICIENTS OF AUTOCORRELATION
nothing special here

In the model, one variable follows random walk, and some variables are functions of this random walk.

1. I guess that APROXIMATED THEORETICAL MOMENTS have NAN because of the random walk.
2. I'm not sure how the first warning affects the model's performance. Is it a red flag? Is it due to random walk variable?
3. As for the second warning, I find the post viewtopic.php?f=1&t=4409 very useful. It says that this warning may come from the large size of my model, and it's not avoidable. I wonder whether the random walk behavior of endogenous variable will contribute to this warning.

Thanks very much for your help!
xuz
 
Posts: 29
Joined: Thu May 14, 2015 10:59 pm

Re: two warnings during dynare stoch_simul

Postby jpfeifer » Mon Aug 15, 2016 11:56 am

Yes, the unit root will cause the NaN in the theoretical moments. If your model is large, numerical problems can arise and there is not much you can do. Unless there is anything else suspicious, these warnings can be ignored.
------------
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: two warnings during dynare stoch_simul

Postby xuz » Wed Aug 17, 2016 6:20 am

jpfeifer wrote:Yes, the unit root will cause the NaN in the theoretical moments. If your model is large, numerical problems can arise and there is not much you can do. Unless there is anything else suspicious, these warnings can be ignored.


Thanks!

One more question,
When I change the last line of the mod file from
stoch_simul(order=1, irf=500);
to
stoch_simul(order=2, pruning, irf=500);

The change of IRF is small.

When I change the last line of the mod file from
stoch_simul(order=1, irf=500);
to
stoch_simul(order=3, pruning, irf=500);

The change of IRF is huge:
e.g. the initial response of variable x to shock y is -10^(-5) with order =1, becomes -2*10^(-4) with order 2 and becomes -100 with order =3.

I take this as a bad sign of my model. I think this is a result of the curvature of my equations. I wonder whether in general the unit root will contribute to the large IRF size when taking the third order. Thank you very much!
xuz
 
Posts: 29
Joined: Thu May 14, 2015 10:59 pm

Re: two warnings during dynare stoch_simul

Postby jpfeifer » Wed Aug 17, 2016 6:36 am

That is strange and should normally not happen. Could you please send me the file.
------------
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: two warnings during dynare stoch_simul

Postby jpfeifer » Fri Aug 19, 2016 8:48 am

The reason is that despite using pruning, your simulations seem quite explosive. Values in the order of 1E9 appear. This might be due to the unit root, where big shocks accumulate. At first order, that might not be a large issue, but at higher order it is.
------------
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: two warnings during dynare stoch_simul

Postby xuz » Tue Aug 23, 2016 10:31 pm

jpfeifer wrote:The reason is that despite using pruning, your simulations seem quite explosive. Values in the order of 1E9 appear. This might be due to the unit root, where big shocks accumulate. At first order, that might not be a large issue, but at higher order it is.

Thanks!
xuz
 
Posts: 29
Joined: Thu May 14, 2015 10:59 pm


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 7 guests