Dear Michel, I pushed a fix for the issue. It works as you said. You can commit it. Best, Johannes -------- Johannes Pfeifer Haußerstr. 29 72076 Tübingen Tel.: +49-(0)7071-6396184 Mobil: +49-(0)170-6936820 jpfeifer@gmx.de Von: dev-bounces@dynare.org [mailto:dev-bounces@dynare.org] Im Auftrag von Michel Juillard Gesendet: Freitag, 11. Mai 2012 15:41 An: List for Dynare developers Betreff: Re: [DynareDev] Problem in estimation Thanks Johannes, On 05/10/2012 11:33 PM, Johannes Pfeifer wrote: Dear all, Could someone have a look at the mod-file in http://www.dynare.org/phpBB3/viewtopic.php?f=1 <http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=3700> &t=3700 In estimation, it sets prefilter=1 and hence options_.noconstant gets set to 1. dynare_estimation_1.m lines 1135 following in Dynare 4.2.5 and the current source read: if options_.noconstant yf = zeros(n_varobs,gend); else if options_.prefilter == 1 yf = atT(bayestopt_.mf,:)+repmat(bayestopt_.mean_varobs,1,gend); elseif options_.loglinear == 1 yf = atT(bayestopt_.mf,:)+repmat(log(ys(bayestopt_.mfys)),1,gend)+... trend_coeff*[1:gend]; else yf = atT(bayestopt_.mf,:)+repmat(ys(bayestopt_.mfys),1,gend)+... trend_coeff*[1:gend]; end end As a consequence, the filtered variables in yf, which are then plotted, are always 0. My guess is that this is a bug and the treatment of noconstant and prefilter is not consistent. I think that we can safely remove the branch for options_.noconstant == 1, as this case is covered either by prefilter == 1 or ys == 0. I make the change but please tell me if you see a problem with it. Moreover, I am not sure why we save atT to the results eval(['oo_.SmoothedVariables.' deblank(M_.endo_names(i1,:)) ' = atT(i,:)'';']); but plot yf, which is a transformation of atT. The origin of the problem is that we have only information about trends for observed variables, for models where the user provide some. So we decided to store the demeaned detrended smoothed series and let the user do the desired adjustment herself. As the plot deals only with observed series and are meant to illustrate the size of measurement errors, we add mean and trend to the plot. I agree that it is not ideal. Best Michel Best, Johannes -- Johannes Pfeifer Haußerstr. 29 72076 Tübingen Tel.: +49-(0)7071-6396184 Mobil.: +49-(0)170-6936820 Germany _______________________________________________ Dev mailing list Dev@dynare.org https://www.dynare.org/cgi-bin/mailman/listinfo/dev