Merge branch 'occbin_prefilter' of git.dynare.org:JohannesPfeifer/dynare

Ref. !2013
fix-nonlinear-solvers
Sébastien Villemot 2022-03-29 16:47:32 +02:00
commit 7d3ab36743
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
2 changed files with 7 additions and 1 deletions

View File

@ -50,7 +50,7 @@ function [fval,info,exit_flag,DLIK,Hess,SteadyState,trend_coeff,Model,DynareOpti
DLIK=[];
Hess=[];
trend_coeff = [];
obs = obs_info.rawdata;
obs = dataset_.data;
obs_list = DynareOptions.varobs(:);
exit_flag = 1;

View File

@ -76,6 +76,12 @@ if DynareOptions.order>1
end
end
if DynareOptions.occbin.likelihood.status || DynareOptions.occbin.smoother.status
if DynareOptions.prefilter
error('initial_estimation_checks:: Occbin is incompatible with the prefilter option due to the sample mean generally not corresponding to the steady state with an occasionally binding constraint.')
end
end
if (DynareOptions.occbin.likelihood.status && DynareOptions.occbin.likelihood.inversion_filter) || (DynareOptions.occbin.smoother.status && DynareOptions.occbin.smoother.inversion_filter)
err_index= find(diag(Model.Sigma_e)~=0);
if length(err_index)~=length(DynareOptions.varobs)