Page 1 of 1

BVAR

PostPosted: Tue Mar 11, 2014 8:07 am
by m.asgari
Dear all,

I'm used Bayesian estimation. I'm trying to solved a example. However, show the following error:


Index exceeds matrix dimensions.
Error in bvar_toolbox (line 109)
ydata = dataset(idx, ;
Error in bvar_density (line 33)
[ny, nx, posterior, prior] = bvar_toolbox(nlags);
Error in fTheSouthAfricanDSGEModel (line 732)
bvar_density(6);
Error in dynare (line 180)
evalin('base',fname) ;


will you so kind to give me some advises. thank you in advance.
maz

Re: BVAR

PostPosted: Tue Mar 11, 2014 8:17 am
by m.asgari
Dear all,

I'm used Bayesian estimation. I'm trying to solved a example. However, show the following error:


Index exceeds matrix dimensions.
Error in bvar_toolbox (line 109)
ydata = dataset(idx, ;
Error in bvar_density (line 33)
[ny, nx, posterior, prior] = bvar_toolbox(nlags);
Error in fTheSouthAfricanDSGEModel (line 732)
bvar_density(6);
Error in dynare (line 180)
evalin('base',fname) ;


will you so kind to give me some advises. thank you in advance.
maz

Re: BVAR

PostPosted: Tue Mar 11, 2014 10:53 am
by jpfeifer
You need to add
Code: Select all
nobs=22

to the bvar_density options (there are 22 observations left in your data set when you start at first_obs=20). The same applies to bvar_forecast.