parent
5ca4204806
commit
59cbee2b56
|
@ -63,6 +63,13 @@ else
|
|||
Steps = 0;
|
||||
end
|
||||
|
||||
if options_.TeX
|
||||
var_list_tex='';
|
||||
for var_iter=1:size(var_list_,1)
|
||||
var_list_tex=strvcat(var_list_tex,M_.endo_names_tex(strmatch(var_list_(var_iter,:),M_.endo_names,'exact'),:));
|
||||
end
|
||||
end
|
||||
|
||||
% COVARIANCE MATRIX.
|
||||
if posterior
|
||||
for i=1:NumberOfEndogenousVariables
|
||||
|
@ -98,35 +105,77 @@ end
|
|||
% VARIANCE DECOMPOSITION.
|
||||
if M_.exo_nbr > 1
|
||||
if ~NoDecomposition
|
||||
temp=NaN(NumberOfEndogenousVariables,NumberOfExogenousVariables);
|
||||
if posterior
|
||||
for i=1:NumberOfEndogenousVariables
|
||||
for j=1:NumberOfExogenousVariables
|
||||
oo_ = posterior_analysis('decomposition',var_list_(i,:),M_.exo_names(j,:),[],options_,M_,oo_);
|
||||
temp(i,j)=oo_.PosteriorTheoreticalMoments.dsge.VarianceDecomposition.Mean.(deblank(var_list_(i,:))).(deblank(M_.exo_names(j,:)));
|
||||
end
|
||||
end
|
||||
title='Posterior mean variance decomposition (in percent)';
|
||||
else
|
||||
for i=1:NumberOfEndogenousVariables
|
||||
for j=1:NumberOfExogenousVariables
|
||||
oo_ = prior_analysis('decomposition',var_list_(i,:),M_.exo_names(j,:),[],options_,M_,oo_);
|
||||
temp(i,j)=oo_.PriorTheoreticalMoments.dsge.VarianceDecomposition.Mean.(deblank(var_list_(i,:))).(deblank(M_.exo_names(j,:)));
|
||||
end
|
||||
end
|
||||
title='Prior mean variance decomposition (in percent)';
|
||||
end
|
||||
title=add_filter_subtitle(title,options_);
|
||||
headers = M_.exo_names;
|
||||
headers(M_.exo_names_orig_ord,:) = headers;
|
||||
headers = char(' ',headers);
|
||||
lh = size(deblank(var_list_),2)+2;
|
||||
dyntable(options_,title,headers,deblank(var_list_),100* ...
|
||||
temp,lh,8,2);
|
||||
if options_.TeX
|
||||
headers=M_.exo_names_tex;
|
||||
headers = char(' ',headers);
|
||||
labels = deblank(var_list_tex);
|
||||
lh = size(labels,2)+2;
|
||||
dyn_latex_table(M_,options_,title,'dsge_post_mean_var_decomp_uncond',headers,labels,100*temp,lh,8,2);
|
||||
end
|
||||
skipline();
|
||||
end
|
||||
% CONDITIONAL VARIANCE DECOMPOSITION.
|
||||
if Steps
|
||||
temp=NaN(NumberOfEndogenousVariables,NumberOfExogenousVariables,length(Steps));
|
||||
if posterior
|
||||
for i=1:NumberOfEndogenousVariables
|
||||
for j=1:NumberOfExogenousVariables
|
||||
oo_ = posterior_analysis('conditional decomposition',i,M_.exo_names(j,:),Steps,options_,M_,oo_);
|
||||
temp(i,j,:)=oo_.PosteriorTheoreticalMoments.dsge.ConditionalVarianceDecomposition.Mean.(deblank(var_list_(i,:))).(deblank(M_.exo_names(j,:)));
|
||||
end
|
||||
end
|
||||
title='Posterior mean conditional variance decomposition (in percent)';
|
||||
else
|
||||
for i=1:NumberOfEndogenousVariables
|
||||
for j=1:NumberOfExogenousVariables
|
||||
oo_ = prior_analysis('conditional decomposition',var_list_(i,:),M_.exo_names(j,:),Steps,options_,M_,oo_);
|
||||
temp(i,j,:)=oo_.PriorTheoreticalMoments.dsge.ConditionalVarianceDecomposition.Mean.(deblank(var_list_(i,:))).(deblank(M_.exo_names(j,:)));
|
||||
end
|
||||
end
|
||||
title='Prior mean conditional variance decomposition (in percent)';
|
||||
end
|
||||
for step_iter=1:length(Steps)
|
||||
title_print=[title, ' Period ' int2str(Steps(step_iter))];
|
||||
headers = M_.exo_names;
|
||||
headers(M_.exo_names_orig_ord,:) = headers;
|
||||
headers = char(' ',headers);
|
||||
lh = size(deblank(var_list_),2)+2;
|
||||
dyntable(options_,title_print,headers,deblank(var_list_),100* ...
|
||||
temp(:,:,step_iter),lh,8,2);
|
||||
if options_.TeX
|
||||
headers=M_.exo_names_tex;
|
||||
headers = char(' ',headers);
|
||||
labels = deblank(var_list_tex);
|
||||
lh = size(labels,2)+2;
|
||||
dyn_latex_table(M_,options_,title_print,['dsge_post_mean_var_decomp_cond_h',int2str(Steps(step_iter))],headers,labels,100*temp(:,:,step_iter),lh,8,2);
|
||||
end
|
||||
end
|
||||
skipline();
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@ stderr gy_obs, inv_gamma_pdf, 0.001, inf;
|
|||
corr gp_obs, gy_obs,normal_pdf, 0, 0.2;
|
||||
end;
|
||||
|
||||
estimation(mode_compute=9,order=1,datafile='../fs2000/fsdat_simul',mode_check,smoother,filter_decomposition,mh_replic=4000, mh_nblocks=1, mh_jscale=0.8,forecast = 8,bayesian_irf,filtered_vars,filter_step_ahead=[1,3],irf=20,moments_varendo,contemporaneous_correlation) m P c e W R k d y;
|
||||
estimation(mode_compute=9,order=1,datafile='../fs2000/fsdat_simul',mode_check,smoother,filter_decomposition,mh_replic=4000, mh_nblocks=1, mh_jscale=0.8,forecast = 8,bayesian_irf,filtered_vars,filter_step_ahead=[1,3],irf=20,moments_varendo,contemporaneous_correlation,conditional_variance_decomposition=[1 2 4]) m P c e W R k d y;
|
||||
|
||||
trace_plot(options_,M_,estim_params_,'PosteriorDensity',1);
|
||||
trace_plot(options_,M_,estim_params_,'StructuralShock',1,'eps_a')
|
||||
|
|
Loading…
Reference in New Issue