Hi there,

I’ve run a bayesian estimation and everything went well (bayesian irfs, mode computation, etc). But when I include the option moments_varendo in the estimation command, I get the error message (in both versions 4.1.1 and 4.1.2):

??? Undefined function or variable “MAX_mega_bytes”.

Error in ==> selec_posterior_draws at 101
if SampleSize*drawsize <= MAX_mega_bytes% The posterior draws are saved
in one file.

Error in ==> posterior_analysis at 31
SampleAddress = selec_posterior_draws(SampleSize,drsize);

Error in ==> compute_moments_varendo at 64
oo_ =

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

Error in ==> dynare_estimation at 62

Error in ==> brasil_estimacao at 2242

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

Can anyone please help? Thanks, Fabia

Thanks for reporting this bug. It is now fixed in the unstable version of Dynare, and will be incorporated in the next release.

As a quick fix, you can for the moment edit yourself the file matlab/selec_posterior_draws.m, and move line 56 to line 54 (before the “if”)


Great! Thanks a lot!