Remove global options structure from dyntable
parent
849505ec62
commit
9b82c72e4f
|
@ -82,6 +82,7 @@ param_name_tex=[];
|
|||
for jj=1:npar
|
||||
[par_name_temp,par_name_tex_temp]=get_the_name(jj,options_.TeX,M_,estim_params_,options_);
|
||||
param_name = strvcat(param_name,par_name_temp);
|
||||
par_name_tex_temp = strrep(par_name_tex_temp,'$','');
|
||||
param_name_tex = strvcat(param_name_tex,par_name_tex_temp);
|
||||
Draws = GetAllPosteriorDraws(jj,FirstMhFile,FirstLine,TotalNumberOfMhFiles,NumberOfDraws);
|
||||
Draws = reshape(Draws,[NumberOfDraws nblck]);
|
||||
|
@ -101,7 +102,7 @@ for j=1:nblck,
|
|||
end
|
||||
|
||||
lh = size(param_name,2)+2;
|
||||
dyntable(my_title,IFAC_header,param_name,Ifac',lh,12,3);
|
||||
dyntable(options_,my_title,IFAC_header,param_name,Ifac',lh,12,3);
|
||||
skipline()
|
||||
|
||||
if options_.TeX
|
||||
|
@ -173,7 +174,7 @@ if nblck == 1 % Brooks and Gelman tests need more than one block
|
|||
datamat(jj,:)=[results_struct.posteriormean,results_struct.posteriorstd,results_struct.prob_chi2_test];
|
||||
end
|
||||
lh = size(param_name,2)+2;
|
||||
dyntable('',Geweke_header,param_name,datamat,lh,12,3);
|
||||
dyntable(options_,'',Geweke_header,param_name,datamat,lh,12,3);
|
||||
if options_.TeX
|
||||
Geweke_tex_header=char('Parameter', 'Mean', 'Std', 'No\ Taper');
|
||||
additional_header={[' & \multicolumn{2}{c}{Posterior} & \multicolumn{',num2str(1+length(options_.convergence.geweke.taper_steps)),'}{c}{p-values} \\'],
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
function disp_model_summary(M,dr)
|
||||
function disp_model_summary(M,dr,options)
|
||||
|
||||
% function disp_model_summary(M)
|
||||
% displays the model summary
|
||||
|
@ -6,8 +6,9 @@ function disp_model_summary(M,dr)
|
|||
% INPUTS
|
||||
% M [matlab structure] Definition of the model.
|
||||
% dr [matlab structure] Decision rules
|
||||
% options [matlab structure] Options
|
||||
%
|
||||
% Copyright (C) 2001-2012 Dynare Team
|
||||
% Copyright (C) 2001-2016 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -38,5 +39,5 @@ my_title='MATRIX OF COVARIANCE OF EXOGENOUS SHOCKS';
|
|||
labels = deblank(M.exo_names);
|
||||
headers = char('Variables',labels);
|
||||
lh = size(labels,2)+2;
|
||||
dyntable(my_title,headers,labels,M.Sigma_e,lh,10,6);
|
||||
dyntable(options,my_title,headers,labels,M.Sigma_e,lh,10,6);
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ if options_.nomoments == 0
|
|||
|
||||
headers=char('VARIABLE','MEAN','STD. DEV.','VARIANCE','SKEWNESS', ...
|
||||
'KURTOSIS');
|
||||
dyntable(title,headers,labels,z,size(labels,2)+2,16,6);
|
||||
dyntable(options_,title,headers,labels,z,size(labels,2)+2,16,6);
|
||||
if options_.TeX
|
||||
dyn_latex_table(M_,options_,title,'sim_moments',headers,labels_TeX,z,size(labels,2)+2,16,6);
|
||||
end
|
||||
|
@ -88,7 +88,7 @@ if options_.nocorr == 0
|
|||
title=add_filter_subtitle(title,options_);
|
||||
|
||||
headers = char('VARIABLE',M_.endo_names(ivar,:));
|
||||
dyntable(title,headers,labels,corr,size(labels,2)+2,8,4);
|
||||
dyntable(options_,title,headers,labels,corr,size(labels,2)+2,8,4);
|
||||
if options_.TeX
|
||||
headers = char('VARIABLE',M_.endo_names_tex(ivar,:));
|
||||
lh = size(labels,2)+2;
|
||||
|
@ -112,7 +112,7 @@ if ar > 0
|
|||
title = 'AUTOCORRELATION OF SIMULATED VARIABLES';
|
||||
title=add_filter_subtitle(title,options_);
|
||||
headers = char('VARIABLE',int2str([1:ar]'));
|
||||
dyntable(title,headers,labels,autocorr,size(labels,2)+2,8,4);
|
||||
dyntable(options_,title,headers,labels,autocorr,size(labels,2)+2,8,4);
|
||||
if options_.TeX
|
||||
headers = char('VARIABLE',int2str([1:ar]'));
|
||||
lh = size(labels,2)+2;
|
||||
|
@ -159,7 +159,7 @@ if ~options_.nodecomposition
|
|||
headers(M_.exo_names_orig_ord,:) = headers;
|
||||
headers = char(' ',headers);
|
||||
lh = size(deblank(M_.endo_names(ivar,:)),2)+2;
|
||||
dyntable(title,char(headers,'Tot. lin. contr.'),deblank(M_.endo_names(ivar,:)),[oo_.variance_decomposition sum(oo_.variance_decomposition,2)],lh,8,2);
|
||||
dyntable(options_,title,char(headers,'Tot. lin. contr.'),deblank(M_.endo_names(ivar,:)),[oo_.variance_decomposition sum(oo_.variance_decomposition,2)],lh,8,2);
|
||||
if options_.TeX
|
||||
headers=M_.exo_names_tex;
|
||||
headers = char(' ',headers);
|
||||
|
|
|
@ -66,7 +66,7 @@ if size(stationary_vars, 1) > 0
|
|||
headers=char('VARIABLE','MEAN','STD. DEV.','VARIANCE');
|
||||
labels = deblank(M_.endo_names(ivar,:));
|
||||
lh = size(labels,2)+2;
|
||||
dyntable(title,headers,labels,z,lh,11,4);
|
||||
dyntable(options_,title,headers,labels,z,lh,11,4);
|
||||
if options_.TeX
|
||||
labels = deblank(M_.endo_names_tex(ivar,:));
|
||||
lh = size(labels,2)+2;
|
||||
|
@ -85,7 +85,7 @@ if size(stationary_vars, 1) > 0
|
|||
headers(M_.exo_names_orig_ord,:) = headers;
|
||||
headers = char(' ',headers);
|
||||
lh = size(deblank(M_.endo_names(ivar(stationary_vars),:)),2)+2;
|
||||
dyntable(title,headers,deblank(M_.endo_names(ivar(stationary_vars), ...
|
||||
dyntable(options_,title,headers,deblank(M_.endo_names(ivar(stationary_vars), ...
|
||||
:)),100* ...
|
||||
oo_.gamma_y{options_.ar+2}(stationary_vars,:),lh,8,2);
|
||||
if options_.TeX
|
||||
|
@ -138,7 +138,7 @@ if options_.nocorr == 0 && size(stationary_vars, 1) > 0
|
|||
labels = deblank(M_.endo_names(ivar(i1),:));
|
||||
headers = char('Variables',labels);
|
||||
lh = size(labels,2)+2;
|
||||
dyntable(title,headers,labels,corr,lh,8,4);
|
||||
dyntable(options_,title,headers,labels,corr,lh,8,4);
|
||||
if options_.TeX
|
||||
labels = deblank(M_.endo_names_tex(ivar(i1),:));
|
||||
headers=char('Variables',labels);
|
||||
|
@ -164,7 +164,7 @@ if options_.ar > 0 && size(stationary_vars, 1) > 0
|
|||
labels = deblank(M_.endo_names(ivar(i1),:));
|
||||
headers = char('Order ',int2str([1:options_.ar]'));
|
||||
lh = size(labels,2)+2;
|
||||
dyntable(title,headers,labels,z,lh,8,4);
|
||||
dyntable(options_,title,headers,labels,z,lh,8,4);
|
||||
if options_.TeX
|
||||
labels = deblank(M_.endo_names_tex(ivar(i1),:));
|
||||
headers=char('Order ',int2str([1:options_.ar]'));
|
||||
|
|
|
@ -53,7 +53,7 @@ for i=1:length(Steps)
|
|||
headers(M_.exo_names_orig_ord,:) = headers;
|
||||
headers = char(' ',headers);
|
||||
lh = size(deblank(M_.endo_names(SubsetOfVariables,:)),2)+2;
|
||||
dyntable('',headers,...
|
||||
dyntable(options_,'',headers,...
|
||||
deblank(M_.endo_names(SubsetOfVariables,:)),...
|
||||
vardec_i,lh,8,2);
|
||||
if options_.TeX
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
function dyntable(title,headers,labels,values,label_width,val_width,val_precis)
|
||||
function dyntable(options_,title,headers,labels,values,label_width,val_width,val_precis)
|
||||
% function dyntable(title,headers,labels,values,label_width,val_width,val_precis)
|
||||
% Inputs:
|
||||
% options_ [structure] Dynare options structure
|
||||
% title [string] Table title
|
||||
% headers [n by nchar] character array of labels for header row
|
||||
% labels [n by nchar] character array of labels for label column
|
||||
|
@ -27,8 +28,6 @@ function dyntable(title,headers,labels,values,label_width,val_width,val_precis)
|
|||
% You should have received a copy of the GNU General Public License
|
||||
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
global options_
|
||||
|
||||
if options_.noprint
|
||||
return
|
||||
end
|
||||
|
|
|
@ -128,6 +128,6 @@ if nvar > 0 && options_.noprint == 0
|
|||
labels = char(labels,strcat(deblank(M_.exo_names(i,:)),'(-1)'));
|
||||
end
|
||||
lh = size(labels,2)+2;
|
||||
dyntable(my_title,headers,labels,res_table,lh,10,6);
|
||||
dyntable(options_,my_title,headers,labels,res_table,lh,10,6);
|
||||
skipline()
|
||||
end
|
||||
|
|
|
@ -153,7 +153,7 @@ if options_.nomoments == 0
|
|||
z = [ sqrt(diagCovYR0(ivar)) diagCovYR0(ivar) ];
|
||||
title='THEORETICAL MOMENTS';
|
||||
headers=char('VARIABLE','STD. DEV.','VARIANCE');
|
||||
dyntable(title,headers,labels,z,size(labels,2)+2,16,10);
|
||||
dyntable(options_,title,headers,labels,z,size(labels,2)+2,16,10);
|
||||
end
|
||||
if options_.nocorr == 0
|
||||
diagSqrtCovYR0=sqrt(diagCovYR0);
|
||||
|
@ -161,7 +161,7 @@ if options_.nocorr == 0
|
|||
COR_Y= DELTA*COV_YR0*DELTA;
|
||||
title = 'MATRIX OF CORRELATION';
|
||||
headers = char('VARIABLE',M_.endo_names(ivar,:));
|
||||
dyntable(title,headers,labels,COR_Y(ivar,ivar),size(labels,2)+2,8,4);
|
||||
dyntable(options_,title,headers,labels,COR_Y(ivar,ivar),size(labels,2)+2,8,4);
|
||||
else
|
||||
COR_Y=[];
|
||||
end
|
||||
|
@ -180,7 +180,7 @@ if ar > 0
|
|||
end
|
||||
title = 'COEFFICIENTS OF AUTOCORRELATION';
|
||||
headers = char('VARIABLE',int2str([1:ar]'));
|
||||
dyntable(title,headers,labels,AutoCOR_YRk(ivar,:),size(labels,2)+2,8,4);
|
||||
dyntable(options_,title,headers,labels,AutoCOR_YRk(ivar,:),size(labels,2)+2,8,4);
|
||||
else
|
||||
AutoCOR_YRk=[];
|
||||
end
|
||||
|
|
|
@ -108,7 +108,7 @@ if ~options_.noprint
|
|||
labels = deblank(M_.exo_names);
|
||||
headers = char('Variables',labels);
|
||||
lh = size(labels,2)+2;
|
||||
dyntable(my_title,headers,labels,M_.Sigma_e,lh,10,6);
|
||||
dyntable(options_,my_title,headers,labels,M_.Sigma_e,lh,10,6);
|
||||
if options_.TeX
|
||||
labels = deblank(M_.exo_names_tex);
|
||||
headers = char('Variables',labels);
|
||||
|
|
|
@ -81,7 +81,7 @@ end;
|
|||
varobs gp_obs gy_obs;
|
||||
|
||||
options_.solve_tolf = 1e-12;
|
||||
|
||||
options_.TeX=1;
|
||||
estimation(order=1,datafile=fsdat_simul,nobs=192,loglinear,mh_replic=2000,mh_nblocks=1,mh_jscale=0.8);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue