Page 1 of 1

Error: Undefined variable M_ . Anybody can help! Thanks.

PostPosted: Thu Nov 19, 2015 6:02 am
by ahnulxy
anybody can help me?
when I run mod file, dynare (v4.4.3,4.4.2 both versions) complains the following results. I do not know what is the problem behinds.
Since M_ is global why set_prior function can not access to it.

The mod file : T_AR2_no4.mod and two data files are attached in zip file!

Undefined variable M_.
Error in set_prior (line 74)
bayestopt_.name = cellstr(M_.exo_names(estim_params_.var_exo(:,1),:));
Error in dynare_estimation (line 246)
[xparam1,estim_params_,bayestopt_,lb,ub]=set_prior(estim_params_);
Error in T_AR2_no4 (line 565)
dynare_estimation(var_list_);

Re: Error: Undefined variable M_ . Anybody can help! Thanks.

PostPosted: Thu Nov 19, 2015 7:09 am
by jpfeifer
When I run the attached file, I get the error
Error using dynare_estimation_init (line 73)
options diffuse_filter, lik_init and/or kalman_algo have contradictory settings

because you set
Code: Select all
kalman_algo=603

Apart from this, you cannot hardcode the parameter dependencies the way you did it for estimation. Use model-local variables with the pound operator. See https://github.com/JohannesPfeifer/DSGE_mod/blob/master/Smets_Wouters_2007/Smets_Wouters_2007.mod