HELP!Why I get so many zeros in variance decomposition

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.

HELP!Why I get so many zeros in variance decomposition

Postby wxhmatchpoint » Wed Apr 01, 2015 11:46 am

Hi Dynare Experts,

I wrote a code about an open economy with financial shock. I ask four variables to be simulated.
But when I see my result of variance decomposition,I find there are only two variables listed.
Besides, as I have six shocks in the model, four shocks contributes ZERO to the two variables.
So could anyone tell me what might be the reasons?
Thank you in advance.

Jason
wxhmatchpoint
 
Posts: 5
Joined: Thu Oct 09, 2014 8:25 am

Re: HELP!Why I get so many zeros in variance decomposition

Postby jpfeifer » Thu Apr 02, 2015 9:16 am

Sounds like a problem with the model. Please provide the files to replicate the issue.
------------
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: HELP!Why I get so many zeros in variance decomposition

Postby wxhmatchpoint » Fri Apr 03, 2015 12:07 pm

fffsolrevise1.mod
a small open economy with financial friction and financial shock
(8.97 KiB) Downloaded 54 times
jpfeifer wrote:Sounds like a problem with the model. Please provide the files to replicate the issue.

Thank you for your reply.My file is attached in the following.

PS: I tired to change the standard deviation and the result was slightly improved. I am not sure if this is the reason.
wxhmatchpoint
 
Posts: 5
Joined: Thu Oct 09, 2014 8:25 am

Re: HELP!Why I get so many zeros in variance decomposition

Postby jpfeifer » Fri Apr 03, 2015 12:14 pm

Look at the covariance matrix in M_.Sigma_e
M_.Sigma_e
ans =
30.0304 0 0 0 0 0
0 17.8929 0 0 0 0
0 0 0.0021 0 0 0
0 0 0 0.0000 0 0
0 0 0 0 0.0032 0
0 0 0 0 0 0.0002


The first two shocks are two orders of magnitude larger and thus drive everything.
------------
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: HELP!Why I get so many zeros in variance decomposition

Postby wxhmatchpoint » Fri Apr 03, 2015 1:04 pm

jpfeifer wrote:Look at the covariance matrix in M_.Sigma_e
M_.Sigma_e
ans =
30.0304 0 0 0 0 0
0 17.8929 0 0 0 0
0 0 0.0021 0 0 0
0 0 0 0.0000 0 0
0 0 0 0 0.0032 0
0 0 0 0 0 0.0002


The first two shocks are two orders of magnitude larger and thus drive everything.

Well, thank you very much for your immediate reply.
But as I am new to dynare, could you tell me where to find this file?
wxhmatchpoint
 
Posts: 5
Joined: Thu Oct 09, 2014 8:25 am

Re: HELP!Why I get so many zeros in variance decomposition

Postby jpfeifer » Fri Apr 03, 2015 1:13 pm

It is not a file. It is just restating that comparing
Code: Select all
sigg = 0.046;

to
Code: Select all
siga = 5.48;          // two above from zhang's BE

Implies two order of magnitude difference in your shock calibration.
------------
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: HELP!Why I get so many zeros in variance decomposition

Postby wxhmatchpoint » Fri Apr 03, 2015 1:39 pm

jpfeifer wrote:It is not a file. It is just restating that comparing
Code: Select all
sigg = 0.046;

to
Code: Select all
siga = 5.48;          // two above from zhang's BE

Implies two order of magnitude difference in your shock calibration.


Thank you for your answer.
I also notice that some variables can not be simulated as follows

THEORETICAL MOMENTS

VARIABLE MEAN STD. DEV. VARIANCE
y 0.0000 0.0406 0.0016
c NaN NaN NaN
i NaN NaN NaN
r 0.0000 0.0012 0.0000
pi 0.0000 0.0036 0.0000

So could you tell me what may be the reasons? If I add some shocks, would it work?
wxhmatchpoint
 
Posts: 5
Joined: Thu Oct 09, 2014 8:25 am

Re: HELP!Why I get so many zeros in variance decomposition

Postby jpfeifer » Mon Apr 06, 2015 8:25 pm

Because your model features a unit root so that the second moment of these variables does not exist. Try running model_diagnostics on your model.
------------
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: HELP!Why I get so many zeros in variance decomposition

Postby wxhmatchpoint » Tue Apr 07, 2015 11:42 am

jpfeifer wrote:Because your model features a unit root so that the second moment of these variables does not exist. Try running model_diagnostics on your model.

Thank you for your answer.
It seems that there is a equation
pi = p - p(-1)
which could lead to the unit root. But this equation is necessary in the model.
So do you know how to eliminate the problem?
wxhmatchpoint
 
Posts: 5
Joined: Thu Oct 09, 2014 8:25 am

Re: HELP!Why I get so many zeros in variance decomposition

Postby jpfeifer » Tue Apr 07, 2015 6:49 pm

The equation you describe is not necessary, but rather a simple definition of inflation. Generally, you can write all variables as real variables by dividing with the price level. If the variables you mentioned with moments equal to NaN are nominal variables, then you have found the source of your problem: the nominal variables are not stationary, because the price level has a unit root. Only their real counterparts and inflation are stationary. See Pfeifer(2013): "A Guide to Specifying Observation Equations for the Estimation of DSGE Models" https://sites.google.com/site/pfeiferecon/Pfeifer_2013_Observation_Equations.pdf for an example.
------------
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 8 guests