Added the possibility to initialize the estimated parameters to the prior mode instead of the (default) prior mean.
parent
6ea8dd4935
commit
50e9422c34
|
@ -212,6 +212,7 @@ end
|
|||
options_.filter_covariance = 0;
|
||||
options_.filter_decomposition = 0;
|
||||
options_.selected_variables_only = 0;
|
||||
options_.initialize_estimated_parameters_with_the_prior_mode = 0;
|
||||
% Misc
|
||||
options_.conf_sig = 0.6;
|
||||
oo_.exo_simul = [];
|
||||
|
|
|
@ -249,7 +249,17 @@ for i=1:length(k)
|
|||
end
|
||||
|
||||
k = find(isnan(xparam1));
|
||||
if ~isempty(k)
|
||||
xparam1(k) = bayestopt_.p1(k);
|
||||
end
|
||||
|
||||
if options_.initialize_estimated_parameters_with_the_prior_mode
|
||||
xparam1 = bayestopt_.p5;
|
||||
k = find(isnan(xparam1));% Because the uniform density do not have a mode!
|
||||
if ~isempty(k)
|
||||
xparam1(k) = bayestopt_.p1(k);
|
||||
end
|
||||
end
|
||||
|
||||
% I create subfolder M_.dname/prior if needed.
|
||||
CheckPath('prior');
|
||||
|
|
Loading…
Reference in New Issue