Page 1 of 1

Index Exceed matrix dimensions

PostPosted: Tue Apr 06, 2010 2:41 am
by pedroac81
Hi,

I keep getting the following error message:

??? Index exceeds matrix dimensions.

Error in ==> dsge_posterior_theoretical_covariance at 85
Covariance_matrix(linea,symmetric_matrix_index(i,j,nvar)) = tmp{1}(i,j);

Error in ==> posterior_analysis>job at 55
[nvar,vartan,NumberOfFiles] = ...

Error in ==> posterior_analysis at 33
oo_ = job(type,SampleSize,arg1,arg2,arg3,options_,M_,oo_);

Error in ==> compute_moments_varendo at 41
oo_ = posterior_analysis('variance',var_list_(i,:),var_list_(j,:),[],options_,M_,oo_);

Error in ==> dynare_estimation_1 at 959
oo_ = compute_moments_varendo(options_,M_,oo_,var_list_);

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

Error in ==> ipt2 at 182
dynare_estimation(var_list_);

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



I have run similar models in dynare without problems. I am wondering what may be causing this problem. I appreciate any feedback. File is attached.

Best,
Pedro

Re: Index Exceed matrix dimensions

PostPosted: Tue Apr 20, 2010 4:59 pm
by pedroac81
Hi All,

I aa still stuck with this thing....Any idea? I appreciate any comment....

Thanks,

Pedro

Re: Index Exceed matrix dimensions

PostPosted: Wed Apr 21, 2010 7:17 am
by jpfeifer
Hi, without your data file, it's hard to debug the program. Please post it.

Re: Index Exceed matrix dimensions

PostPosted: Wed Apr 21, 2010 10:44 pm
by pedroac81
Sure, please find it attached. Thank you for looking at it.

Best,

Pedro

Re: Index Exceed matrix dimensions

PostPosted: Thu Apr 22, 2010 6:03 am
by jpfeifer
Hi,
after inserting the parameter values at the beginning, I get another error message that your Hessian is not positive definite, which is a more standard error (usually choose different starting values or mode_compute=6). Have a look at the files.

Best,

Johannes

Re: Index Exceed matrix dimensions

PostPosted: Thu Apr 22, 2010 5:26 pm
by pedroac81
Hi Johannes,

thanks for taking you time to look at my files.
What I don't understand is that I've estimated the parameters in dynare using this code but then it would not perform the IRF and variance decomposition analyses (and the error message above appears). Wouldn't be the case that if my Hessian matrix wasn't positive definite then I wouldn't be able even to estimate the parameters?

Thanks again,

Pedro

Re: Index Exceed matrix dimensions

PostPosted: Thu Apr 22, 2010 6:56 pm
by jpfeifer
Hi Pedro,

it is hard to judge, if you do not post everything in exactly the way it produces the error message. For example, I have to use an Excel-file, which you obviously did not. Moreover, the Excel file contains 41 observations while your initial code stated that you have 42 observations. So there may be a problem to.

Best Johannes

Re: Index Exceed matrix dimensions

PostPosted: Thu Apr 22, 2010 8:25 pm
by pedroac81
Hi Johannes,

sorry for this confusion. I am attaching the files again. Just run them and got the error message above, although the parameters were estimated.... I think you should be able to replicate the error message now....

Thanks for looking at this,
Pedro