Page 1 of 2

historical shock decomposition

PostPosted: Sat Oct 20, 2012 6:59 pm
by tovonony
Hi everyone,
I am wondering if it is possible to compute shock decomposition (i have dynare version 4.3) after the estimation is done. I tried to put the "shock_decomposition;" command in the Matlab command window but it doesn't work. Even if after loading "myfile_results.mat" from the estimation.

Moreover, I have the following command:
Code: Select all
estimation(datafile=data_cpi_ols,first_obs=1,mh_replic=20000,mh_nblocks=5,mh_drop=0.40,mh_jscale=0.85,mode_compute=6,smoother) LOPG_ZE LOPG_UK LOPG_CH LOPG_US LOPG_JP LOPG_SW;

shock_decomposition(parameter_set=posterior_mode) LOPG_ZE LOPG_UK LOPG_CH LOPG_US LOPG_JP LOPG_SW;

but this generates the following error message:
Code: Select all
MH: Smoothed variables
MH: Smoothed variables, done!
MH: Smoothed shocks
MH: Smoothed shocks, done!
Loading 53 observations from data_cpi_ols.mat

??? Error using ==> describe_missing_data
Too many input arguments.

Error in ==> evaluate_smoother at 117
    [data_index,number_of_observations,no_more_missing_observations] =
    describe_missing_data(data,gend,n_varobs);

Error in ==> shock_decomposition at 60
oo = evaluate_smoother(parameter_set);

Error in ==> erpt at 1573
oo_ = shock_decomposition(M_,oo_,options_,var_list_);

Error in ==> dynare at 120
evalin('base',fname) ;


Thanks in advance for any help!! I really need it for my phd thesis for which the deadline is on 29 october. Please, help!!!!!!!!

Re: historical shock decomposition

PostPosted: Sat Oct 20, 2012 10:14 pm
by jpfeifer
Could you try 4.3.1? If it does not work, please send or post the mod-file.

Re: historical shock decomposition

PostPosted: Sun Oct 21, 2012 5:27 pm
by tovonony
Thanks jpfeifer,
At the moment, i've launched an estimation that takes time to finish. I'll install 4.3.1 as soon as the estimation is finished and tell you if it works or not.
Again thanks for your help,
Tovonony

Re: historical shock decomposition

PostPosted: Thu Oct 25, 2012 8:45 pm
by tovonony
hello,
I've tried the shock decomposition with 4.3.1 and it works. However, when i want to select shocks (with the option "shocks") to add in the decomposition, it failed.
Code: Select all
shock_decomposition(parameter_set=posterior_mode,shocks=(E_A_ZE E_A_UK E_A_CH));

where E_A are my exogeneous shocks.
Thanks,

Re: historical shock decomposition

PostPosted: Fri Oct 26, 2012 7:49 am
by jpfeifer
This might be a bug. Could you send me the files?

Re: historical shock decomposition

PostPosted: Mon Dec 03, 2012 2:02 pm
by SébastienVillemot
This is a known issue, see: https://www.dynare.org/trac/ticket/136

Re: historical shock decomposition

PostPosted: Tue Sep 22, 2015 5:00 pm
by Oriana
Dear all,

I got the following shock decomposition graph. My suspicion is that there is some kind of misspecification into the match of the model to the observable variables, namely, dcomp_log_jp_obs, rer_log_jp_obs and fedfunds_jp_obs .
Nevertheless, I tried very hardly and I cannot see what could be. I really need some help with this matter, please!

Re: historical shock decomposition

PostPosted: Sat Sep 26, 2015 8:13 am
by Oriana
Please, I need some insight in this matter.

Re: historical shock decomposition

PostPosted: Sat Sep 26, 2015 9:22 am
by jpfeifer
Please also provide the mode-file of your run.

Re: historical shock decomposition

PostPosted: Sat Sep 26, 2015 10:01 am
by Oriana
I thought the mode file was inside the folder shock_decomposition 2.zip of the previous request.
Please, find a new file in the folder below. Hope, this time, it works!

Re: historical shock decomposition

PostPosted: Sat Sep 26, 2015 10:10 am
by jpfeifer
Not the .mod-file, I need the _mode.mat or _mh_mode.mat.

Re: historical shock decomposition

PostPosted: Sat Sep 26, 2015 10:47 am
by Oriana
Note I did the follow experience. I incorrectly replaced dcomp_log_us_obs = log((exp(c1w))/(exp(c1w(-1)))) by dcomp_log_us_obs = log((exp(c2w))/(exp(c2w(-1)))), ceteris paribus, and all shock decomposition plots were acceptable.
I don't understand what could possible be wrong!

Re: historical shock decomposition

PostPosted: Sat Sep 26, 2015 11:05 am
by Oriana
Here it is the _mode.mat and _mh_mode.mat.t file from the previous post.

Re: historical shock decomposition

PostPosted: Sun Oct 04, 2015 1:02 pm
by jpfeifer
I am not sure what you are doing, but the mode-file does not describe a mode. It has
Initial value of the log posterior (or likelihood): -759747.4604

and mode-finding stops with
Final value of minus the log posterior (or likelihood):480757.280393

Re: historical shock decomposition

PostPosted: Sun Oct 04, 2015 2:44 pm
by Oriana
The results are from what version?