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

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: Undefined variable M_ . Anybody can help! Thanks.

Postby ahnulxy » Thu Nov 19, 2015 6:02 am

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_);
Attachments
Baseline.zip
one mod file and two mat files
(43.33 KiB) Downloaded 33 times
ahnulxy
 
Posts: 43
Joined: Thu May 10, 2012 7:24 am

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

Postby jpfeifer » Thu Nov 19, 2015 7:09 am

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
------------
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


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 15 guests