corrected bug when mode_compute is a string
parent
91e30d45f7
commit
a336799b96
|
@ -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);
|
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
|
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);
|
[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;
|
oo_.Smoother.SteadyState = ys;
|
||||||
|
@ -406,14 +406,14 @@ if options_.mode_compute == 0 && length(options_.mode_file) == 0 && options_.mh_
|
||||||
return;
|
return;
|
||||||
end
|
end
|
||||||
|
|
||||||
if options_.mode_compute>0 || options_.mode_compute==6
|
if options_.mode_compute==6
|
||||||
% Erase previously computed optimal mh scale parameter.
|
% Erase previously computed optimal mh scale parameter.
|
||||||
delete([M_.fname '_optimal_mh_scale_parameter.mat'])
|
delete([M_.fname '_optimal_mh_scale_parameter.mat'])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
%% Estimation of the posterior mode or likelihood mode
|
%% 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
|
if ~options_.dsge_var
|
||||||
fh=str2func('DsgeLikelihood');
|
fh=str2func('DsgeLikelihood');
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue