corrected bug when mode_compute is a string

time-shift
Michel Juillard 2011-01-26 11:09:26 +01:00
parent 91e30d45f7
commit a336799b96
1 changed files with 3 additions and 3 deletions

View File

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