An inconsistency in filter_step_ahead with Laplace only

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.

An inconsistency in filter_step_ahead with Laplace only

Postby gin » Thu Sep 04, 2014 5:50 pm

Dear all,

To save time, I do the Laplace approximation only when estimating a model (i.e, set mh_replic=0). But then the filter_step_ahead option in the estimation command gives the forecasts (i.e., in oo_.FilteredVariablesKStepAhead) that are inconsistent with the case of mh_replic>0, i.e., the place of the variable is different - not of the same order as the order of variables under the estimation command.

gin
-------------------------
gin
http://gin.mozello.com
gin
 
Posts: 47
Joined: Wed Feb 27, 2013 3:10 pm
Location: Riga, Latvia

Re: An inconsistency in filter_step_ahead with Laplace only

Postby jpfeifer » Thu Sep 04, 2014 7:49 pm

Thanks for pointing this out. I will look into it.
------------
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: An inconsistency in filter_step_ahead with Laplace only

Postby jpfeifer » Fri Oct 31, 2014 11:02 am

Dear gin,

this is something that cannot easily be changed. We document the variable ordering now in the future manual.You can see it here: https://github.com/JohannesPfeifer/dynare/commit/066653cf03f81541c32cca04b82a70bca8808c75
------------
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: An inconsistency in filter_step_ahead with Laplace only

Postby gin » Thu May 14, 2015 9:44 am

Johannes,

I still don't get how the ordering in filter_step_ahead works in Laplace with Bayesian estimation [it is not the order of variable declaration].

Take Dynare 4.4.3. In estimation, specify filter_step_ahead. Indicate just one endogenous variable under the estimation command. If mh_replic>0 then everything is ok, that is, the variable will be the first and only in oo_.FilteredVariablesKStepAhead (even without `selected_variables_only' option).

But if mh_replic=0 then 1) `selected_variables_only' option does not work, and 2) filter_step_ahead is performed for all the endogenous variables in the model (222 in my case). Also, the order of the interested variable in oo_.FilteredVariablesKStepAhead (#35) does not correspond to its order in the declared endogenous variables (#136).

PS: Attached is a mod-file (hopefully you don't want to run it as it requires several more files).
gin
Attachments
ctw_employer_surplus100forecast1.mod
(72.12 KiB) Downloaded 191 times
-------------------------
gin
http://gin.mozello.com
gin
 
Posts: 47
Joined: Wed Feb 27, 2013 3:10 pm
Location: Riga, Latvia

Re: An inconsistency in filter_step_ahead with Laplace only

Postby jpfeifer » Mon May 18, 2015 11:13 am

Yes, I need to run the code. Thus, please post a zip-file with everything that is required.
------------
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: An inconsistency in filter_step_ahead with Laplace only

Postby gin » Mon May 18, 2015 11:38 am

Johannes,

Attached is a zip-file `to_johannes.zip' with all files necessary to run the mod-file.

Please note that in order to run it faster (~8min on a quick desktop), I set `mode_compute=4' and provide a `mode_file'.

gin
Attachments
to_johannes.zip
(533.83 KiB) Downloaded 271 times
-------------------------
gin
http://gin.mozello.com
gin
 
Posts: 47
Joined: Wed Feb 27, 2013 3:10 pm
Location: Riga, Latvia

Re: An inconsistency in filter_step_ahead with Laplace only

Postby jpfeifer » Mon May 18, 2015 2:14 pm

In this case, they are stored in the order of
Code: Select all
M_.endo_names(oo_.dr.order_var,:)
------------
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: An inconsistency in filter_step_ahead with Laplace only

Postby gin » Mon May 18, 2015 2:23 pm

You are bright.

Thanks.
gin
-------------------------
gin
http://gin.mozello.com
gin
 
Posts: 47
Joined: Wed Feb 27, 2013 3:10 pm
Location: Riga, Latvia

Re: An inconsistency in filter_step_ahead with Laplace only

Postby jpfeifer » Tue May 17, 2016 12:05 pm

The new ordering (starting with Dynare 4.5) is documented in the manual
------------
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 14 guests