Added empty case for filter_step_ahead;

Fixed bug with bounds, when prior bounds are outside from lb and ub specified manually by the user;

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1801 ac1d8469-bf42-47a9-8791-bf33cf982152
time-shift
ratto 2008-04-14 10:17:31 +00:00
parent 460267525b
commit 442a212d28
1 changed files with 7 additions and 2 deletions

View File

@ -41,7 +41,10 @@ if options_.prefilter == 1
options_.noconstant = 1;
end
if options_.filtered_vars ~= 0 & options_.filter_step_ahead == 0
if options_.filtered_vars ~= 0 & isempty(options_.filter_step_ahead),
options_.filter_step_ahead = 1;
end
if options_.filtered_vars ~= 0 & options_.filter_step_ahead == 0,
options_.filter_step_ahead = 1;
end
if options_.filter_step_ahead ~= 0
@ -858,6 +861,8 @@ end
if (any(bayestopt_.pshape >0 ) & options_.mh_replic) | ...
(any(bayestopt_.pshape >0 ) & options_.load_mh_file) %% not ML estimation
bounds = prior_bounds(bayestopt_);
bounds(:,1)=max(bounds(:,1),lb);
bounds(:,2)=min(bounds(:,2),ub);
bayestopt_.lb = bounds(:,1);
bayestopt_.ub = bounds(:,2);
if any(xparam1 < bounds(:,1)) | any(xparam1 > bounds(:,2))
@ -1395,4 +1400,4 @@ end
if np > 0
pindx = estim_params_.param_vals(:,1);
save([M_.fname '_pindx','pindx']);
end
end