Page 1 of 1

Problem with Estimation

PostPosted: Sun Dec 19, 2010 1:09 pm
by dwb84
Dear all,

I'm using Dynare to estimate a DSGE model (An and Schorfheide (2007), Bayesian Analysis of DSGE Models). The following error message shows up:


??? Subscript indices must either be real positive integers or logicals.
Error in ==> set_prior at 135
bayestopt_.name =
cellstr(strvcat(char(bayestopt_.name),M_.param_names(estim_params_.param_vals(:,1),:)));

Error in ==> dynare_estimation_1 at 83
[xparam1,estim_params_,bayestopt_,lb,ub,M_] = set_prior(estim_params_,M_,options_);

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

Error in ==> Project at 136
dynare_estimation(var_list_);

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


Do you have any suggestions? Thanks a lot.

Re: Problem with Estimation

PostPosted: Wed Dec 22, 2010 7:05 am
by dwb84
UPDATE:

I simulated the model and everything works fine. So the model code itself seems to be correct. I suppose there is something wrong with the data file or the estimation command. Any suggestion? Thanks.

Re: Problem with Estimation

PostPosted: Tue Jan 11, 2011 11:31 am
by SébastienVillemot
The problem comes from the fact that you are trying to estimate kappa, r_A, pi_A, gamma_Q which are not parameters of the model, but what we call "model local variables". All parameters estimated should be declared in the "parameters" statement. In the future, Dynare will display a more explicit message for your error.

Also note that in your XLS file, you should capitalize the column names, to match the variables in the MOD file.

Best,