Page 2 of 3

Re: Uribe & Schmitt-Grohe

PostPosted: Wed Feb 11, 2015 8:01 pm
by RMB
Now, I would like to do the chapter 5.
I have problems again with SS.

Re: Uribe & Schmitt-Grohe

PostPosted: Sat Feb 14, 2015 12:11 pm
by jpfeifer
Please first fix the preprocessing errors and set all parameters.

Re: Uribe & Schmitt-Grohe

PostPosted: Thu Feb 19, 2015 8:12 pm
by RMB
jpfeifer wrote:Please first fix the preprocessing errors and set all parameters.

JPfeifer,

Now I am searching the hayes estimation of some parameters, but I have tried to fix the problems that you had suggested. Please, take a look, and give me a hint why I am having the same problems related to SS. I am looking on the web methods to give good initials, but I am not successful. Do you have some hints to give me? I always try to give consistent values, like y = c + i + tb, or, i = delta*k, but I think this is not enough.

Thanks for help,
RMB.

Re: Uribe & Schmitt-Grohe

PostPosted: Sun Feb 22, 2015 7:08 pm
by jpfeifer
Given the low complexity of the model, try computing an analytical steady state.

Re: Uribe & Schmitt-Grohe

PostPosted: Sat Mar 28, 2015 2:25 pm
by RMB
Hi,

I was sucessful using this model attached in Matlab R2014a and Dynare 4.3.3; but when I passed the model to my professor and he tried to use in his computer (Matlab R2014b, Dynare 4.3.3), this warning has appeared:

Error using chol
Matrix must be positive definite.

Error in metropolis_hastings_initialization (line 68)
d = chol(vv);

Error in random_walk_metropolis_hastings (line 62)
[ ix2, ilogpo2, ModelName, MetropolisFolder, fblck, fline, npar, nblck, nruns,
NewFile, MAX_nruns, d ] = ...

Error in dynare_estimation_1 (line 782)
feval(options_.posterior_sampling_method,objective_function,options_.proposal_distribution,xparam1,invhess,bounds,dataset_,options_,M_,estim_params_,bayestopt_,oo_);

Error in dynare_estimation (line 89)
dynare_estimation_1(var_list,dname);

Error in uribe_chapter4_peru_bayes2 (line 216)
dynare_estimation(var_list_);

Error in dynare (line 180)
evalin('base',fname) ;

I think this is related to Cholesky, but I don't have idea to solve it. Anyone has a similar problem?

THanks!

Re: Uribe & Schmitt-Grohe

PostPosted: Sun Mar 29, 2015 9:29 am
by jpfeifer
According to the identification command, you cannot estimate all these parameters on just the output series.

Re: Uribe & Schmitt-Grohe

PostPosted: Mon Mar 30, 2015 8:58 pm
by RMB
So, I have to choose which one I want to estimate? What is the rule for the number of parameters that I could estimate? I wanna know...
Thanks!

Re: Uribe & Schmitt-Grohe

PostPosted: Thu Apr 02, 2015 8:52 am
by jpfeifer
There is no rule. You need at least as many independent first and second moments of the observables as parameters you want to estimate. With the
Code: Select all
identification;
you can check whether this is the case.

Re: Uribe & Schmitt-Grohe

PostPosted: Thu Apr 02, 2015 6:09 pm
by RMB
Pfeifer,

The hint sounds great. I put the "identification;" at the end of the code. At least, the R2014b give me the results like R2014a, but at the end, in command windows, there are:
==== Identification analysis ====

Testing prior mean
The number of moments with non-zero derivative is smaller than the number of parameters
Try increasing ar = 2
The number of moments with non-zero derivative is smaller than the number of parameters
Try increasing ar = 3
The number of moments with non-zero derivative is smaller than the number of parameters
Try increasing ar = 4
The number of moments with non-zero derivative is smaller than the number of parameters
Try increasing ar = 5
The number of moments with non-zero derivative is smaller than the number of parameters
Try increasing ar = 6
The number of moments with non-zero derivative is smaller than the number of parameters
Try increasing ar = 7
The number of moments with non-zero derivative is smaller than the number of parameters
Try increasing ar = 8
The number of moments with non-zero derivative is smaller than the number of parameters
Try increasing ar = 9
The number of moments with non-zero derivative is smaller than the number of parameters
Try increasing ar = 10
The number of moments with non-zero derivative is smaller than the number of parameters
up to 10 lags: check your model
Either further increase ar or reduce the list of estimated parameters
Error using identification_analysis (line 102)
IDETooManyParams
Error in dynare_identification (line 280)
[idehess_point, idemoments_point, idemodel_point, idelre_point, derivatives_info_point,
info] = ...
Error in uribe_chapter4_peru_bayes2 (line 219)
dynare_identification(options_ident);
Error in dynare (line 180)
evalin('base',fname) ;

What does it mean? Really that I have an identification problem? I have to insert more information to bayesian inference or ask for less estimated parameters?
Thanks a lot!

Re: Uribe & Schmitt-Grohe

PostPosted: Thu Apr 02, 2015 7:15 pm
by jpfeifer
That is what I told you. Given your one observable there is not enough information in the data to estimate all parameters. If you drop more parameters or add more observables, at some point the error message will vanish.

Re: Uribe & Schmitt-Grohe

PostPosted: Thu Apr 02, 2015 7:41 pm
by RMB
Great. Now, I insert one more serie, the consumption. But, I have only one shock.
Error using initial_estimation_checks (line 34)
initial_estimation_checks:: Estimation can't take place because there are less declared
shocks than observed variables!
Error in initial_estimation_checks (line 34)
error(['initial_estimation_checks:: Estimation can''t take place because there are less
declared shocks than observed variables!'])
Error in dynare_estimation_1 (line 179)
oo_ =
initial_estimation_checks(objective_function,xparam1,dataset_,M_,estim_params_,options_,bayestopt_,oo_);
Error in dynare_estimation (line 89)
dynare_estimation_1(var_list,dname);
Error in uribe_chapter4_peru_bayes2 (line 226)
dynare_estimation(var_list_);
Error in dynare (line 180)
evalin('base',fname) ;

I think the best is drop variables from bayesian estimation.

Re: Uribe & Schmitt-Grohe

PostPosted: Thu Apr 02, 2015 8:11 pm
by jpfeifer
You could add measurement error.

Re: Uribe & Schmitt-Grohe

PostPosted: Thu Apr 02, 2015 8:15 pm
by RMB
Nice, I am seeing in your Guide, section 7, thanks.
After I understand it, I will report the results.

Re: Uribe & Schmitt-Grohe

PostPosted: Wed Apr 08, 2015 9:08 pm
by RMB
jpfeifer wrote:You could add measurement error.


Pfeifer,
First of all, I would like to thank you, because the errors were vanished by the new code, when I put the measurement errors and the "identification;" command. The results are great and all reasonable. Your guide has helped me a lot.

But, I am curious when I drop the identification command out, the errors return. I have dropped them out because the IR-functions are not showed in the first case (identification command and measurement erros)

Error using chol
Matrix must be positive definite.
Error in metropolis_hastings_initialization (line 68)
d = chol(vv);
Error in random_walk_metropolis_hastings (line 62)
[ ix2, ilogpo2, ModelName, MetropolisFolder, fblck, fline, npar, nblck, nruns, NewFile,
MAX_nruns, d ] = ...
Error in dynare_estimation_1 (line 782)
feval(options_.posterior_sampling_method,objective_function,options_.proposal_distribution,xparam1,invhess,bounds,dataset_,options_,M_,estim_params_,bayestopt_,oo_);
Error in dynare_estimation (line 89)
dynare_estimation_1(var_list,dname);
Error in uribe_chapter4_peru_bayes2 (line 230)
dynare_estimation(var_list_);
Error in dynare (line 180)
evalin('base',fname) ;

Do you could explain me why?
Thanks!

Re: Uribe & Schmitt-Grohe

PostPosted: Thu Apr 09, 2015 7:14 pm
by jpfeifer
This partly has to with your steady state. For many draws in the region of the highest posterior, it cannot be computed. Try providing an analytical steady state.