Index Exceed matrix dimensions

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.

Index Exceed matrix dimensions

Postby pedroac81 » Tue Apr 06, 2010 2:41 am

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
Attachments
ipt2.mod
(3 KiB) Downloaded 69 times
pedroac81
 
Posts: 14
Joined: Thu May 14, 2009 4:04 am

Re: Index Exceed matrix dimensions

Postby pedroac81 » Tue Apr 20, 2010 4:59 pm

Hi All,

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

Thanks,

Pedro
pedroac81
 
Posts: 14
Joined: Thu May 14, 2009 4:04 am

Re: Index Exceed matrix dimensions

Postby jpfeifer » Wed Apr 21, 2010 7:17 am

Hi, without your data file, it's hard to debug the program. Please post it.
------------
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

Re: Index Exceed matrix dimensions

Postby pedroac81 » Wed Apr 21, 2010 10:44 pm

Sure, please find it attached. Thank you for looking at it.

Best,

Pedro
Attachments
datafile.xls
(22 KiB) Downloaded 67 times
pedroac81
 
Posts: 14
Joined: Thu May 14, 2009 4:04 am

Re: Index Exceed matrix dimensions

Postby jpfeifer » Thu Apr 22, 2010 6:03 am

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
Attachments
dataipt.xls
Datafile with working name
(23 KiB) Downloaded 69 times
ipt2.mod
(3.19 KiB) Downloaded 79 times
------------
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

Re: Index Exceed matrix dimensions

Postby pedroac81 » Thu Apr 22, 2010 5:26 pm

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
pedroac81
 
Posts: 14
Joined: Thu May 14, 2009 4:04 am

Re: Index Exceed matrix dimensions

Postby jpfeifer » Thu Apr 22, 2010 6:56 pm

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

Re: Index Exceed matrix dimensions

Postby pedroac81 » Thu Apr 22, 2010 8:25 pm

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
Attachments
brazilipt.xls
(23 KiB) Downloaded 74 times
ipt2.mod
(3 KiB) Downloaded 63 times
pedroac81
 
Posts: 14
Joined: Thu May 14, 2009 4:04 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 8 guests