Skip to content
Snippets Groups Projects
Commit 1e2fb88d authored by Johannes Pfeifer's avatar Johannes Pfeifer
Browse files

IVF: fix error handling for smoother

parent eeecccd2
Branches
Tags
1 merge request!2109Improvements and fixes for OccBin inversion filter
......@@ -106,7 +106,14 @@ filtered_errs_init = zeros(sample_length,sum(err_index));
if info(1)
fval = Inf;
exit_flag = 0;
atT=NaN(size(stateval(:,DynareResults.dr.order_var)'));
innov=NaN(Model.exo_nbr,sample_length);
return
else
atT = stateval(:,DynareResults.dr.order_var)';
innov = zeros(Model.exo_nbr,sample_length);
innov(diag(Model.Sigma_e)~=0,:)=filtered_errs';
updated_variables = atT*nan;
end
nobs=size(filtered_errs,1);
......@@ -185,10 +192,7 @@ end
% remember that the likelihood has already been multiplied by -1
% hence, posterior is -1 times the log of the prior
fval = like+prior;
atT = stateval(:,DynareResults.dr.order_var)';
innov = zeros(Model.exo_nbr,sample_length);
innov(diag(Model.Sigma_e)~=0,:)=filtered_errs';
updated_variables = atT*nan;
BayesInfo.mf = BayesInfo.smoother_var_list(BayesInfo.smoother_mf);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment