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

Merge branch 'identification' into 'master'

:bug: fix identification bugs

See merge request !2333
parents 45ddbafc 42c3b530
No related branches found
No related tags found
1 merge request!2333:bug: fix identification bugs
Pipeline #11282 failed
...@@ -297,6 +297,15 @@ if info(1) == 0 %no errors in solution ...@@ -297,6 +297,15 @@ if info(1) == 0 %no errors in solution
options_.analytic_derivation = -2; %this sets asy_Hess=1 in dsge_likelihood.m options_.analytic_derivation = -2; %this sets asy_Hess=1 in dsge_likelihood.m
[info, oo_, options_, M_] = stoch_simul(M_, options_, oo_, options_.varobs); [info, oo_, options_, M_] = stoch_simul(M_, options_, oo_, options_.varobs);
dataset_ = dseries(oo_.endo_simul(options_.varobs_id,100+1:end)',dates('1Q1'), options_.varobs); %get information on moments dataset_ = dseries(oo_.endo_simul(options_.varobs_id,100+1:end)',dates('1Q1'), options_.varobs); %get information on moments
% set info on missing data
if dataset_info.missing.state
[dataset_info.missing.aindex, dataset_info.missing.number_of_observations, dataset_info.missing.no_more_missing_observations, dataset_info.missing.vindex] = ...
describe_missing_data(dataset_.data);
else
dataset_info.missing.aindex = num2cell(transpose(repmat(1:dataset_.vobs,dataset_.nobs,1)),1);
dataset_info.missing.no_more_missing_observations = 1;
end
derivatives_info.no_DLIK = 1; 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 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. %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.
......
...@@ -485,7 +485,7 @@ if iload <=0 ...@@ -485,7 +485,7 @@ if iload <=0
kk=0; kk=0;
while kk<50 && info(1) while kk<50 && info(1)
kk=kk+1; kk=kk+1;
params = Prior.draw(); params = Prior.draw()'; %column vector is expected
options_ident.tittxt = 'Random_prior_params'; %title text for graphs and figures options_ident.tittxt = 'Random_prior_params'; %title text for graphs and figures
% perform identification analysis % perform identification analysis
[ide_moments_point, ide_spectrum_point, ide_minimal_point, ide_hess_point, ide_reducedform_point, ide_dynamic_point, ~, info, error_indicator_point] = ... [ide_moments_point, ide_spectrum_point, ide_minimal_point, ide_hess_point, ide_reducedform_point, ide_dynamic_point, ~, info, error_indicator_point] = ...
...@@ -504,7 +504,10 @@ if iload <=0 ...@@ -504,7 +504,10 @@ if iload <=0
else else
% found a (random) point that solves the model % found a (random) point that solves the model
fprintf('Found a random draw from the priors that solves the model:\n'); fprintf('Found a random draw from the priors that solves the model:\n');
disp(params); labels = name;
headers = {'Name', 'Value'};
lh = cellofchararraymaxlength(labels)+2;
dyntable(options_, 'Feasible draw', headers, labels, params', lh, 10, 6);
fprintf('Identification now continues for this draw.'); fprintf('Identification now continues for this draw.');
parameters = 'Random_prior_params'; parameters = 'Random_prior_params';
parameters_TeX = 'Random prior parameter draw'; parameters_TeX = 'Random prior parameter draw';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment