Merge branch 'bugfixes' into 'master'
Bugfixes for parallel and estimation See merge request Dynare/dynare!2244covariance-quadratic-approximation
commit
d7850a2bbe
|
@ -464,7 +464,7 @@ if ~strcmp(posterior_sampler_options.posterior_sampling_method,'slice')
|
|||
end
|
||||
|
||||
if options_.load_mh_file && posterior_sampler_options.use_mh_covariance_matrix
|
||||
[~, invhess] = compute_posterior_covariance_matrix(bayestopt_.name, fname, dname, outputFolderName);
|
||||
[~, invhess] = compute_posterior_covariance_matrix(bayestopt_.name, fname, dname, options_, outputFolderName);
|
||||
posterior_sampler_options.invhess = invhess;
|
||||
end
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ TotalNumberOfMhDraws = sum(record.MhDraws(:,1));
|
|||
TODROP = floor(options_.mh_drop*TotalNumberOfMhDraws);
|
||||
|
||||
fprintf('marginal density: I''m computing the posterior mean and covariance... ');
|
||||
[posterior_mean, posterior_covariance, posterior_mode, posterior_kernel_at_the_mode] = compute_posterior_covariance_matrix(bayestopt_.name, M_.fname, M_.dname, outputFolderName);
|
||||
[posterior_mean, posterior_covariance, posterior_mode, posterior_kernel_at_the_mode] = compute_posterior_covariance_matrix(bayestopt_.name, M_.fname, M_.dname, options_, outputFolderName);
|
||||
|
||||
MU = transpose(posterior_mean);
|
||||
SIGMA = posterior_covariance;
|
||||
|
|
|
@ -386,7 +386,9 @@ elseif options_.load_mh_file && ~options_.mh_recover
|
|||
record.InitialSeeds = record.LastSeeds;
|
||||
write_mh_history_file(MetropolisFolder, ModelName, record);
|
||||
fprintf('Done.\n')
|
||||
fprintf('%s: Ok. I have loaded %u simulations.\n\n', dispString,NumberOfPreviousSimulations);
|
||||
if ~options_.use_mh_covariance_matrix
|
||||
fprintf('%s: Ok. I have loaded %u simulations.\n\n', dispString,NumberOfPreviousSimulations);
|
||||
end
|
||||
fclose(fidlog);
|
||||
elseif options_.mh_recover
|
||||
% The previous metropolis-hastings crashed before the end! I try to recover the saved draws...
|
||||
|
|
|
@ -12,7 +12,7 @@ function storeGlobalVars(fname,append)
|
|||
% None
|
||||
%
|
||||
%
|
||||
% Copyright © 2009-2017 Dynare Team
|
||||
% Copyright © 2009-2023 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -34,7 +34,7 @@ GlobalNames = who('global');
|
|||
|
||||
for j=1:length(GlobalNames)
|
||||
eval(['global ',GlobalNames{j},';']);
|
||||
fGlobalvar.(GlobalNames{j}) = GlobalNames{j};
|
||||
fGlobalVar.(GlobalNames{j}) = eval(GlobalNames{j});
|
||||
end
|
||||
|
||||
if nargin<2
|
||||
|
|
Loading…
Reference in New Issue