historical shock decomposition

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.

historical shock decomposition

Postby tovonony » Sat Oct 20, 2012 6:59 pm

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!!!!!!!!
tovonony
 
Posts: 15
Joined: Mon May 31, 2010 10:02 am

Re: historical shock decomposition

Postby jpfeifer » Sat Oct 20, 2012 10:14 pm

Could you try 4.3.1? If it does not work, please send or post the mod-file.
------------
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: historical shock decomposition

Postby tovonony » Sun Oct 21, 2012 5:27 pm

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
tovonony
 
Posts: 15
Joined: Mon May 31, 2010 10:02 am

Re: historical shock decomposition

Postby tovonony » Thu Oct 25, 2012 8:45 pm

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,
tovonony
 
Posts: 15
Joined: Mon May 31, 2010 10:02 am

Re: historical shock decomposition

Postby jpfeifer » Fri Oct 26, 2012 7:49 am

This might be a bug. Could you send me the files?
------------
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: historical shock decomposition

Postby SébastienVillemot » Mon Dec 03, 2012 2:02 pm

This is a known issue, see: https://www.dynare.org/trac/ticket/136
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: historical shock decomposition

Postby Oriana » Tue Sep 22, 2015 5:00 pm

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!
Attachments
shock_decomposition 2.zip
(128.16 KiB) Downloaded 250 times
Oriana
 
Posts: 67
Joined: Fri Jul 18, 2014 2:49 pm

Re: historical shock decomposition

Postby Oriana » Sat Sep 26, 2015 8:13 am

Please, I need some insight in this matter.
Oriana
 
Posts: 67
Joined: Fri Jul 18, 2014 2:49 pm

Re: historical shock decomposition

Postby jpfeifer » Sat Sep 26, 2015 9:22 am

Please also provide the mode-file of your run.
------------
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: historical shock decomposition

Postby Oriana » Sat Sep 26, 2015 10:01 am

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!
Attachments
shock_decomposition 3.zip
(129.07 KiB) Downloaded 218 times
Oriana
 
Posts: 67
Joined: Fri Jul 18, 2014 2:49 pm

Re: historical shock decomposition

Postby jpfeifer » Sat Sep 26, 2015 10:10 am

Not the .mod-file, I need the _mode.mat or _mh_mode.mat.
------------
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: historical shock decomposition

Postby Oriana » Sat Sep 26, 2015 10:47 am

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!
Attachments
nonlinear_USA_3 Sep_ 100000 draws_Code Bodenstein 1970 TODAY copy 5.zip
(505.79 KiB) Downloaded 196 times
Last edited by Oriana on Sun Sep 27, 2015 3:36 am, edited 2 times in total.
Oriana
 
Posts: 67
Joined: Fri Jul 18, 2014 2:49 pm

Re: historical shock decomposition

Postby Oriana » Sat Sep 26, 2015 11:05 am

Here it is the _mode.mat and _mh_mode.mat.t file from the previous post.
Attachments
shock_decomposition .zip
(330.71 KiB) Downloaded 182 times
Oriana
 
Posts: 67
Joined: Fri Jul 18, 2014 2:49 pm

Re: historical shock decomposition

Postby jpfeifer » Sun Oct 04, 2015 1:02 pm

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
------------
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: historical shock decomposition

Postby Oriana » Sun Oct 04, 2015 2:44 pm

The results are from what version?
Last edited by Oriana on Sun Oct 04, 2015 3:40 pm, edited 2 times in total.
Oriana
 
Posts: 67
Joined: Fri Jul 18, 2014 2:49 pm

Next

Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 14 guests