shock_decomposition with use_shock_groups, scale_file

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.

shock_decomposition with use_shock_groups, scale_file

Postby Aldo » Thu Jun 15, 2017 12:10 am

1. I want to use shock_decomposition with option use_shock_groups in order to get graphs with groups I specify.
I am writing codes similar to example of manual of dynare 4.5.0:

Code: Select all
shock_groups(name=group1);
supply = e_a, e_b;
'aggregate demand' = e_c, e_d;
end;
shock_decomposition(use_shock_groups=group1);


but I get graphs with shocks of varexo and I would hope to get it with my groups. I attach my files.

2. I want to use option scale_file with my file named prometheo_optimal_mh_scale. In order to do this i put:

Code: Select all
posterior_sampler_options = ('scale_file',prometheo_optimal_mh_scale)


inside estimation command, but I get error message:
Code: Select all
syntax error, unexpected NAME


3. Also, several varobs have trend with mean cero. My question is if is better use stationary variables?, in my case, my varobs in first difference.

4. I attach an imagen .png of output with error after run my .mod in matlab 2016 and matlab 2017. Could you please tell me what could be my error?
Attachments
imagen.rar
(200.4 KiB) Downloaded 49 times
mymod.rar
(145.16 KiB) Downloaded 54 times
Aldo
 
Posts: 56
Joined: Fri Aug 07, 2015 4:47 pm

Re: shock_decomposition with use_shock_groups, scale_file

Postby jpfeifer » Fri Jun 16, 2017 9:29 am

1. I still need to look at this in detail.
2. It should be
Code: Select all
posterior_sampler_options = ('scale_file','prometheo_optimal_mh_scale')

i.e. a quoted string
3. Please elaborate. I do not understand the point.
4. In your steady state file, you already have
Code: Select all
  mu = 0;     % These initializations are needed because mu,beta and alpha are fonctions of a
  beta = 0;   % matlab toolbox!
  alpha = 0;  %

The same applies to sigma as well. Thus, add
Code: Select all
sigma=0; 

here.

5. I think data_ldiffU still has a big seasonal pattern.
------------
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: shock_decomposition with use_shock_groups, scale_file

Postby Aldo » Fri Jun 16, 2017 12:07 pm

Thanks a lot dear jpfeifer.

1.
I still need to look at this in detail.

Thanks again, I will hope.

3. I have some observed variables, especifically, interest rate of household loans, loans to entrepreneurs and deposits rate and probability of default (Delinquency), which have trends. These variables are related to equations of my model in a correct form, so my question ins´t how to relate it, but rather I am not sure if it is correct to include data with trends.

¿What would be advantage of include these variables in firt differences? Should I remove trends using some filter like HP?

A million thanks

Cheers

Aldo
Aldo
 
Posts: 56
Joined: Fri Aug 07, 2015 4:47 pm

Re: shock_decomposition with use_shock_groups, scale_file

Postby jpfeifer » Fri Jun 16, 2017 12:10 pm

1. The first issue is a bug in 4.5. Use
Code: Select all
options_.plot_shock_decomp.use_shock_groups='group1';

to manually set the option.
------------
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: shock_decomposition with use_shock_groups, scale_file

Postby Aldo » Fri Jun 16, 2017 1:08 pm

Thanks dear jpfeifer,

Please don't forget my another question:

3. I have some observed variables, especifically, interest rate of household loans, loans to entrepreneurs and deposits rate and probability of default (Delinquency), which have trends. These variables are related to equations of my model in a correct form, so my question ins´t how to relate it, but rather I am not sure if it is correct to include data with trends.

¿What would be advantage of include these variables in firt differences? Should I remove trends using some filter like HP?


Thanks
Aldo
 
Posts: 56
Joined: Fri Aug 07, 2015 4:47 pm

Re: shock_decomposition with use_shock_groups, scale_file

Postby jpfeifer » Sat Jun 17, 2017 3:13 pm

What do you mean with "trend"? Interest rates usually should be stationary.
------------
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: shock_decomposition with use_shock_groups, scale_file

Postby Aldo » Sat Jun 17, 2017 4:30 pm

I am studying peruvian economy where there has been an increase in bank competition and my data of interest rates of loans and deposits has been decreasing since 2002, when I plot these, I find negative slopes in the adjusted lines. The same goes for delinquency rate (which I use as proxy of probability of default).

I am thinking remove these slopes ("trends") using some filter or using first differences.

I attach these data as a sample.
Attachments
data_sample.rar
(21.85 KiB) Downloaded 46 times
Aldo
 
Posts: 56
Joined: Fri Aug 07, 2015 4:47 pm

Re: shock_decomposition with use_shock_groups, scale_file

Postby jpfeifer » Wed Jun 21, 2017 8:31 pm

There is no good answer here. It very much depends on what you are trying to model. There is indeed a downward trend in these data where the model tells you they should be stationary. Thus, if you do not remove the trend, you will force the shocks to account for the trend. That trend may be related to a decrease in inflation rates for example. Selectively taking out some trends in the data will purge the underlying effects from these series, but there may be undesirable interactions. The low interest rates may have consequences for output, but there you do not remove a commensurate trend. Central banks therefore are currently adding features to their model to allow the model to endogenously account for such downward trends instead of trying to filter the data.
------------
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: shock_decomposition with use_shock_groups, scale_file

Postby Aldo » Thu Jun 22, 2017 3:39 pm

Thanks a lot dear jpfeifer.

Cheers

Aldo
Aldo
 
Posts: 56
Joined: Fri Aug 07, 2015 4:47 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 5 guests