Merge pull request #975 from JohannesPfeifer/master

Add mod.file lost in 6d048d8766
time-shift
Houtan Bastani 2015-07-21 11:19:50 +02:00
commit aedf516af8
2 changed files with 25 additions and 2 deletions

View File

@ -504,7 +504,7 @@ if (~((any(bayestopt_.pshape > 0) && options_.mh_replic) || (any(bayestopt_.psha
oo_.Smoother.TrendCoeffs = trend_coeff;
oo_.Smoother.Variance = P;
i_endo = bayestopt_.smoother_saved_var_list;
if options_.nk ~= 0 && ~((any(bayestopt_.pshape > 0) && options_.mh_replic) || (any(bayestopt_.pshape> 0) && options_.load_mh_file))
if ~isempty(options_.nk) && options_.nk ~= 0 && (~((any(bayestopt_.pshape > 0) && options_.mh_replic) || (any(bayestopt_.pshape> 0) && options_.load_mh_file)))
oo_.FilteredVariablesKStepAhead = aK(options_.filter_step_ahead, ...
i_endo,:);
if isfield(options_,'kalman_algo')
@ -522,7 +522,7 @@ if (~((any(bayestopt_.pshape > 0) && options_.mh_replic) || (any(bayestopt_.psha
i1 = dr.order_var(bayestopt_.smoother_var_list(i));
eval(['oo_.SmoothedVariables.' deblank(M_.endo_names(i1,:)) ' = ' ...
'atT(i,:)'';']);
if options_.nk > 0 && ~((any(bayestopt_.pshape > 0) && options_.mh_replic) || (any(bayestopt_.pshape> 0) && options_.load_mh_file))
if ~isempty(options_.nk) && options_.nk > 0 && ~((any(bayestopt_.pshape > 0) && options_.mh_replic) || (any(bayestopt_.pshape> 0) && options_.load_mh_file))
eval(['oo_.FilteredVariables.' deblank(M_.endo_names(i1,:)) ...
' = squeeze(aK(1,i,2:end-(options_.nk-1)));']);
end

View File

@ -0,0 +1,23 @@
// Test whether a nonlinear equation specfied as a linear model is correctly filtered out
var A;
varexo epsilona;
parameters rho;
rho = .42;
model(linear);
log(A) = rho*log(A(-1)) + epsilona;
end;
initval;
A = 1.34;
end;
steady;