Approximated theoretic moments NaN

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.

Approximated theoretic moments NaN

Postby superztt » Tue Sep 30, 2014 5:45 am

I got some of variables' approximated theoretic moments NaN. What does this imply? Can I still trust the result, such as policy functions and simulations ?
superztt
 
Posts: 58
Joined: Sat Apr 26, 2014 8:24 pm

Re: Approximated theoretic moments NaN

Postby jpfeifer » Tue Sep 30, 2014 6:00 am

You need to find out where the NaN come from. If they result from a unit root, everything should be fine (if the unit root is supposed to be in your model). You can see the eigenvalues using the check-command. If the result from a singularity due to a division by 0, there might be an 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: Approximated theoretic moments NaN

Postby superztt » Wed Oct 01, 2014 9:08 pm

Thank you, jpfeifer.

I found the model has both unit eigenvalue and a warning of "Matrix is close to singular".

The policy functions returned have finite numbers. However, the mean and variance in APROXIMATED THEORETICAL MOMENTS are NaN for some variables. I am confused. How are mean and variance derived? If it is the response to a s.d. of a shock, should mean be a the corresponding result of policy function and nor variance?
superztt
 
Posts: 58
Joined: Sat Apr 26, 2014 8:24 pm

Re: Approximated theoretic moments NaN

Postby jpfeifer » Fri Oct 03, 2014 8:01 am

A first order solved DSGE model's solution has the form of a state space system. You can use this system to compute the unconditional mean and variance. See e.g. the book of Hamilton (1994): "Time Series Analysis". It has nothing to do with IRFs. If your model has a unit root, some variables will be NaN, because a random walk does not have finite first and second moments.
------------
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: Approximated theoretic moments NaN

Postby superztt » Thu Nov 13, 2014 6:48 am

I am confused about the relation between the distribution of shocks I give manually in the shock block, and the distribution of shocks in the state space. I don't think they are the same, are they?

Because I noticed the difference between the two, if I put the shock in the simulation to get the variance of it from APROXIMATED THEORETICAL MOMENTS. Nonetheless, I get non-zero variance in APROXIMATED THEORETICAL MOMENTS if and only if I specify a shock's variance in the shock block. So does it mean the state space will skip the shocks that do not appear in the shock block?
superztt
 
Posts: 58
Joined: Sat Apr 26, 2014 8:24 pm

Re: Approximated theoretic moments NaN

Postby jpfeifer » Fri Nov 14, 2014 6:20 am

If a shock is not specified in the shocks block, its variance is set to 0 (the value it is initialized to). Without the shocks block, how should Dynare know this variance?
------------
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: Approximated theoretic moments NaN

Postby superztt » Fri Nov 14, 2014 7:06 am

Do you mean the variance of a shock in APROXIMATED THEORETICAL MOMENTS should be the same as I specified in the shock block, without some dynare internal imposition? Then it's weird I didn't get the consistency. Does it depend on the periods of IRFs I choose? Cheers!
superztt
 
Posts: 58
Joined: Sat Apr 26, 2014 8:24 pm

Re: Approximated theoretic moments NaN

Postby jpfeifer » Fri Nov 14, 2014 9:26 am

Now I am confused. could it be that you are confusing shock variances and the variance of an exogenous process? Consider
Code: Select all
z=rho*z(-1)+epsilon

where
Code: Select all
shocks;
var epsilon 1;
end

In this case, the variance of z will be 1^2/(1-rho^2). This is the number Dynare would display as the theoretical variance for z. It will never display the moments for epsilon.
------------
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

cron