Uribe & Schmitt-Grohe

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.

Re: Uribe & Schmitt-Grohe

Postby RMB » Wed Feb 11, 2015 8:01 pm

Now, I would like to do the chapter 5.
I have problems again with SS.
Attachments
uribe_chapter5.mod
(4.52 KiB) Downloaded 75 times
RMB
 
Posts: 40
Joined: Tue Jun 03, 2014 4:20 am

Re: Uribe & Schmitt-Grohe

Postby jpfeifer » Sat Feb 14, 2015 12:11 pm

Please first fix the preprocessing errors and set all parameters.
------------
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: Uribe & Schmitt-Grohe

Postby RMB » Thu Feb 19, 2015 8:12 pm

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.
Attachments
perua.xls
(37 KiB) Downloaded 127 times
uribe_chapter51_peru_bayes.mod
(2.74 KiB) Downloaded 62 times
RMB
 
Posts: 40
Joined: Tue Jun 03, 2014 4:20 am

Re: Uribe & Schmitt-Grohe

Postby jpfeifer » Sun Feb 22, 2015 7:08 pm

Given the low complexity of the model, try computing an analytical steady state.
------------
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: Uribe & Schmitt-Grohe

Postby RMB » Sat Mar 28, 2015 2:25 pm

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!
Attachments
perua.xls
(37 KiB) Downloaded 200 times
uribe_chapter4_peru_bayes2.mod
(2 KiB) Downloaded 74 times
RMB
 
Posts: 40
Joined: Tue Jun 03, 2014 4:20 am

Re: Uribe & Schmitt-Grohe

Postby jpfeifer » Sun Mar 29, 2015 9:29 am

According to the identification command, you cannot estimate all these parameters on just the output series.
------------
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: Uribe & Schmitt-Grohe

Postby RMB » Mon Mar 30, 2015 8:58 pm

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!
RMB
 
Posts: 40
Joined: Tue Jun 03, 2014 4:20 am

Re: Uribe & Schmitt-Grohe

Postby jpfeifer » Thu Apr 02, 2015 8:52 am

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.
------------
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: Uribe & Schmitt-Grohe

Postby RMB » Thu Apr 02, 2015 6:09 pm

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!
RMB
 
Posts: 40
Joined: Tue Jun 03, 2014 4:20 am

Re: Uribe & Schmitt-Grohe

Postby jpfeifer » Thu Apr 02, 2015 7:15 pm

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.
------------
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: Uribe & Schmitt-Grohe

Postby RMB » Thu Apr 02, 2015 7:41 pm

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.
RMB
 
Posts: 40
Joined: Tue Jun 03, 2014 4:20 am

Re: Uribe & Schmitt-Grohe

Postby jpfeifer » Thu Apr 02, 2015 8:11 pm

You could add measurement error.
------------
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: Uribe & Schmitt-Grohe

Postby RMB » Thu Apr 02, 2015 8:15 pm

Nice, I am seeing in your Guide, section 7, thanks.
After I understand it, I will report the results.
RMB
 
Posts: 40
Joined: Tue Jun 03, 2014 4:20 am

Re: Uribe & Schmitt-Grohe

Postby RMB » Wed Apr 08, 2015 9:08 pm

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!
Attachments
perua.xls
(37 KiB) Downloaded 97 times
uribe_chapter4_peru_bayes2.mod
(2.15 KiB) Downloaded 78 times
RMB
 
Posts: 40
Joined: Tue Jun 03, 2014 4:20 am

Re: Uribe & Schmitt-Grohe

Postby jpfeifer » Thu Apr 09, 2015 7:14 pm

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.
------------
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

PreviousNext

Return to Dynare help

Who is online

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