Skip to content
Snippets Groups Projects
Commit 49c4f25a authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Merge branch 'bugs' into 'master'

Two bugfixes for 6.0

See merge request Dynare/dynare!2287
parents 92bb2a58 8b703bb4
Branches
No related tags found
1 merge request!2287Two bugfixes for 6.0
Pipeline #10378 passed
......@@ -300,7 +300,7 @@ if info(1) == 0 %no errors in solution
derivatives_info.no_DLIK = 1;
bounds = prior_bounds(bayestopt_, options_.prior_trunc); %reset bounds as lb and ub must only be operational during mode-finding
%note that for order>1 we do not provide any information on DT,DYss,DOM in derivatives_info, such that dsge_likelihood creates an error. Therefore the computation will be based on simulated_moment_uncertainty for order>1.
[~, info, ~, ~, AHess, ~, ~, M_, options_, ~, oo_.dr] = dsge_likelihood(params', dataset_, dataset_info, options_, M_, estim_params_, bayestopt_, bounds, oo_.dr, oo_.steady_state,oo_.exo_steady_state, oo_.exo_det_steady_state. derivatives_info); %non-used output variables need to be set for octave for some reason
[~, info, ~, ~, AHess, ~, ~, M_, options_, ~, oo_.dr] = dsge_likelihood(params', dataset_, dataset_info, options_, M_, estim_params_, bayestopt_, bounds, oo_.dr, oo_.steady_state,oo_.exo_steady_state, oo_.exo_det_steady_state, derivatives_info); %non-used output variables need to be set for octave for some reason
%note that for the order of parameters in AHess we have: stderr parameters come first, corr parameters second, model parameters third. the order within these blocks corresponds to the order specified in the estimated_params block
options_.analytic_derivation = analytic_derivation; %reset option
AHess = -AHess; %take negative of hessian
......
......@@ -190,7 +190,7 @@ if ~options_.nodecomposition
oo_.variance_decomposition(zero_variance_var_index,:)=NaN;
if ME_present
oo_.variance_decomposition_ME=oo_.variance_decomposition(index_subset,:)...
.*repmat((s2(index_subset)./s2_ME)',1,length(i_exo_var));
.*repmat((s2(index_subset)./s2_ME)',1,M_.exo_nbr);
oo_.variance_decomposition_ME(:,end+1)=var(y_ME_only_filtered)./s2_ME*100;
oo_.variance_decomposition_ME(ismember(observable_pos_requested_vars,intersect(zero_variance_ME_var_index,zero_variance_var_index)),:)=NaN;
oo_.variance_decomposition_ME(ismember(observable_pos_requested_vars,setdiff(zero_variance_var_index,zero_variance_ME_var_index)),1:end-1)=0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment