index out of bounds ...

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 out of bounds ...

Postby samirhuseyn » Sat May 08, 2010 11:16 am

Hi everyone

While running my mod file in Dynare, I got the following error message,can anyone suggest solution?

thanks in advance

best

Samir


Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.

Starting Dynare ...
Starting preprocessing of the model file ...
20 equation(s) found
Processing derivation ...
Processing Order 1... done
Processing Order 2... done
Processing outputs ...
Preprocessing completed.
Starting Matlab computing ...


STEADY-STATE RESULTS:

y 1.11022e-016
a 0
psi_t 0
mc 0
c 1.11022e-016
pi_f 0
pi_h 0
pi_t 0
q 1.11022e-016
r 0
y_st 0
r_st 0
tot -2.22045e-016
nu_tot 0
nu_q 0
nu_pih 0
nu_pif 0
nu_r 0
nu_rst 0
nu_yst 0

EIGENVALUES:
Modulus Real Imaginary

1.887e-016 -1.887e-016 0
2.882e-016 2.882e-016 0
0.3897 0.2728 0.2783
0.3897 0.2728 -0.2783
0.5 0.5 0
0.5 0.5 0
0.5 0.5 0
0.5212 0.3792 0.3576
0.5212 0.3792 -0.3576
0.6539 0.6539 0
0.9 0.9 0
0.9 0.9 0
0.9 0.9 0
0.9 0.9 0
0.9 0.9 0
0.9 0.9 0
0.9 0.9 0
1.254 1.254 0
2.898 2.898 0
4.006 4.006 0
Inf Inf 0


There are 4 eigenvalue(s) larger than 1 in modulus
for 4 forward-looking variable(s)

The rank condition is verified.


You did not declare endogenous variables after the estimation command.

You did not declare endogenous variables after the estimation command.
??? Attempted to access k(1); index out of bounds because numel(k)=0.

Error in ==> draw_prior_density at 114
binf = abscissa(k(1));

Error in ==> plot_priors at 97
[x,f,abscissa,dens,binf,bsup] = draw_prior_density(i);

Error in ==> dynare_estimation_1 at 92
plot_priors

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

Error in ==> d2 at 297
dynare_estimation(var_list_);

Error in ==> dynare at 102
evalin('base',fname) ;
Attachments
d2.mod
(8.2 KiB) Downloaded 380 times
samirhuseyn
 
Posts: 6
Joined: Fri May 07, 2010 7:54 pm

Re: index out of bounds ...

Postby jpfeifer » Sat May 08, 2010 11:53 am

Hi,
please post the data-file so people can try to debug the code.
------------
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 out of bounds ...

Postby samirhuseyn » Sat May 08, 2010 11:59 am

jpfeifer wrote:Hi,
please post the data-file so people can try to debug the code.



Thanks for reply!

I am attaching data file as well..

It is in txt format,I usually keep it in upper directory,from where mod file exist. Maybe it seems silly, but it is the best way I found. As I could not "produce" proper mat file:(
Attachments
data.txt
(14.05 KiB) Downloaded 139 times
samirhuseyn
 
Posts: 6
Joined: Fri May 07, 2010 7:54 pm

Re: index out of bounds ...

Postby samirhuseyn » Sat May 08, 2010 1:53 pm

Sorry,

And please keep this file in the same directory with the mod file. Without it mod file would not read data.txt
Attachments
data.m
(394 Bytes) Downloaded 157 times
samirhuseyn
 
Posts: 6
Joined: Fri May 07, 2010 7:54 pm

Re: index out of bounds ...

Postby jpfeifer » Sat May 08, 2010 4:24 pm

Your problem seems to be the line

Code: Select all
thetah,          beta_pdf,           0.5,       0.5;

Apparently, the standard deviation of 0.5 (the second value) is too large. If you set it to 0.49, it runs.
------------
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 out of bounds ...

Postby StephaneAdjemian » Mon May 10, 2010 8:07 am

Hi, The problem is that when the prior expectation and the prior standard deviation are equal to one half the prior density is not defined. Dynare computes the parameters \alpha and \beta of the beta density (in set_prior.m) and in this special case obtains \alpha=\beta=0. We will add a warning for this exception in a future release.

Best, Stéphane.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.


Return to Dynare help

Who is online

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