Error in computing likelihood for initial parameter values

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.
try1.xls (15 KB)
bbgg.mod (3.38 KB)

try using estimated_param_init to define the start for estimation… try specifing other values that mean of priors.

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

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

also pecify sheet name and rage when reading from excel…

try reading data from mat file

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

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.
bbgg.mod (3.72 KB)

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.

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