Error in computing likelihood for initial parameter values

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.

Error in computing likelihood for initial parameter values

Postby dean0504 » Wed Jun 02, 2010 7:47 am

hey,guys.I update my question asked last week here.When I estimated a BGG model with heterogeneous firms,dynare warned me that
Error in computing likelihood for initial parameter values
??? Error using ==> print_info
Blanchard Kahn conditions are not satisfied: indeterminacy
Error in ==> initial_estimation_checks at 87
print_info(info)
Error in ==> dynare_estimation_1 at 320
initial_estimation_checks(xparam1,gend,data);
Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});
Error in ==> bbgg at 324
dynare_estimation(var_list_);
Error in ==> dynare at 102
evalin('base',fname) ;


Is this mean that the prior means of the paremeters I choosed are not proper for the model? So what should I do next? Thank you for your help.I attached my codes and data file here.
Attachments
try1.xls
(15 KiB) Downloaded 173 times
bbgg.mod
(3.38 KiB) Downloaded 223 times
dean0504
 
Posts: 25
Joined: Mon Jan 04, 2010 8:10 am

Re: Error in computing likelihood for initial parameter values

Postby coot » Thu Jun 03, 2010 1:48 pm

try using estimated_param_init to define the start for estimation... try specifing other values that mean of priors.
coot
 
Posts: 24
Joined: Tue Apr 20, 2010 10:54 am

Re: Error in computing likelihood for initial parameter values

Postby coot » Thu Jun 03, 2010 2:13 pm

the prior means do not satify blanchard kahn condition... try finding a set of parameters that do... you also misstyped at priors nu1 twice.... check it.... there are some parameters you dont use in model, like sig_g or sig_a... also the prior for

Code: Select all
sig_r,inv_gamma_pdf,0.01,inf;
is not good if you specifiy first that sig_r=2.01.... probably the value 0.01 is not good for steady state... try
Code: Select all
sig_r,inv_gamma_pdf,2.01,inf;


also pecify sheet name and rage when reading from excel...

try reading data from mat file
coot
 
Posts: 24
Joined: Tue Apr 20, 2010 10:54 am

Re: Error in computing likelihood for initial parameter values

Postby dean0504 » Fri Jun 04, 2010 1:22 am

Hi,coot!Thank you for your help!I think the programe has improved after I corrected my typo that you mentioned and change the std of rn to 2.01.But there is a new problem,dynare told me that
??? Error using ==> DiffuseLikelihood1
The variance of the forecast error remains singular until theend of the sample

Error in ==> DsgeLikelihood at 305
LIK = DiffuseLikelihood1(T,R,Q,Pinf,Pstar,data,trend,start);

Error in ==> initial_estimation_checks at 58
[fval,cost_flag,ys,trend_coeff,info] = DsgeLikelihood(xparam1,gend,data);

Error in ==> dynare_estimation_1 at 320
initial_estimation_checks(xparam1,gend,data);

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

Error in ==> bbgg at 318
dynare_estimation(var_list_);

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

Does this mean that there is something wrong with my data? The data is stationary however.So what should I do next?Thanks for hlep
dean0504
 
Posts: 25
Joined: Mon Jan 04, 2010 8:10 am

Re: Error in computing likelihood for initial parameter values

Postby jpfeifer » Fri Jun 04, 2010 6:53 am

You also did not specify shock variances as there is no shocks-statement. The attached version runs for me. Note that the standard errors are arbitrarily set.
Attachments
bbgg.mod
Running version
(3.72 KiB) Downloaded 351 times
------------
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: Error in computing likelihood for initial parameter values

Postby dean0504 » Thu Jun 10, 2010 7:36 am

Thanks very much for the help,now the code can run successfully.But when I run the code ,sometimes it can give me the estimated result,but sometimes it warned me that
??? Error using ==> chol
Matrix must be positive definite.
Error in ==> gmhmaxlik at 100
dd = transpose(chol(CovJump));
Error in ==> dynare_estimation_1 at 484
[xparam1,PostVar,Scale,PostMean] = ...
Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});
Error in ==> bbgg1 at 335
dynare_estimation(var_list_);
Error in ==> dynare at 102
evalin('base',fname) ;

Why does this happen?And what should I do ? Thank you very much.
dean0504
 
Posts: 25
Joined: Mon Jan 04, 2010 8:10 am

Re: Error in computing likelihood for initial parameter values

Postby coot » Sat Jun 12, 2010 3:32 am

try searching for your error on the forum... it is explained.... some time optimization routines do not get the results... it happens just sometimes because as I understood there is some randomness involved in optimization routiness... if you want not to get it try using mode_compute=6 in your estimation but note that this is not an optimization routine or a very inefficient one... read dynare wiki for mode_compute=6 and search the forum for your error related to chol
coot
 
Posts: 24
Joined: Tue Apr 20, 2010 10:54 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests