Difference between different types of moments

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.

Difference between different types of moments

Postby Grant » Mon Nov 24, 2014 4:53 am

Dear Jpfeifer,

I am confused about the difference between theoretical moments and empirical moments. I use dynare to solve a log-linearized model. I know that if I set "period" command equals zero, theoretical moments will be computed. My understanding is that theoretical moments is the moments generated from the posterior distribution, while empirical moment is simulated moment, which is generated from the posterior mean and start to simulate at the steady state. Am I right?
BTW, I also need to compare the moments generated from the model and that of the actual data. Which type of moments should I use?

I am looking forward to your help. Thanks in advance.
Grant
 
Posts: 95
Joined: Tue Jun 10, 2014 2:37 pm

Re: Difference between different types of moments

Postby jpfeifer » Tue Nov 25, 2014 7:13 am

No. Generally, theoretical moments are the one computed based on the state space representation of the solved model. See e.g. Hamilton (1994): Time Series Econometrics. These moments are computed at the parameter vector given, i.e. either the calibrated ones when running stoch_simul directly or the one from estimation if running stoch_simul after estimation.

Simulated moments are based on simulation from the model solution for a specified period of time. If you run sufficiently many periods, the simulated moments will converge to the theoretical moments (asymptotically).

There is no general rule what is better to compare. Several short simulations of the same length as your actual data or the theoretical moments. I would personally go for the latter.
------------
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: Difference between different types of moments

Postby quiko » Mon Dec 01, 2014 6:48 am

Hi,

A related question. When solving a log-linearized model, I run a loop over some parameter and then I look at the variance generated for those different parameters.

I extract the second moments by doing:
var = diag(oo_.var);

Then I plot var as a function of the parameters over which I have looped. So here my (silly) question is: what is the unity of measure of this volatility? Should I worry if I observe big numbers like 21,400 on the y-scale?
quiko
 
Posts: 17
Joined: Sat Mar 29, 2014 11:06 pm

Re: Difference between different types of moments

Postby jpfeifer » Wed Dec 03, 2014 11:26 am

It depends on the definition of your variables.

If they are in levels, the variance is measured in the units of the levels sqared. For example, think of real GDP as apples then the variance will have units of apples squared. The standard deviation will have the units of apples. You can see that the variance will be massively affected if you change the underlying units. If you measure GDP in quarter apples instead of apples, the variance will increase by Var(4*x)=16*Var(x) by a factor of 16. Hence, depending on the unit of measurement, the number can be really big.

If you logged the variables/they are in percentage deviations, i.e. unit free. The units will be percent squared for the variance and percent for the standard deviations. Here, a large variance in the four figures you report is problematic.
------------
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: Difference between different types of moments

Postby quiko » Fri Dec 05, 2014 5:02 am

Thanks for the reply.

The model is log-linearized around the steady-state, so if I got it right my variance is percentage deviation from the steady state. I'm not actually interested to the magnitude of the variance, so in principle having big numbers does not bore me, I am interested to the dynamics.

But I wonder wether by "problematic" you mean that it is a mistake and I should fix this or not.
quiko
 
Posts: 17
Joined: Sat Mar 29, 2014 11:06 pm

Re: Difference between different types of moments

Postby jpfeifer » Fri Dec 05, 2014 2:47 pm

How did you scale your shock terms? Is 1 a standard deviation of 1 percent or 100 percent? If it is the latter, there must be something wrong.
------------
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: Difference between different types of moments

Postby quiko » Mon Dec 08, 2014 3:40 pm

I have put:

shocks;
var e; stderr 1

I don't know if that's what you mean. Should it be 0.01?
quiko
 
Posts: 17
Joined: Sat Mar 29, 2014 11:06 pm

Re: Difference between different types of moments

Postby jpfeifer » Tue Dec 09, 2014 6:29 am

That's what I meant. Compared to using
shocks;
var e; stderr 0.01;
end;

every variance will be scaled by 100^2 which might explain your big numbers-
------------
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: Difference between different types of moments

Postby quiko » Thu Dec 11, 2014 11:41 am

Thank you I see it now.

I have another small question, but it's not related. Please let me know if I should post it in another section.

The question is:

If I want to introduce two shocks (a technology shock and a monetary shock), assuming both shocks have the same functional form:
a = rho*a(-1) + e;

Is it correct to add "a" (I assume a log-linearized model) to the production function and the Taylor rule? Or I should use two different notations for both shocks, even if they have identical functional form?
quiko
 
Posts: 17
Joined: Sat Mar 29, 2014 11:06 pm

Re: Difference between different types of moments

Postby jpfeifer » Thu Dec 11, 2014 11:59 am

You need to add two shocks. Otherwise, the two shocks will be identical, i.e. monetary and technology shocks would be perfectly correlated.
------------
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: Difference between different types of moments

Postby devidosti » Thu Dec 11, 2014 6:46 pm

Dear professor Pfeifer,

I wish you could help to fix the Dynare code to perform a replication of the paper by Nakamura and Steinsson "Fiscal Stimulus in a Monetary Union: Evidence from a Monetary Union", AER, '14. In particular, I am having troubles with the section F of their online appendix (https://www.aeaweb.org/aer/app/10403/20111109_app.pdf), where they introduce capital in their New-Keynesian model. Here capital is assumed to be owned by households, who lend it to firms which use it for investment. So there is a capital rental rate, investment, capital, a part of if which is lent etc. My problem is related with the Jacobian of the steady states..could you please help me in adjusting the file?

Thanks a lot and best regards,

Davide
Attachments
Regional_Capital_Market.mod
(4.92 KiB) Downloaded 89 times
devidosti
 
Posts: 6
Joined: Thu Dec 11, 2014 6:39 pm

Re: Difference between different types of moments

Postby jpfeifer » Thu Dec 11, 2014 7:21 pm

Focus on:
Code: Select all
Warning: Some of the parameters have no value (A_c, a_c, a_pi, zeta, sigma_c, zeta_c, zeta_g) when using steady. If these parameters are not initialized in a
steadystate file, Dynare may not be able to solve the model..

Please set these parameters.
------------
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: Difference between different types of moments

Postby devidosti » Fri Dec 12, 2014 8:31 am

I am sorry, but these parameters have all been set, except with sigma_c, which now I fixed. But still it doesn't work!

couldn't there be some deeper problems due to the fact that I did not select the right identifying equations?

Best,

Davide
Doctoral student
at ECARES -- ULB
Attachments
Regional_Capital_Market.mod
(4.99 KiB) Downloaded 85 times
devidosti
 
Posts: 6
Joined: Thu Dec 11, 2014 6:39 pm

Re: Difference between different types of moments

Postby jpfeifer » Fri Dec 12, 2014 12:42 pm

Your parameter initializations are not recursive. Try using F9 to execute the initializations before the model-block to see that zeta uses psi_nu in its definition, but psi_nu is only defined later on.
------------
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: Difference between different types of moments

Postby devidosti » Fri Dec 12, 2014 2:40 pm

what exactly do you mean by executing the first block with F9?
devidosti
 
Posts: 6
Joined: Thu Dec 11, 2014 6:39 pm

Next

Return to Dynare help

Who is online

Users browsing this forum: No registered users and 12 guests