v4: bug in handling of options_.trend_coeffs
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1399 ac1d8469-bf42-47a9-8791-bf33cf982152time-shift
parent
4a0aeb12de
commit
f3375020fc
|
@ -115,8 +115,11 @@ function [fval,cost_flag,ys,trend_coeff,info] = DsgeLikelihood(xparam1,gend,data
|
||||||
end
|
end
|
||||||
if bayestopt_.with_trend == 1
|
if bayestopt_.with_trend == 1
|
||||||
trend_coeff = zeros(nobs,1);
|
trend_coeff = zeros(nobs,1);
|
||||||
|
t = options_.trend_coeffs;
|
||||||
for i=1:nobs
|
for i=1:nobs
|
||||||
trend_coeff(i) = evalin('base',bayestopt_.trend_coeff{i});
|
if ~isempty(t{i})
|
||||||
|
trend_coeff(i) = evalin('base',t{i});
|
||||||
|
end
|
||||||
end
|
end
|
||||||
trend = repmat(constant,1,gend)+trend_coeff*[1:gend];
|
trend = repmat(constant,1,gend)+trend_coeff*[1:gend];
|
||||||
else
|
else
|
||||||
|
|
|
@ -121,8 +121,11 @@ function [fval,llik,cost_flag,ys,trend_coeff,info] = DsgeLikelihood(xparam1,gend
|
||||||
end
|
end
|
||||||
if bayestopt_.with_trend == 1
|
if bayestopt_.with_trend == 1
|
||||||
trend_coeff = zeros(nobs,1);
|
trend_coeff = zeros(nobs,1);
|
||||||
|
t = options_.trend_coeffs;
|
||||||
for i=1:nobs
|
for i=1:nobs
|
||||||
trend_coeff(i) = evalin('base',bayestopt_.trend_coeff{i});
|
if ~isempty(t{i})
|
||||||
|
trend_coeff(i) = evalin('base',t{i});
|
||||||
|
end
|
||||||
end
|
end
|
||||||
trend = repmat(constant,1,gend)+trend_coeff*[1:gend];
|
trend = repmat(constant,1,gend)+trend_coeff*[1:gend];
|
||||||
else
|
else
|
||||||
|
|
|
@ -51,9 +51,11 @@ function [alphahat,etahat,epsilonhat,ahat,SteadyState,trend_coeff,aK,T,R] = Dsge
|
||||||
trend_coeff = zeros(nobs,1);
|
trend_coeff = zeros(nobs,1);
|
||||||
if bayestopt_.with_trend == 1
|
if bayestopt_.with_trend == 1
|
||||||
trend_coeff = zeros(nobs,1);
|
trend_coeff = zeros(nobs,1);
|
||||||
nx1 = estim_params_.nvx+estim_params_.nvn+estim_params_.ncx+estim_params_.ncn;
|
t = options_.trend_coeffs;
|
||||||
for i=1:nobs
|
for i=1:nobs
|
||||||
trend_coeff(i) = evalin('base',bayestopt_.trend_coeff{i});
|
if ~isempty(t{i})
|
||||||
|
trend_coeff(i) = evalin('base',t{i});
|
||||||
|
end
|
||||||
end
|
end
|
||||||
trend = constant*ones(1,gend)+trend_coeff*(1:gend);
|
trend = constant*ones(1,gend)+trend_coeff*(1:gend);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue