Page 1 of 1

How to plot determinacy/indeterminacy regions?

PostPosted: Sun Jul 10, 2011 12:43 pm
by wassilo
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.

Re: How to plot determinacy/indeterminacy regions?

PostPosted: Tue Jul 12, 2011 10:14 am
by wassilo
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.

Re: How to plot determinacy/indeterminacy regions?

PostPosted: Tue Jul 12, 2011 11:09 am
by jpfeifer
Your model does not feature exogenous shocks. How should stoch_simul then work?

Re: How to plot determinacy/indeterminacy regions?

PostPosted: Tue Jul 12, 2011 12:32 pm
by wassilo
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.

Re: How to plot determinacy/indeterminacy regions?

PostPosted: Sun Jul 24, 2011 7:45 pm
by Philipp
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

Re: How to plot determinacy/indeterminacy regions?

PostPosted: Tue Feb 07, 2012 7:08 pm
by argfm
Were any of you guys able to find a way to plot the determinacy/indeterminacy regions? Any help will be deeply appreciated!

Re: How to plot determinacy/indeterminacy regions?

PostPosted: Tue Feb 07, 2012 10:50 pm
by Philipp
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

Re: How to plot determinacy/indeterminacy regions?

PostPosted: Mon May 04, 2015 2:34 pm
by jpfeifer
Take a look at the replication files for Ascari/Sbordone 2014 on my homepage for an example.

Re: How to plot determinacy/indeterminacy regions?

PostPosted: Tue Sep 06, 2016 6:29 pm
by superztt
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.

Re: How to plot determinacy/indeterminacy regions?

PostPosted: Tue Sep 06, 2016 10:33 pm
by jpfeifer
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

Re: How to plot determinacy/indeterminacy regions?

PostPosted: Wed Sep 07, 2016 7:37 pm
by superztt
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

Re: How to plot determinacy/indeterminacy regions?

PostPosted: Thu Sep 08, 2016 2:53 pm
by jpfeifer
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.