jpfeifer code for Smets/Wouters (2007)

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.

jpfeifer code for Smets/Wouters (2007)

Postby zhwqueen » Thu Jun 29, 2017 1:09 pm

Dear all
Hi, I am using Dynare 4.3 version now. I want to replicate the model of Smets and Wouters(2007) . In table 2, the marginal likelihood of DSGE model is -905.8. AND jpfeifer explained it in one topic that it is as the difference between the marginal data density from the full sample minus the one of the training sample: -1166.524959-(-260.677257)= -905.8477. But I run the code from JohannesPfeifer's website and I find the Log data density [Laplace approximation] is -1571.472030 .It have
a large difference from -1166.524959. Is there something wrong? Does -1166.524959 refer to the Log data density [Laplace approximation] for the full data?
zhwqueen
 
Posts: 2
Joined: Thu Jun 29, 2017 12:52 pm

Re: jpfeifer code for Smets/Wouters (2007)

Postby jpfeifer » Thu Jun 29, 2017 1:34 pm

Have you checked the respective samples? I relied on the SW 2007 replication code, which has the sample and the mode-file set to a different case than the baseline.
------------
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: jpfeifer code for Smets/Wouters (2007)

Postby zhwqueen » Fri Jun 30, 2017 4:00 am

Thanks a lot, professor. I have check the datafile and find that they are both the same。 AND I find that in SW2007 replication code the first_obs is 71 while your code is 1. The data has 230 samples. I thought that the full sample 1966:1-2004:4 corresponding the first_obs 71.At this time the Log data density [Laplace approximation] is -923.052692. It is similar to -905.8. First question: whether the result -905 in SW paper corresponding to the Log data density for sample 1966:1-2004:4?
Second one : for the mode file . It refer to the file containing previous value for the mode. I wonder where do they come from? In SW2007 the mode file.xparam1 equal to the posterior mode.
zhwqueen
 
Posts: 2
Joined: Thu Jun 29, 2017 12:52 pm

Re: jpfeifer code for Smets/Wouters (2007)

Postby jpfeifer » Fri Jun 30, 2017 9:09 am

You need to use the respective mode-files for the respective samples to replicate the results. They are available at the AER's homepage.
------------
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 12 guests