Page 1 of 1
Error in computing likelihood for initial parameter values
Posted:
Wed Jun 02, 2010 7:47 am
by dean0504
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.
Re: Error in computing likelihood for initial parameter values
Posted:
Thu Jun 03, 2010 1:48 pm
by coot
try using estimated_param_init to define the start for estimation... try specifing other values that mean of priors.
Re: Error in computing likelihood for initial parameter values
Posted:
Thu Jun 03, 2010 2:13 pm
by coot
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
Re: Error in computing likelihood for initial parameter values
Posted:
Fri Jun 04, 2010 1:22 am
by dean0504
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
Re: Error in computing likelihood for initial parameter values
Posted:
Fri Jun 04, 2010 6:53 am
by jpfeifer
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.
Re: Error in computing likelihood for initial parameter values
Posted:
Thu Jun 10, 2010 7:36 am
by dean0504
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.
Re: Error in computing likelihood for initial parameter values
Posted:
Sat Jun 12, 2010 3:32 am
by coot
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