Commit 9ac3e7a5 authored by MichelJuillard's avatar MichelJuillard

fixing bug when estimating models with a steady state different from

zero. Introduced in commit bd00dc11
parent 02b86795
......@@ -72,13 +72,6 @@ if ~isempty(estim_params_)
set_parameters(xparam1);
end
if all(abs(oo_.steady_state(bayestopt_.mfys))<1e-9)
options_.noconstant = 1;
else
options_.noconstant = 0;
end
% compute sample moments if needed (bvar-dsge)
if options_.dsge_var
if dataset_.missing.state
......
......@@ -308,3 +308,19 @@ end
dataset_ = initialize_dataset(options_.datafile,options_.varobs,options_.first_obs,options_.nobs,transformation,options_.prefilter,xls);
options_.nobs = dataset_.info.ntobs;
% setting noconstant option
if options_.diffuse_filter
steadystate_check_flag = 0;
else
steadystate_check_flag = 1;
end
oo_.steady_state = evaluate_steady_state(oo_.steady_state,M_,options_,oo_,steadystate_check_flag);
if all(abs(oo_.steady_state(bayestopt_.mfys))<1e-9)
options_.noconstant = 1;
else
options_.noconstant = 0;
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment