How to plot determinacy/indeterminacy regions?

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.

How to plot determinacy/indeterminacy regions?

Postby wassilo » Sun Jul 10, 2011 12:43 pm

Hello everyone.

I am trying to replicate the Gali, Lopes-Salido, Valles (2004) paper on "Rule-of-Thumb Consumers...".

I struggle at least a week to get a figure with determinacy/indeterminacy regions, where two parameters are changing in an interval (0,1).
The mod-file is attached. Although it might be a wrong one, but the problem's solution shouldn't depend on it.
One possible solution could be to loop both parameters. But, in the case of looping only one i got this message:

??? Attempted to access lambdas(0.128708); index must be a positive integer or
logical.

Error in ==> rotc_noshock at 141
M_.params( 5 ) = lambdas(oo_.steady_state(2));

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


Anyway, I don't think that would be the right solution path.

So, could anybody help me to crack this?

Thanks a lot.
Attachments
rotc_noshock.mod
(1.68 KiB) Downloaded 303 times
wassilo
 
Posts: 5
Joined: Fri Jul 08, 2011 4:32 pm

Re: How to plot determinacy/indeterminacy regions?

Postby wassilo » Tue Jul 12, 2011 10:14 am

I wonder whether my question is far too easy to answer (so that finaly I should find the solution myself) or that nobody knows how to make it. :D

Anyway, I tried to do the sensitivity analysis, but got another error message:

??? Reference to non-existent field 'maximum_exo_lag'.

Error in ==> check_model at 22
xlen = M_.maximum_exo_lag+M_.maximum_exo_lead + 1;

Error in ==> stoch_simul at 61
check_model;

Error in ==> rotc_2 at 159
info = stoch_simul(var_list_);

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


I must confess that I am unexpierienced in programming with matlab, so any technical error messages confuse me to death.
Does anybody know what this message is trying to say to me? :roll:
The modificated mod-file is attached.
Attachments
rotc_2.mod
(1.66 KiB) Downloaded 273 times
wassilo
 
Posts: 5
Joined: Fri Jul 08, 2011 4:32 pm

Re: How to plot determinacy/indeterminacy regions?

Postby jpfeifer » Tue Jul 12, 2011 11:09 am

Your model does not feature exogenous shocks. How should stoch_simul then work?
------------
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: How to plot determinacy/indeterminacy regions?

Postby wassilo » Tue Jul 12, 2011 12:32 pm

Sorry, it is of corse not wise to use stoch_simul. Originally there was no shock introduced in the paper. I just overlooked this line. The particular error from above is solved. Instead I get antother. :x

However, is it the right way to achieve the desired graphs? And are there somewhere any examples how to get those?
An example is attached.
Attachments
Bild 1.pdf
(66.88 KiB) Downloaded 678 times
wassilo
 
Posts: 5
Joined: Fri Jul 08, 2011 4:32 pm

Re: How to plot determinacy/indeterminacy regions?

Postby Philipp » Sun Jul 24, 2011 7:45 pm

Dear wassilo,

I would like to join your problem as I am working on the same paper as you do. Did you already get any further?

I have now the model setup, but I'm also quite puzzled with the papers assumptions on the shocks, in fact, they do not point out which variable is affected by the sunspot shock, so how would you incorporate this? One option would be to assume an AR(1) technology shock, i.e. y = a*k(-1)^alpha*h^(1-alpha) (should be yet log-linearized...)
and a = rho*a(-1)+e; but I dont think that would replicate the paper's results. So do you have a better idea?

Next, I am still working on some kind of routine to make the plots, seems rather complicated with dynare. Do you have something that works?

I think that in your work you have some erroneous time indices for capital, make sure that k is predetermined and hence k_t -> k(-1) and k_{t+1} -> k

I'll post my mod file so far, it doesnt work yet as I have no shocks included, please double check, I would appreciate it very much!

Sincerely,

Philipp
Attachments
glsbasis.mod
The model works for deterministic steady state
(4.04 KiB) Downloaded 276 times
Philipp
 
Posts: 36
Joined: Mon Apr 18, 2011 9:01 pm
Location: State Secretariate for Economic Affairs

Re: How to plot determinacy/indeterminacy regions?

Postby argfm » Tue Feb 07, 2012 7:08 pm

Were any of you guys able to find a way to plot the determinacy/indeterminacy regions? Any help will be deeply appreciated!
argfm
 
Posts: 2
Joined: Mon Feb 06, 2012 7:35 pm

Re: How to plot determinacy/indeterminacy regions?

Postby Philipp » Tue Feb 07, 2012 10:50 pm

Dear argfm,

I have to admit that I didnt figure out a nice way. There is the globalsensitivity package which is of help, but in this case the model has to be estimated. Otherwise I guess the only way is by calculating the eigenvalue decomposition and tackle the problem from there. So by changing the parameters, the eigenvalues change and you should check for determinacy or not. But this is just a guess, if you have a better solution then Id be glad to hear from you!

Philipp
Philipp
 
Posts: 36
Joined: Mon Apr 18, 2011 9:01 pm
Location: State Secretariate for Economic Affairs

Re: How to plot determinacy/indeterminacy regions?

Postby jpfeifer » Mon May 04, 2015 2:34 pm

Take a look at the replication files for Ascari/Sbordone 2014 on my homepage for an example.
------------
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: How to plot determinacy/indeterminacy regions?

Postby superztt » Tue Sep 06, 2016 6:29 pm

jpfeifer wrote:Take a look at the replication files for Ascari/Sbordone 2014 on my homepage for an example.


I looked at the replication files. Here are two things I am confused about. Thanks!

First, what does options_.qz_criterium control? Seems it should be 1+1e-6 for the code, while 1-1e-6 for dynare_sensitivity.

Second, where is the data from for the variables in varobs? Because if for estimation, it seems to have external data for those variables, but not the case for dynare_sensitivity.
superztt
 
Posts: 58
Joined: Sat Apr 26, 2014 8:24 pm

Re: How to plot determinacy/indeterminacy regions?

Postby jpfeifer » Tue Sep 06, 2016 10:33 pm

1. From the manual
qz_criterium = DOUBLE

Value used to split stable from unstable eigenvalues in reordering the Generalized Schur decomposition used for solving 1^st order problems. Default: 1.000001 (except when estimating with lik_init option equal to 1: the default is 0.999999 in that case; see section Estimation).

In the mod-file, I needed to set it, because I directly call
Code: Select all
resol
, which requires it to be set. The default should be the same of stoch_simul and dynare_sensitivity.
2. There is no data involved here. Rather,
Code: Select all
dynare_sensitivity

needs to know which the considered "observed variables" are for which some of the sensitivity computations need to be conducted
------------
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: How to plot determinacy/indeterminacy regions?

Postby superztt » Wed Sep 07, 2016 7:37 pm

Thanks!

1. I tried both 1.000001 and 0.999999. Appears stoch_simul works for both, but dynare _sensitivity only accepts 0.999999.

2. How can I know which are the considered variables for a specific sensitivity analysis?


jpfeifer wrote:1. From the manual
qz_criterium = DOUBLE

Value used to split stable from unstable eigenvalues in reordering the Generalized Schur decomposition used for solving 1^st order problems. Default: 1.000001 (except when estimating with lik_init option equal to 1: the default is 0.999999 in that case; see section Estimation).

In the mod-file, I needed to set it, because I directly call
Code: Select all
resol
, which requires it to be set. The default should be the same of stoch_simul and dynare_sensitivity.
2. There is no data involved here. Rather,
Code: Select all
dynare_sensitivity

needs to know which the considered "observed variables" are for which some of the sensitivity computations need to be conducted
superztt
 
Posts: 58
Joined: Sat Apr 26, 2014 8:24 pm

Re: How to plot determinacy/indeterminacy regions?

Postby jpfeifer » Thu Sep 08, 2016 2:53 pm

For this particular exercise, you just need to specify some variable as observed. It does not matter which one, because none of the capabilities relying on varobs are actually triggered.
------------
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: Google [Bot] and 6 guests