Page 1 of 1

Bug or user error in posterior_analysis in 4.1.1?

PostPosted: Tue Apr 27, 2010 1:14 am
by jseabold
Hi,

I am replicating the Smets-Wouters AER US model, and I am running into the following error. Note that "Steps" in the below is an empty "list" [] (I don't know what this is called in Matlab).

<snip>
MH: Posterior (dsge) IRFs...
MH: Posterior IRFs, done!

??? Subscripted assignment dimension mismatch.

Error in ==> conditional_variance_decomposition_mc_analysis at 72
p_mean(1,:) = Steps;

Error in ==> posterior_analysis>job at 78
oo_ = conditional_variance_decomposition_mc_analysis(SampleSize,'posterior',M_.dname,M_.fname,...

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

Error in ==> compute_moments_varendo at 110
oo_ = posterior_analysis('conditional
decomposition',var_list_(i,:),M_.exo_names(j,:),Steps,options_,M_,oo_);

Error in ==> dynare_estimation_1 at 1077
oo_ = compute_moments_varendo('posterior',options_,M_,oo_,var_list_);

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

Error in ==> usmodel at 491
dynare_estimation(var_list_);

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


I think the relevant call is the following. I can post the code and data if it would help.

estimation(optim=('MaxIter',200),datafile=usmodel_data,mode_compute=0,
mode_file=usmodel_mode,first_obs=71,presample=4,lik_init=2,prefilter=0,
mh_replic=50000,mh_nblocks=5,mh_jscale=0.40,mh_drop=0.2,bayesian_irf,
irf=20,moments_varendo,filtered_vars,smoother) dy pinfobs robs labobs;

Thanks.

Re: Bug or user error in posterior_analysis in 4.1.1?

PostPosted: Thu Apr 29, 2010 8:55 am
by AssiaEzzeroug
yes please post your mod-file and data. Should be more convenient to see what's wrong.

Thanks

Re: Bug or user error in posterior_analysis in 4.1.1?

PostPosted: Mon Aug 09, 2010 9:03 pm
by Thorsten
Hey all,

here is a mod-file of the SW US model which reproduces the bug...

"??? Subscripted assignment dimension mismatch.

Error in ==> conditional_variance_decomposition_mc_analysis at 70
p_mean(1,:) = Steps;"

I am using Dynare 4.1.2

Just "dynare usmodel" and wait a little. (I guess you could change the mode_compute to 0 to speed things up a little.)

I guess commenting out works - or adjusting "options.conditional_variance_decomposition" to something other than "[]" but I find that odd. Is there another workaround?

Best,
Thorsten