Moments_varendo load_mh_file

Dear Dynare developers,
I have estimated a large model and then I want to compute moments for a number of variables. In the estimation command I write load_mh_file and then moments_varendo. However, the matrices in oo_.PosteriorTheoreticalMoments.dsge do not change even if I add additional variables after the estimation command.
Apparently the only solution is to estimate the model again so to have the results for the theoretical moments.
Since the estimation takes quite a few days, I am wondering whether there exists a fastest way to compute theoretical moments.
Your help is greatly appreciated.
Thanks,
Ste

This is a bug , see Allow recomputing moments for different var_list_ using load_mh_file (!1814) · Merge Requests · Dynare / dynare · GitLab

You can put

                if options_.load_mh_file && options_.mh_replic==0 %user wants to recompute results
                   [MetropolisFolder, info] = CheckPath('metropolis',M_.dname);
                   if ~info
                       generic_post_data_file_name={'Posterior2ndOrderMoments','decomposition','PosteriorVarianceDecomposition','correlation','PosteriorCorrelations','conditional decomposition','PosteriorConditionalVarianceDecomposition'};
                       for ii=1:length(generic_post_data_file_name)
                           delete_stale_file([MetropolisFolder filesep M_.fname '_' generic_post_data_file_name{1,ii} '*']);
                       end
                   end
                end

into dynare_estimation_1.m before the call to

                oo_ = compute_moments_varendo('posterior',options_,M_,oo_,var_list_);

Alternatively, delete those file manually.

Dear Johannes Pfeifer,
it works! Thank you very much.
Ste