Forecast using bayesian estimation

I am trying to reply the Smets and Wouter (2003) work , in which I want to make forecast for the euro zone but I have an error when trying to carry out it, I would thank them enough if could tell me how can I solve that problem. The error finishing the algorithm metropolis - hastings is

?? Error using ==> plus
Matrix dimensions must agree.

Error in ==> metropolis at 2039
yf(:,IdObs) = yf(:,IdObs)+repmat(bayestopt_.mean_varobs’, …

Error in ==> dynare_estimation at 778
metropolis(xparam1,invhess,gend,data,rawdata,bounds);

Error in ==> sw6 at 277
dynare_estimation(var_list_);

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

thanks in advance

WGonzalez

Dear WGonzalez

I think you are estimating with prefilter option == 1.

Simply remove the transpose from bayestopt_.mean_varobs’ in this and several lines down in the metropolis.m file. I think it should work.

JT

Error in ==> metropolis at 2039
yf(:,IdObs) = yf(:,IdObs)+repmat(bayestopt_.mean_varobs’