fixing bug when estimating models with a steady state different from

zero. Introduced in commit bd00dc11d8
time-shift
Michel Juillard 2011-11-01 18:23:12 +01:00
parent 02b86795b2
commit 9ac3e7a582
2 changed files with 16 additions and 7 deletions

View File

@ -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

View File

@ -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