IVF: fix error handling for smoother
parent
eeecccd29b
commit
1e2fb88d32
|
@ -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);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue