Baysian estimation of Lubik et al JME 2007

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.

Baysian estimation of Lubik et al JME 2007

Postby pedroac81 » Thu May 14, 2009 4:15 am

Hi,

I am trying to make an estimation procedure for a model similar to this......When I start the estimation the figure with the initial prior keeps coming to the screen until Matlab stops and display the message that the maximum number of interactions was reached....Any idea of what might be happening?

Thanks a lot,

Pedro


??? Maximum recursion limit of 500 reached. Use set(0,'RecursionLimit',N)
to change the limit. Be aware that exceeding your available stack space can
crash MATLAB and/or your computer.

Error in ==> double.superiorfloat at 18


Error in ==> teste at 216
dynare_estimation(var_list_);


Also when I the prior plots a repeatedly coming to my screen and I close one of them Matlab stops and shows the following error message:

??? Error using ==> print
Error using ==> graphics\private\restore
Invalid handle object.

Error in ==> plot_priors at 154
eval(['print -dpdf ' M_.fname '_Priors' int2str(nbplt)]);

Error in ==> dynare_estimation_1 at 92
plot_priors

Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});

Error in ==> teste at 216
dynare_estimation(var_list_);

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


Anyone has experience in this kind of stuff? Really I appreciate any comment....Thanks!!
pedroac81
 
Posts: 14
Joined: Thu May 14, 2009 4:04 am

Re: Baysian estimation of Lubik et al JME 2007

Postby StephaneAdjemian » Thu May 14, 2009 8:00 am

Dear Pedro,

I guess there is a problem with one of the routines defining the prior hyperparameters. Can you please post your mod file (with data) ?

Best, Stéphane.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: Baysian estimation of Lubik et al JME 2007

Postby pedroac81 » Fri May 15, 2009 6:05 am

Hi Stephane,

thank you for your reply. I appreciate any comment.
I attached my .mod file and the.xls file with the data.

Thank you,

Pedro
Attachments
teste.xls
(17.5 KiB) Downloaded 385 times
teste1.mod
(1.65 KiB) Downloaded 415 times
pedroac81
 
Posts: 14
Joined: Thu May 14, 2009 4:04 am

Re: Baysian estimation of Lubik et al JME 2007

Postby pedroac81 » Mon May 18, 2009 5:18 pm

Hi All,

I am posting my .mod file and .xls data. The graph with the priors keep appearing in the screen and when I stop it I get the error message pasted below. Does anyone have a comment?
Thank you very much,

Pedro

Error message:

??? Error using ==> print
Error using ==> graphics\private\restore
Invalid handle object.

Error in ==> plot_priors at 109
eval(['print -depsc2 ' M_.fname '_Priors' int2str(plt) '.eps']);

Error in ==> dynare_estimation_1 at 92
plot_priors

Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});

Error in ==> teste at 216
dynare_estimation(var_list_);

Error in ==> read_variables at 42
eval(dyn_instr_01);

Error in ==> dynare_estimation_1 at 237
rawdata = read_variables(options_.datafile,options_.varobs,[],options_.xls_sheet,options_.xls_range);

Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});

Error in ==> teste at 216
dynare_estimation(var_list_);

Error in ==> read_variables at 42
eval(dyn_instr_01);

Error in ==> dynare_estimation_1 at 237
rawdata = read_variables(options_.datafile,options_.varobs,[],options_.xls_sheet,options_.xls_range);

Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});

Error in ==> teste at 216
dynare_estimation(var_list_);

Error in ==> read_variables at 42
eval(dyn_instr_01);

Error in ==> dynare_estimation_1 at 237
rawdata = read_variables(options_.datafile,options_.varobs,[],options_.xls_sheet,options_.xls_range);

Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});

Error in ==> teste at 216
dynare_estimation(var_list_);

Error in ==> read_variables at 42
eval(dyn_instr_01);

Error in ==> dynare_estimation_1 at 237
rawdata = read_variables(options_.datafile,options_.varobs,[],options_.xls_sheet,options_.xls_range);

Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});

Error in ==> teste at 216
dynare_estimation(var_list_);

Error in ==> read_variables at 42
eval(dyn_instr_01);

Error in ==> dynare_estimation_1 at 237
rawdata = read_variables(options_.datafile,options_.varobs,[],options_.xls_sheet,options_.xls_range);

Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});

Error in ==> teste at 216
dynare_estimation(var_list_);

Error in ==> dynare at 102
evalin('base',fname) ;
Attachments
teste1.mod
(1.65 KiB) Downloaded 658 times
teste.xls
(17.5 KiB) Downloaded 351 times
pedroac81
 
Posts: 14
Joined: Thu May 14, 2009 4:04 am

Re: Baysian estimation of Lubik et al JME 2007

Postby StephaneAdjemian » Sun May 24, 2009 2:44 pm

Hi Pedro,

You have several problems here.

First, the problem with the priors seems to be related to your matlab installation. There is a bug when dynare tries to save the plots in eps or pdf formats. If you cannot fix this (you may find some tips on a matlab dedicated forum), you can comment out the lines 65, 67, 108, 110, 151 and 153 (note that I am refering to the line numbers of the snapshot version, these numbers may be wrong with your dynare version).

Second, there is a problem with the declaration of the priors on the size of the structural shocks. You have to replace

Code: Select all
sigmar, inv_gamma_pdf, 0.5, 4;
sigmaq, inv_gamma_pdf, 1.5, 4;
sigmaz, inv_gamma_pdf, 1, 4;
sigmayw, inv_gamma_pdf, 1.5, 4;
sigmapw, inv_gamma_pdf, 0.55, 4;


by

Code: Select all
stderr ur, inv_gamma_pdf, 0.5, 4;
stderr uq, inv_gamma_pdf, 1.5, 4;
stderr uz, inv_gamma_pdf, 1, 4;
stderr uyw, inv_gamma_pdf, 1.5, 4;
stderr upw, inv_gamma_pdf, 0.55, 4;


Best,
Stéphane.


pedroac81 wrote:Hi Stephane,

thank you for your reply. I appreciate any comment.
I attached my .mod file and the.xls file with the data.

Thank you,

Pedro
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: Baysian estimation of Lubik et al JME 2007

Postby Philipp » Wed Mar 13, 2013 7:25 pm

Hi there,

unfortunately I have to pick up the problem again.

My settings are the following:
Matlab 2008, Dynare 4.2.1 trying to estimate Smets Wouters 2003 Paper on the EU,

Matlab wont stop to plot priors and only stops when I close one of the figures, then the following error message appears:

??? Error using ==> print at 310
Error using ==> get
Invalid handle object.

and much more which I ommit here.

Do you guys have a clue whats going on here?

You have the data and mod file attached.

Best wishes and many thanks for your comments.

Philipp
Attachments
sw03est.xls
(34 KiB) Downloaded 236 times
sw03est.mod
(4.96 KiB) Downloaded 233 times
Philipp
 
Posts: 36
Joined: Mon Apr 18, 2011 9:01 pm
Location: State Secretariate for Economic Affairs

Re: Baysian estimation of Lubik et al JME 2007

Postby jpfeifer » Wed Mar 13, 2013 9:52 pm

You named your data-file as the mod-file. Dynare then creates an m-file with the same name. When Dynare tries to load the data, it runs the m-file again and enters an infinite loop. Rename the data-file.
------------
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: Baysian estimation of Lubik et al JME 2007

Postby Philipp » Thu Mar 14, 2013 8:06 am

Dear jpfeifer,

thanks for your quick response. What a silly mistake...

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


Return to Dynare contributions and examples

Who is online

Users browsing this forum: No registered users and 2 guests