Correction of a bug in the estimation of smoothed variables (occasionaly systematic error in the level).
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1391 ac1d8469-bf42-47a9-8791-bf33cf982152time-shift
parent
6ea51663a6
commit
a53e4db7ab
|
@ -39,10 +39,14 @@ function [alphahat,etahat,epsilonhat,ahat,SteadyState,trend_coeff,aK,T,R] = Dsge
|
||||||
%------------------------------------------------------------------------------
|
%------------------------------------------------------------------------------
|
||||||
[T,R,SteadyState] = dynare_resolve;
|
[T,R,SteadyState] = dynare_resolve;
|
||||||
bayestopt_.mf = bayestopt_.mf2;
|
bayestopt_.mf = bayestopt_.mf2;
|
||||||
if options_.loglinear == 1
|
if options_.noconstant
|
||||||
constant = log(SteadyState(bayestopt_.mfys));
|
constant = zeros(nobs,1);
|
||||||
else
|
else
|
||||||
constant = SteadyState(bayestopt_.mfys);
|
if options_.loglinear == 1
|
||||||
|
constant = log(SteadyState(bayestopt_.mfys));
|
||||||
|
else
|
||||||
|
constant = SteadyState(bayestopt_.mfys);
|
||||||
|
end
|
||||||
end
|
end
|
||||||
trend_coeff = zeros(nobs,1);
|
trend_coeff = zeros(nobs,1);
|
||||||
if bayestopt_.with_trend == 1
|
if bayestopt_.with_trend == 1
|
||||||
|
|
|
@ -1021,15 +1021,18 @@ if ~((any(bayestopt_.pshape > 0) & options_.mh_replic) | (any(bayestopt_.pshape
|
||||||
%%
|
%%
|
||||||
%% Smooth observational errors...
|
%% Smooth observational errors...
|
||||||
%%
|
%%
|
||||||
yf = zeros(gend,n_varobs);
|
if options_.noconstant
|
||||||
if options_.prefilter == 1
|
yf = zeros(n_varobs,gend);
|
||||||
yf = atT(bayestopt_.mf,:)+repmat(transpose(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
|
else
|
||||||
yf = atT(bayestopt_.mf,:)+repmat(ys(bayestopt_.mfys),1,gend)+...
|
if options_.prefilter == 1
|
||||||
trend_coeff*[1:gend];
|
yf = atT(bayestopt_.mf,:)+repmat(transpose(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
|
end
|
||||||
if nvn
|
if nvn
|
||||||
number_of_plots_to_draw = 0;
|
number_of_plots_to_draw = 0;
|
||||||
|
|
Loading…
Reference in New Issue