diff --git a/matlab/dynare_estimation_1.m b/matlab/dynare_estimation_1.m index 9e6c441cf..27d8a815b 100644 --- a/matlab/dynare_estimation_1.m +++ b/matlab/dynare_estimation_1.m @@ -371,7 +371,7 @@ missing_value = ~(number_of_observations == gend*n_varobs); initial_estimation_checks(xparam1,gend,data,data_index,number_of_observations,no_more_missing_observations); -if options_.mode_compute == 0 && length(options_.mode_file) == 0 && options_.mh_posterior_mode_estimation==0 +if isnumeric(options_.mode_compute) && options_.mode_compute == 0 && length(options_.mode_file) == 0 && options_.mh_posterior_mode_estimation==0 if options_.smoother == 1 [atT,innov,measurement_error,updated_variables,ys,trend_coeff,aK,T,R,P,PK,decomp] = DsgeSmoother(xparam1,gend,data,data_index,missing_value); oo_.Smoother.SteadyState = ys; @@ -406,14 +406,14 @@ if options_.mode_compute == 0 && length(options_.mode_file) == 0 && options_.mh_ return; end -if options_.mode_compute>0 || options_.mode_compute==6 +if options_.mode_compute==6 % Erase previously computed optimal mh scale parameter. delete([M_.fname '_optimal_mh_scale_parameter.mat']) end %% Estimation of the posterior mode or likelihood mode -if options_.mode_compute > 0 && ~options_.mh_posterior_mode_estimation +if any(options_.mode_compute ~= 0) && ~options_.mh_posterior_mode_estimation if ~options_.dsge_var fh=str2func('DsgeLikelihood'); else