Commit f1406487 authored by Johannes Pfeifer's avatar Johannes Pfeifer
Browse files

Make field names consistent with different analysis steps and manual

still related to #316 (https://github.com/DynareTeam/dynare/pull/316)
parent 4c8f3a89
...@@ -46,7 +46,7 @@ if isfield(oo_, [ TYPE 'TheoreticalMoments' ]) ...@@ -46,7 +46,7 @@ if isfield(oo_, [ TYPE 'TheoreticalMoments' ])
if isfield(temporary_structure,'dsge') if isfield(temporary_structure,'dsge')
eval(['temporary_structure = oo_.' TYPE 'TheoreticalMoments.dsge;']) eval(['temporary_structure = oo_.' TYPE 'TheoreticalMoments.dsge;'])
if isfield(temporary_structure,'ConditionalVarianceDecomposition') if isfield(temporary_structure,'ConditionalVarianceDecomposition')
eval(['temporary_structure = oo_.' TYPE 'TheoreticalMoments.dsge.ConditionalVarianceDecomposition.mean;']) eval(['temporary_structure = oo_.' TYPE 'TheoreticalMoments.dsge.ConditionalVarianceDecomposition.Mean;'])
if isfield(temporary_structure,name) if isfield(temporary_structure,name)
if sum(Steps-temporary_structure.(name)(1,:)) == 0 if sum(Steps-temporary_structure.(name)(1,:)) == 0
% Nothing (new) to do here... % Nothing (new) to do here...
...@@ -85,11 +85,11 @@ for i=1:length(Steps) ...@@ -85,11 +85,11 @@ for i=1:length(Steps)
p_hpdsup(i) = hpd_interval(2); p_hpdsup(i) = hpd_interval(2);
p_density(:,:,i) = pp_density; p_density(:,:,i) = pp_density;
end end
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.ConditionalVarianceDecomposition.steps = Steps;']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.ConditionalVarianceDecomposition.Steps = Steps;']);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.ConditionalVarianceDecomposition.mean.' name ' = p_mean;']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.ConditionalVarianceDecomposition.Mean.' name ' = p_mean;']);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.ConditionalVarianceDecomposition.median.' name ' = p_median;']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.ConditionalVarianceDecomposition.Median.' name ' = p_median;']);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.ConditionalVarianceDecomposition.variance.' name ' = p_variance;']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.ConditionalVarianceDecomposition.Variance.' name ' = p_variance;']);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.ConditionalVarianceDecomposition.hpdinf.' name ' = p_hpdinf;']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.ConditionalVarianceDecomposition.HPDinf.' name ' = p_hpdinf;']);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.ConditionalVarianceDecomposition.hpdsup.' name ' = p_hpdsup;']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.ConditionalVarianceDecomposition.HPDsup.' name ' = p_hpdsup;']);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.ConditionalVarianceDecomposition.deciles.' name ' = p_deciles;']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.ConditionalVarianceDecomposition.deciles.' name ' = p_deciles;']);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.ConditionalVarianceDecomposition.density.' name ' = p_density;']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.ConditionalVarianceDecomposition.density.' name ' = p_density;']);
\ No newline at end of file
...@@ -48,9 +48,9 @@ if isfield(oo_,[TYPE 'TheoreticalMoments']) ...@@ -48,9 +48,9 @@ if isfield(oo_,[TYPE 'TheoreticalMoments'])
if isfield(temporary_structure,'dsge') if isfield(temporary_structure,'dsge')
eval(['temporary_structure = oo_.' TYPE 'TheoreticalMoments.dsge;']) eval(['temporary_structure = oo_.' TYPE 'TheoreticalMoments.dsge;'])
if isfield(temporary_structure,'correlation') if isfield(temporary_structure,'correlation')
eval(['temporary_structure = oo_.' TYPE 'TheoreticalMoments.dsge.correlation.mean;']) eval(['temporary_structure = oo_.' TYPE 'TheoreticalMoments.dsge.correlation.Mean;'])
if isfield(temporary_structure,var1) if isfield(temporary_structure,var1)
eval(['temporary_structure_1 = oo_.' TYPE 'TheoreticalMoments.dsge.correlation.mean.' var1 ';']) eval(['temporary_structure_1 = oo_.' TYPE 'TheoreticalMoments.dsge.correlation.Mean.' var1 ';'])
if isfield(temporary_structure_1,var2) if isfield(temporary_structure_1,var2)
eval(['temporary_structure_2 = temporary_structure_1.' var2 ';']) eval(['temporary_structure_2 = temporary_structure_1.' var2 ';'])
l1 = length(temporary_structure_2); l1 = length(temporary_structure_2);
...@@ -98,11 +98,11 @@ if ~isconst(tmp) ...@@ -98,11 +98,11 @@ if ~isconst(tmp)
if isfield(temporary_structure,'dsge') if isfield(temporary_structure,'dsge')
eval(['temporary_structure = oo_.' TYPE 'TheoreticalMoments.dsge;']) eval(['temporary_structure = oo_.' TYPE 'TheoreticalMoments.dsge;'])
if isfield(temporary_structure,'correlation') if isfield(temporary_structure,'correlation')
oo_ = fill_output_structure(var1,var2,TYPE,oo_,'mean',nar,p_mean); oo_ = fill_output_structure(var1,var2,TYPE,oo_,'Mean',nar,p_mean);
oo_ = fill_output_structure(var1,var2,TYPE,oo_,'median',nar,p_median); oo_ = fill_output_structure(var1,var2,TYPE,oo_,'Median',nar,p_median);
oo_ = fill_output_structure(var1,var2,TYPE,oo_,'variance',nar,p_var); oo_ = fill_output_structure(var1,var2,TYPE,oo_,'Variance',nar,p_var);
oo_ = fill_output_structure(var1,var2,TYPE,oo_,'hpdinf',nar,hpd_interval(1)); oo_ = fill_output_structure(var1,var2,TYPE,oo_,'HPDinf',nar,hpd_interval(1));
oo_ = fill_output_structure(var1,var2,TYPE,oo_,'hpdsup',nar,hpd_interval(2)); oo_ = fill_output_structure(var1,var2,TYPE,oo_,'HPDsup',nar,hpd_interval(2));
oo_ = fill_output_structure(var1,var2,TYPE,oo_,'deciles',nar,p_deciles); oo_ = fill_output_structure(var1,var2,TYPE,oo_,'deciles',nar,p_deciles);
oo_ = fill_output_structure(var1,var2,TYPE,oo_,'density',nar,density); oo_ = fill_output_structure(var1,var2,TYPE,oo_,'density',nar,density);
end end
...@@ -114,11 +114,11 @@ else ...@@ -114,11 +114,11 @@ else
if isfield(temporary_structure,'dsge') if isfield(temporary_structure,'dsge')
eval(['temporary_structure = oo_.' TYPE 'TheoreticalMoments.dsge;']) eval(['temporary_structure = oo_.' TYPE 'TheoreticalMoments.dsge;'])
if isfield(temporary_structure,'correlation') if isfield(temporary_structure,'correlation')
oo_ = fill_output_structure(var1,var2,TYPE,oo_,'mean',nar,NaN); oo_ = fill_output_structure(var1,var2,TYPE,oo_,'Mean',nar,NaN);
oo_ = fill_output_structure(var1,var2,TYPE,oo_,'median',nar,NaN); oo_ = fill_output_structure(var1,var2,TYPE,oo_,'Median',nar,NaN);
oo_ = fill_output_structure(var1,var2,TYPE,oo_,'variance',nar,NaN); oo_ = fill_output_structure(var1,var2,TYPE,oo_,'Nariance',nar,NaN);
oo_ = fill_output_structure(var1,var2,TYPE,oo_,'hpdinf',nar,NaN); oo_ = fill_output_structure(var1,var2,TYPE,oo_,'HPDinf',nar,NaN);
oo_ = fill_output_structure(var1,var2,TYPE,oo_,'hpdsup',nar,NaN); oo_ = fill_output_structure(var1,var2,TYPE,oo_,'HPDsup',nar,NaN);
oo_ = fill_output_structure(var1,var2,TYPE,oo_,'deciles',nar,NaN); oo_ = fill_output_structure(var1,var2,TYPE,oo_,'deciles',nar,NaN);
oo_ = fill_output_structure(var1,var2,TYPE,oo_,'density',nar,NaN); oo_ = fill_output_structure(var1,var2,TYPE,oo_,'density',nar,NaN);
end end
...@@ -128,11 +128,11 @@ end ...@@ -128,11 +128,11 @@ end
function oo_ = initialize_output_structure(var1,var2,nar,type,oo_) function oo_ = initialize_output_structure(var1,var2,nar,type,oo_)
name = [ var1 '.' var2 ]; name = [ var1 '.' var2 ];
eval(['oo_.' type 'TheoreticalMoments.dsge.correlation.mean.' name ' = NaN(' int2str(nar) ',1);']); eval(['oo_.' type 'TheoreticalMoments.dsge.correlation.Mean.' name ' = NaN(' int2str(nar) ',1);']);
eval(['oo_.' type 'TheoreticalMoments.dsge.correlation.median.' name ' = NaN(' int2str(nar) ',1);']); eval(['oo_.' type 'TheoreticalMoments.dsge.correlation.Median.' name ' = NaN(' int2str(nar) ',1);']);
eval(['oo_.' type 'TheoreticalMoments.dsge.correlation.variance.' name ' = NaN(' int2str(nar) ',1);']); eval(['oo_.' type 'TheoreticalMoments.dsge.correlation.Variance.' name ' = NaN(' int2str(nar) ',1);']);
eval(['oo_.' type 'TheoreticalMoments.dsge.correlation.hpdinf.' name ' = NaN(' int2str(nar) ',1);']); eval(['oo_.' type 'TheoreticalMoments.dsge.correlation.HPDinf.' name ' = NaN(' int2str(nar) ',1);']);
eval(['oo_.' type 'TheoreticalMoments.dsge.correlation.hpdsup.' name ' = NaN(' int2str(nar) ',1);']); eval(['oo_.' type 'TheoreticalMoments.dsge.correlation.HPDsup.' name ' = NaN(' int2str(nar) ',1);']);
eval(['oo_.' type 'TheoreticalMoments.dsge.correlation.deciles.' name ' = cell(' int2str(nar) ',1);']); eval(['oo_.' type 'TheoreticalMoments.dsge.correlation.deciles.' name ' = cell(' int2str(nar) ',1);']);
eval(['oo_.' type 'TheoreticalMoments.dsge.correlation.density.' name ' = cell(' int2str(nar) ',1);']); eval(['oo_.' type 'TheoreticalMoments.dsge.correlation.density.' name ' = cell(' int2str(nar) ',1);']);
for i=1:nar for i=1:nar
...@@ -143,7 +143,7 @@ end ...@@ -143,7 +143,7 @@ end
function oo_ = fill_output_structure(var1,var2,type,oo_,moment,lag,result) function oo_ = fill_output_structure(var1,var2,type,oo_,moment,lag,result)
name = [ var1 '.' var2 ]; name = [ var1 '.' var2 ];
switch moment switch moment
case {'mean','median','variance','hpdinf','hpdsup'} case {'Mean','Median','Variance','HPDinf','HPDsup'}
eval(['oo_.' type 'TheoreticalMoments.dsge.correlation.' moment '.' name '(' int2str(lag) ',1) = result;']); eval(['oo_.' type 'TheoreticalMoments.dsge.correlation.' moment '.' name '(' int2str(lag) ',1) = result;']);
case {'deciles','density'} case {'deciles','density'}
eval(['oo_.' type 'TheoreticalMoments.dsge.correlation.' moment '.' name '(' int2str(lag) ',1) = {result};']); eval(['oo_.' type 'TheoreticalMoments.dsge.correlation.' moment '.' name '(' int2str(lag) ',1) = {result};']);
......
...@@ -48,16 +48,16 @@ if isfield(oo_,[ TYPE 'TheoreticalMoments']) ...@@ -48,16 +48,16 @@ if isfield(oo_,[ TYPE 'TheoreticalMoments'])
if isfield(temporary_structure,'dsge') if isfield(temporary_structure,'dsge')
eval(['temporary_structure = oo_.' TYPE 'TheoreticalMoments.dsge;']) eval(['temporary_structure = oo_.' TYPE 'TheoreticalMoments.dsge;'])
if isfield(temporary_structure,'covariance') if isfield(temporary_structure,'covariance')
eval(['temporary_structure = oo_.' TYPE 'TheoreticalMoments.dsge.covariance.mean;']) eval(['temporary_structure = oo_.' TYPE 'TheoreticalMoments.dsge.covariance.Mean;'])
if isfield(temporary_structure,var1) if isfield(temporary_structure,var1)
eval(['temporary_structure_1 = oo_.' TYPE 'TheoreticalMoments.dsge.covariance.mean.' var1 ';']) eval(['temporary_structure_1 = oo_.' TYPE 'TheoreticalMoments.dsge.covariance.Mean.' var1 ';'])
if isfield(temporary_structure_1,var2) if isfield(temporary_structure_1,var2)
% Nothing to do (the covariance matrix is symmetric!). % Nothing to do (the covariance matrix is symmetric!).
return return
end end
else else
if isfield(temporary_structure,var2) if isfield(temporary_structure,var2)
eval(['temporary_structure_2 = oo_.' TYPE 'TheoreticalMoments.dsge.covariance.mean.' var2 ';']) eval(['temporary_structure_2 = oo_.' TYPE 'TheoreticalMoments.dsge.covariance.Mean.' var2 ';'])
if isfield(temporary_structure_2,var1) if isfield(temporary_structure_2,var1)
% Nothing to do (the covariance matrix is symmetric!). % Nothing to do (the covariance matrix is symmetric!).
return return
...@@ -80,19 +80,19 @@ name = [var1 '.' var2]; ...@@ -80,19 +80,19 @@ name = [var1 '.' var2];
if ~isconst(tmp) if ~isconst(tmp)
[p_mean, p_median, p_var, hpd_interval, p_deciles, density] = ... [p_mean, p_median, p_var, hpd_interval, p_deciles, density] = ...
posterior_moments(tmp,1,mh_conf_sig); posterior_moments(tmp,1,mh_conf_sig);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.mean.' name ' = p_mean;']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.Mean.' name ' = p_mean;']);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.median.' name ' = p_median;']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.Median.' name ' = p_median;']);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.variance.' name ' = p_var;']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.Variance.' name ' = p_var;']);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.hpdinf.' name ' = hpd_interval(1);']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.HPDinf.' name ' = hpd_interval(1);']);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.hpdsup.' name ' = hpd_interval(2);']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.HPDsup.' name ' = hpd_interval(2);']);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.deciles.' name ' = p_deciles;']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.deciles.' name ' = p_deciles;']);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.density.' name ' = density;']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.density.' name ' = density;']);
else else
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.mean.' name ' = NaN;']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.Mean.' name ' = NaN;']);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.median.' name ' = NaN;']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.Median.' name ' = NaN;']);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.variance.' name ' = NaN;']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.Variance.' name ' = NaN;']);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.hpdinf.' name ' = NaN;']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.HPDinf.' name ' = NaN;']);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.hpdsup.' name ' = NaN;']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.HPDsup.' name ' = NaN;']);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.deciles.' name ' = NaN;']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.deciles.' name ' = NaN;']);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.density.' name ' = NaN;']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.covariance.density.' name ' = NaN;']);
end end
\ No newline at end of file
...@@ -131,7 +131,7 @@ clear('priordens') ...@@ -131,7 +131,7 @@ clear('priordens')
oo.Smoother.SteadyState = ys; oo.Smoother.SteadyState = ys;
oo.Smoother.TrendCoeffs = trend_coeff; oo.Smoother.TrendCoeffs = trend_coeff;
if options_.filter_covariance if options_.filter_covariance
oo.Smoother.variance = P; oo.Smoother.Variance = P;
end end
i_endo = bayestopt_.smoother_saved_var_list; i_endo = bayestopt_.smoother_saved_var_list;
if options_.nk ~= 0 if options_.nk ~= 0
......
...@@ -146,7 +146,7 @@ dynare_graph_close; ...@@ -146,7 +146,7 @@ dynare_graph_close;
% saving results % saving results
save_results(yf_mean,'oo_.forecast.mean.',var_list); save_results(yf_mean,'oo_.forecast.Mean.',var_list);
save_results(yf1(:,:,k1(1)),'oo_.forecast.HPDinf.',var_list); save_results(yf1(:,:,k1(1)),'oo_.forecast.HPDinf.',var_list);
save_results(yf1(:,:,k1(2)),'oo_.forecast.HPDsup.',var_list); save_results(yf1(:,:,k1(2)),'oo_.forecast.HPDsup.',var_list);
save_results(yf2(:,:,k2(1)),'oo_.forecast.HPDTotalinf.',var_list); save_results(yf2(:,:,k2(1)),'oo_.forecast.HPDTotalinf.',var_list);
......
...@@ -203,7 +203,7 @@ forecasts.controled_variables = constrained_vars; ...@@ -203,7 +203,7 @@ forecasts.controled_variables = constrained_vars;
forecasts.instruments = options_cond_fcst.controlled_varexo; forecasts.instruments = options_cond_fcst.controlled_varexo;
for i = 1:EndoSize for i = 1:EndoSize
eval(['forecasts.cond.mean.' deblank(M_.endo_names(oo_.dr.order_var(i),:)) ' = mFORCS1(i,:)'';']); eval(['forecasts.cond.Mean.' deblank(M_.endo_names(oo_.dr.order_var(i),:)) ' = mFORCS1(i,:)'';']);
tmp = sort(squeeze(FORCS1(i,:,:))'); tmp = sort(squeeze(FORCS1(i,:,:))');
eval(['forecasts.cond.ci.' deblank(M_.endo_names(oo_.dr.order_var(i),:)) ... eval(['forecasts.cond.ci.' deblank(M_.endo_names(oo_.dr.order_var(i),:)) ...
' = [tmp(t1,:)'' ,tmp(t2,:)'' ]'';']); ' = [tmp(t1,:)'' ,tmp(t2,:)'' ]'';']);
...@@ -227,7 +227,7 @@ end ...@@ -227,7 +227,7 @@ end
mFORCS2 = mean(FORCS2,3); mFORCS2 = mean(FORCS2,3);
for i = 1:EndoSize for i = 1:EndoSize
eval(['forecasts.uncond.mean.' deblank(M_.endo_names(oo_.dr.order_var(i),:)) ' = mFORCS2(i,:)'';']); eval(['forecasts.uncond.Mean.' deblank(M_.endo_names(oo_.dr.order_var(i),:)) ' = mFORCS2(i,:)'';']);
tmp = sort(squeeze(FORCS2(i,:,:))'); tmp = sort(squeeze(FORCS2(i,:,:))');
eval(['forecasts.uncond.ci.' deblank(M_.endo_names(oo_.dr.order_var(i),:)) ... eval(['forecasts.uncond.ci.' deblank(M_.endo_names(oo_.dr.order_var(i),:)) ...
' = [tmp(t1,:)'' ,tmp(t2,:)'' ]'';']); ' = [tmp(t1,:)'' ,tmp(t2,:)'' ]'';']);
......
...@@ -35,14 +35,14 @@ end ...@@ -35,14 +35,14 @@ end
load conditional_forecasts; load conditional_forecasts;
if nargin==1 || isempty(periods) % Set default number of periods. if nargin==1 || isempty(periods) % Set default number of periods.
eval(['periods = length(forecasts.cond.mean.' Variables(1,:) ');']); eval(['periods = length(forecasts.cond.Mean.' Variables(1,:) ');']);
end end
for i=1:size(Variables,1) for i=1:size(Variables,1)
eval(['ci1 = forecasts.cond.ci.' Variables(i,:) ';']) eval(['ci1 = forecasts.cond.ci.' Variables(i,:) ';'])
eval(['m1 = forecasts.cond.mean.' Variables(i,:) ';']) eval(['m1 = forecasts.cond.Mean.' Variables(i,:) ';'])
eval(['ci2 = forecasts.uncond.ci.' Variables(i,:) ';']) eval(['ci2 = forecasts.uncond.ci.' Variables(i,:) ';'])
eval(['m2 = forecasts.uncond.mean.' Variables(i,:) ';']) eval(['m2 = forecasts.uncond.Mean.' Variables(i,:) ';'])
build_figure(Variables(i,:),ci1(:,1:periods),ci2(:,1:periods),m1(1:periods),m2(1:periods),options_); build_figure(Variables(i,:),ci1(:,1:periods),ci2(:,1:periods),m1(1:periods),m2(1:periods),options_);
end end
......
...@@ -44,7 +44,7 @@ if isfield(oo_, [ TYPE 'TheoreticalMoments']) ...@@ -44,7 +44,7 @@ if isfield(oo_, [ TYPE 'TheoreticalMoments'])
if isfield(temporary_structure,'dsge') if isfield(temporary_structure,'dsge')
eval(['temporary_structure = oo_.' TYPE 'TheoreticalMoments.dsge;']) eval(['temporary_structure = oo_.' TYPE 'TheoreticalMoments.dsge;'])
if isfield(temporary_structure,'VarianceDecomposition') if isfield(temporary_structure,'VarianceDecomposition')
eval(['temporary_structure = oo_.' TYPE 'TheoreticalMoments.dsge.VarianceDecomposition.mean;']) eval(['temporary_structure = oo_.' TYPE 'TheoreticalMoments.dsge.VarianceDecomposition.Mean;'])
if isfield(temporary_structure,name) if isfield(temporary_structure,name)
% Nothing to do. % Nothing to do.
return return
...@@ -82,10 +82,10 @@ else ...@@ -82,10 +82,10 @@ else
[p_mean, p_median, p_var, hpd_interval, p_deciles, density] = ... [p_mean, p_median, p_var, hpd_interval, p_deciles, density] = ...
posterior_moments(tmp,1,mh_conf_sig); posterior_moments(tmp,1,mh_conf_sig);
end end
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.VarianceDecomposition.mean.' name ' = p_mean;']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.VarianceDecomposition.Mean.' name ' = p_mean;']);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.VarianceDecomposition.median.' name ' = p_median;']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.VarianceDecomposition.Median.' name ' = p_median;']);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.VarianceDecomposition.variance.' name ' = p_var;']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.VarianceDecomposition.Variance.' name ' = p_var;']);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.VarianceDecomposition.hpdinf.' name ' = hpd_interval(1);']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.VarianceDecomposition.HPDinf.' name ' = hpd_interval(1);']);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.VarianceDecomposition.hpdsup.' name ' = hpd_interval(2);']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.VarianceDecomposition.HPDsup.' name ' = hpd_interval(2);']);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.VarianceDecomposition.deciles.' name ' = p_deciles;']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.VarianceDecomposition.deciles.' name ' = p_deciles;']);
eval(['oo_.' TYPE 'TheoreticalMoments.dsge.VarianceDecomposition.density.' name ' = density;']); eval(['oo_.' TYPE 'TheoreticalMoments.dsge.VarianceDecomposition.density.' name ' = density;']);
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment