Index out of bounds because size(estim_params_.var_endo)

Dear Dynare community,

Am estimating a baseline RBC model of Garcia Cicco et al 2010 from JPfeifer replication files on sites.google.com/site/pfeiferecon/dynare. However, dynare yields below error.

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

The rank condition is verified.

??? Attempted to access estim_params_.var_endo(:,1); index out of bounds because
size(estim_params_.var_endo)=[0,0].

Error in ==> BRBC at 242
tmp1 = find(estim_params_.var_endo(:,1)==11);

Error in ==> dynare at 180
evalin(‘base’,fname) ;

Various restriction on estimation command (datafile=Book1, mode_check, mode_compute=6, moments_varendo, mh_nblocks=1, mh_replic=2000000) g_y g_c g_i t_b_y; doesn’t resolve the problem.

What could be the problem with my code.

Kind Regards.
Book1.xls (11.7 KB)
BRBC.mod (3.58 KB)

You are trying to specify initial values on parameters that are not specified to be estimated. In particular, you set the starting value for measurement error, but you did not specify measurement error.

I’ve tried to specify measurement errors eg psi, uniform_pdf, 0, 5; in vain. Any additional tip/ trick?

Which code exactly did you try?

Garcia Cicco et al 2010 replication code.

My replication code runs. I told you to correctly specify the measurement error. You posted some cryptic code snipped that does not work:

But how exactly did you try to specify the measurement error?

I have done the following (see attached revised code):

  1. specified measurement errors as you suggest in,

.
using the two approaches separately.

  1. provided explicit starting values for the parameters instead of starting at the priors.
    The error generated is

[quote]Error in ==> dynare_estimation_init at 253
plot_priors(bayestopt_,M_,estim_params_,options_)

Error in ==> dynare_estimation_1 at 81
[dataset_,xparam1, hh, M_, options_, oo_, estim_params_,bayestopt_] =
dynare_estimation_init(var_list_, dname, ], M_, options_, oo_, estim_params_,
bayestopt_);[/quote]

.

Besides you replication files does not run as well with the error

although the steady state block is specified.

What (am I not doing right) is the problem with my code?
BRBC.mod (4.79 KB)

Your file does not run, because the steady state is wrong. The model is not actually linear with mean 0. See e.g. the second equation that contains phi*g_bar.
My mod-file crashes with the posted message, because it requires Dynare 4.5 (i.e. at the moment the unstable version of Dynare)

Thank you. My code now runs.

However, the posterior distribution for figure 3 is not generated although the autocorrelation function is.

I cannot also see them in the oo_ folder.

In your replication code, the following error is generated although the data naming style and path is right as suggested in

[quote]Problem running code]

:

Choose one of the following options:

[1] Consider all the endogenous variables.
[2] Consider all the observed endogenous variables.
[3] Stop Dynare and change the mod file.

options [default is 1] = 1

??? Error using ==> load_xls_file_data at 117
load_xls_file_data: I am not able to read the dates!

Error in ==> dseries.dseries at 131
[freq,init,data,varlist] = load_xls_file_data(varargin{1}, sheet, range);

Error in ==> makedataset at 98
DynareDataset = dseries(datafile);

Error in ==> dynare_estimation_init at 490
[dataset_, dataset_info, newdatainterfaceflag] = makedataset(options_,
options_.dsge_var*options_.dsge_varlag, gsa_flag);

Error in ==> dynare_estimation_1 at 94
[dataset_, dataset_info, xparam1, hh, M_, options_, oo_, estim_params_, bayestopt_,
bounds] = …

Error in ==> dynare_estimation at 91
dynare_estimation_1(var_list,dname);

Error in ==> GarciaCiccoetal2010 at 295
oo_recursive_=dynare_estimation(var_list_);

Error in ==> dynare at 199
evalin(‘base’,fname) ;

What could be the problem.

I have resolved the error. Thank you.

Good morning In fact I have nearly the same error
?? Error using ==> dseries.subsref at 231
dseries::subsref: Indices are out of bounds! Subsample cannot end after 128Y.

Error in ==> makedataset at 220
DynareDataset = DynareDataset(FIRSTOBS:lastobs);

Error in ==> dynare_estimation_init at 493
[dataset_, dataset_info, newdatainterfaceflag] = makedataset(options_,
options_.dsge_var*options_.dsge_varlag, gsa_flag);

Error in ==> dynare_estimation_1 at 94
[dataset_, dataset_info, xparam1, hh, M_, options_, oo_, estim_params_, bayestopt_,
bounds] = …

Error in ==> dynare_estimation at 91
dynare_estimation_1(var_list,dname);

Error in ==> article2fiscalsansd at 502
oo_recursive_=dynare_estimation(var_list_);

Error in ==> dynare at 223
evalin(‘base’,fname) ;

could ayone help me? thank you jpfeifer
article2fiscalsansd.mod (10.5 KB)
data7.m (13.1 KB)

The current data interface in the unstable version is still under development. With

You want 128 observations after observation 50. But you only have 128 observations in total. Thus, you need to adjust nobs to account for not starting with observation 1.