Page 1 of 1

An inconsistency in filter_step_ahead with Laplace only

PostPosted: Thu Sep 04, 2014 5:50 pm
by gin
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

Re: An inconsistency in filter_step_ahead with Laplace only

PostPosted: Thu Sep 04, 2014 7:49 pm
by jpfeifer
Thanks for pointing this out. I will look into it.

Re: An inconsistency in filter_step_ahead with Laplace only

PostPosted: Fri Oct 31, 2014 11:02 am
by jpfeifer
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

Re: An inconsistency in filter_step_ahead with Laplace only

PostPosted: Thu May 14, 2015 9:44 am
by gin
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

Re: An inconsistency in filter_step_ahead with Laplace only

PostPosted: Mon May 18, 2015 11:13 am
by jpfeifer
Yes, I need to run the code. Thus, please post a zip-file with everything that is required.

Re: An inconsistency in filter_step_ahead with Laplace only

PostPosted: Mon May 18, 2015 11:38 am
by gin
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

Re: An inconsistency in filter_step_ahead with Laplace only

PostPosted: Mon May 18, 2015 2:14 pm
by jpfeifer
In this case, they are stored in the order of
Code: Select all
M_.endo_names(oo_.dr.order_var,:)

Re: An inconsistency in filter_step_ahead with Laplace only

PostPosted: Mon May 18, 2015 2:23 pm
by gin
You are bright.

Thanks.
gin

Re: An inconsistency in filter_step_ahead with Laplace only

PostPosted: Tue May 17, 2016 12:05 pm
by jpfeifer
The new ordering (starting with Dynare 4.5) is documented in the manual