Commit 88e17012 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Removed useless commas and semicolons.

parent 9285a80a
......@@ -39,7 +39,7 @@ function [AHess, DLIK, LIK] = AHessian(T,R,Q,H,P,Y,DT,DYss,DOm,DH,DP,start,mf,ka
lik = zeros(smpl,1); % Initialization of the vector gathering the densities.
LIK = Inf; % Default value of the log likelihood.
if nargout > 1,
if nargout > 1
DLIK = zeros(k,1); % Initialization of the score.
end
AHess = zeros(k,k); % Initialization of the Hessian
......@@ -127,7 +127,7 @@ end
end
AHess = -AHess;
if nargout > 1,
if nargout > 1
DLIK = DLIK/2;
end
% adding log-likelihhod constants
......
function e = SPAimerr(c);
function e = SPAimerr(c)
% e = aimerr(c);
%
% Interpret the return codes generated by the aim routines.
......
......@@ -66,12 +66,12 @@ bcols=neq*nlag;q=zeros(qrows,qcols);rts=zeros(qcols,1);
[h,q,iq,nexact]=SPExact_shift(h,q,iq,qrows,qcols,neq);
if (iq>qrows)
aimcode = 61;
return;
return
end
[h,q,iq,nnumeric]=SPNumeric_shift(h,q,iq,qrows,qcols,neq,condn);
if (iq>qrows)
aimcode = 62;
return;
return
end
[a,ia,js] = SPBuild_a(h,qcols,neq);
if (ia ~= 0)
......@@ -81,7 +81,7 @@ if (ia ~= 0)
return
end
[w,rts,lgroots,flag_trouble]=SPEigensystem(a,uprbnd,min(length(js),qrows-iq+1));
if flag_trouble==1;
if flag_trouble==1
disp('Problem in SPEIG');
aimcode=64;
return
......
function [nonsing,b] = SPReduced_form(q,qrows,qcols,bcols,neq,condn);
function [nonsing,b] = SPReduced_form(q,qrows,qcols,bcols,neq,condn)
% [nonsing,b] = SPReduced_form(q,qrows,qcols,bcols,neq,b,condn);
%
% Compute reduced-form coefficient matrix, b.
......
......@@ -91,7 +91,7 @@ function [dr,info]=AIM_first_order_solver(jacobia,M,dr,qz_criterium)
if nba > nsfwrd
temp = temp(nd-nba+1:nd-nsfwrd)-1-qz_criterium;
info(1) = 3;
elseif nba < nsfwrd;
elseif nba < nsfwrd
temp = temp(nd-nsfwrd+1:nd-nba)-1-qz_criterium;
info(1) = 4;
end
......
......@@ -163,7 +163,7 @@ if nvx
end
disp(sprintf(pformat,header_width,name,bayestopt_.p1(ip),post_mean,hpd_interval,...
pnames(bayestopt_.pshape(ip)+1,:),bayestopt_.p2(ip)));
if TeX,
if TeX
name = deblank(M_.exo_names_tex(k,:));
TeXCore(fid,name,deblank(pnames(bayestopt_.pshape(ip)+1,:)),bayestopt_.p1(ip),...
bayestopt_.p2(ip),post_mean,sqrt(post_var),hpd_interval);
......@@ -311,7 +311,7 @@ if ncn
end
disp(sprintf(pformat, header_width,name,bayestopt_.p1(ip),post_mean,hpd_interval, ...
pnames(bayestopt_.pshape(ip)+1,:),bayestopt_.p2(ip)));
if TeX,
if TeX
name = ['(',deblank(M_.endo_names_tex(k1,:)) ',' deblank(M_.endo_names_tex(k2,:)),')'];
TeXCore(fid,name,deblank(pnames(bayestopt_.pshape(ip)+1,:)),bayestopt_.p1(ip),...
bayestopt_.p2(ip),post_mean,sqrt(post_var),hpd_interval);
......
......@@ -151,7 +151,7 @@ for i=1:npar
title(nam,'Interpreter','none');
hold off;
drawnow
if subplotnum == MaxNumberOfPlotPerFigure || i == npar;
if subplotnum == MaxNumberOfPlotPerFigure || i == npar
dyn_saveas(hfig,[OutputDirectoryName '/' M_.fname '_PriorsAndPosteriors' int2str(figunumber)],options_.nodisplay,options_.graph_format);
if TeX && any(strcmp('eps',cellstr(options_.graph_format)))
fprintf(fidTeX,'\\begin{figure}[H]\n');
......
......@@ -178,7 +178,7 @@ if strcmpi(type,'posterior')
end
end
if ~strcmpi(type,'prior'),
if ~strcmpi(type,'prior')
localVars.x=x;
end
......@@ -202,16 +202,16 @@ localVars.ifil2=ifil2;
localVars.MhDirectoryName=MhDirectoryName;
% Like sequential execution!
if isnumeric(options_.parallel),
if isnumeric(options_.parallel)
[fout] = PosteriorIRF_core1(localVars,1,B,0);
nosaddle = fout.nosaddle;
else
% Parallel execution!
[nCPU, totCPU, nBlockPerCPU] = distributeJobs(options_.parallel, 1, B);
for j=1:totCPU-1,
for j=1:totCPU-1
nfiles = ceil(nBlockPerCPU(j)/MAX_nirfs_dsge);
NumberOfIRFfiles_dsge(j+1) =NumberOfIRFfiles_dsge(j)+nfiles;
if MAX_nirfs_dsgevar,
if MAX_nirfs_dsgevar
nfiles = ceil(nBlockPerCPU(j)/MAX_nirfs_dsgevar);
else
nfiles=0;
......@@ -236,8 +236,8 @@ else
NamFileInput(1,:) = {'',[M_.fname '_static.m']};
NamFileInput(2,:) = {'',[M_.fname '_dynamic.m']};
NamFileInput(3,:) = {'',[M_.fname '_set_auxiliary_variables.m']};
if options_.steadystate_flag,
if options_.steadystate_flag == 1,
if options_.steadystate_flag
if options_.steadystate_flag == 1
NamFileInput(length(NamFileInput)+1,:)={'',[M_.fname '_steadystate.m']};
else
NamFileInput(length(NamFileInput)+1,:)={'',[M_.fname '_steadystate2.m']};
......@@ -245,7 +245,7 @@ else
end
[fout] = masterParallel(options_.parallel, 1, B,NamFileInput,'PosteriorIRF_core1', localVars, globalVars, options_.parallel_info);
nosaddle=0;
for j=1:length(fout),
for j=1:length(fout)
nosaddle = nosaddle + fout(j).nosaddle;
end
......@@ -443,11 +443,11 @@ end
% Comment for testing!
if ~isoctave
if isnumeric(options_.parallel) || (M_.exo_nbr*ceil(size(varlist,1)/MaxNumberOfPlotPerFigure))<8,
if isnumeric(options_.parallel) || (M_.exo_nbr*ceil(size(varlist,1)/MaxNumberOfPlotPerFigure))<8
[fout] = PosteriorIRF_core2(localVars,1,M_.exo_nbr,0);
else
isRemoteOctave = 0;
for indPC=1:length(options_.parallel),
for indPC=1:length(options_.parallel)
isRemoteOctave = isRemoteOctave + (findstr(options_.parallel(indPC).MatlabOctavePath, 'octave'));
end
if isRemoteOctave
......
......@@ -43,7 +43,7 @@ function myoutput=PosteriorIRF_core1(myinputs,fpar,B,whoiam, ThisMatlab)
global options_ estim_params_ oo_ M_ bayestopt_ dataset_ dataset_info
if nargin<4,
if nargin<4
whoiam=0;
end
......@@ -55,7 +55,7 @@ irun =myinputs.irun;
irun2=myinputs.irun2;
npar=myinputs.npar;
type=myinputs.type;
if ~strcmpi(type,'prior'),
if ~strcmpi(type,'prior')
x=myinputs.x;
end
......@@ -102,7 +102,7 @@ end
RemoteFlag = 0;
if whoiam
if Parallel(ThisMatlab).Local==0,
if Parallel(ThisMatlab).Local==0
RemoteFlag =1;
end
prct0={0,whoiam,Parallel(ThisMatlab)};
......@@ -165,7 +165,7 @@ while fpar<B
elseif info(1) == 5
errordef = 'Rank condition is not satisfied';
end
if strcmpi(type,'prior'),
if strcmpi(type,'prior')
disp(['PosteriorIRF :: Dynare is unable to solve the model (' errordef ')'])
continue
else
......@@ -240,9 +240,9 @@ while fpar<B
else
stock_irf_bvardsge(:,:,:,IRUN) = reshape(tmp_dsgevar,options_.irf,dataset_.vobs,M_.exo_nbr);
instr = [MhDirectoryName '/' M_.fname '_irf_bvardsge' ...
int2str(NumberOfIRFfiles_dsgevar) '.mat stock_irf_bvardsge;'];,
int2str(NumberOfIRFfiles_dsgevar) '.mat stock_irf_bvardsge;'];
eval(['save ' instr]);
if RemoteFlag==1,
if RemoteFlag==1
OutputFileName_bvardsge = [OutputFileName_bvardsge; {[MhDirectoryName filesep], [M_.fname '_irf_bvardsge' int2str(NumberOfIRFfiles_dsgevar) '.mat']}];
end
NumberOfIRFfiles_dsgevar = NumberOfIRFfiles_dsgevar+1;
......@@ -259,14 +259,14 @@ while fpar<B
int2str(NumberOfIRFfiles_dsgevar) '.mat stock_irf_bvardsge;'];
eval(['save ' instr]);
NumberOfIRFfiles_dsgevar = NumberOfIRFfiles_dsgevar+1;
if RemoteFlag==1,
if RemoteFlag==1
OutputFileName_bvardsge = [OutputFileName_bvardsge; {[MhDirectoryName filesep], [M_.fname '_irf_bvardsge' int2str(NumberOfIRFfiles_dsgevar) '.mat']}];
end
irun = 0;
end
end
save([MhDirectoryName '/' M_.fname '_irf_dsge' int2str(NumberOfIRFfiles_dsge) '.mat'],'stock_irf_dsge');
if RemoteFlag==1,
if RemoteFlag==1
OutputFileName_dsge = [OutputFileName_dsge; {[MhDirectoryName filesep], [M_.fname '_irf_dsge' int2str(NumberOfIRFfiles_dsge) '.mat']}];
end
NumberOfIRFfiles_dsge = NumberOfIRFfiles_dsge+1;
......@@ -278,7 +278,7 @@ while fpar<B
end
stock = stock_param;
save([MhDirectoryName '/' M_.fname '_param_irf' int2str(ifil2) '.mat'],'stock');
if RemoteFlag==1,
if RemoteFlag==1
OutputFileName_param = [OutputFileName_param; {[MhDirectoryName filesep], [M_.fname '_param_irf' int2str(ifil2) '.mat']}];
end
ifil2 = ifil2 + 1;
......
......@@ -49,7 +49,7 @@ function myoutput=PosteriorIRF_core2(myinputs,fpar,npar,whoiam,ThisMatlab)
global options_ M_
if nargin<4,
if nargin<4
whoiam=0;
end
......@@ -85,8 +85,8 @@ end
DirectoryName = CheckPath('Output',M_.dname);
RemoteFlag = 0;
if whoiam,
if Parallel(ThisMatlab).Local==0,
if whoiam
if Parallel(ThisMatlab).Local==0
RemoteFlag =1;
end
prct0={0,whoiam,Parallel(ThisMatlab)};
......@@ -96,7 +96,7 @@ end
OutputFileName={};
subplotnum = 0;
for i=fpar:npar,
for i=fpar:npar
figunumber = 0;
for j=1:nvar
......@@ -153,13 +153,13 @@ for i=fpar:npar,
if subplotnum == MaxNumberOfPlotPerFigure || (j == nvar && subplotnum> 0)
figunumber = figunumber+1;
dyn_saveas(hh,[DirectoryName '/' M_.fname '_Bayesian_IRF_' deblank(tit(i,:)) '_' int2str(figunumber)],options_.nodisplay,options_.graph_format);
if RemoteFlag==1,
if RemoteFlag==1
OutputFileName = [OutputFileName; {[DirectoryName,filesep], [M_.fname '_Bayesian_IRF_' deblank(tit(i,:)) '_' int2str(figunumber) '.*']}];
end
subplotnum = 0;
end
end% loop over selected endo_var
if whoiam,
if whoiam
fprintf('Done! \n');
waitbarString = [ 'Exog. shocks ' int2str(i) '/' int2str(npar) ' done.'];
% fMessageStatus((i-fpar+1)/(npar-fpar+1),whoiam,waitbarString, waitbarTitle, Parallel(ThisMatlab));
......
......@@ -44,15 +44,15 @@ function ReshapeMatFiles(type, type2)
global M_ options_
if nargin==1,
if nargin==1
MhDirectoryName = [ CheckPath('metropolis',M_.dname) filesep ];
else
if strcmpi(type2,'posterior')
MhDirectoryName = [CheckPath('metropolis',M_.dname) filesep ];
elseif strcmpi(type2,'gsa')
if options_.opt_gsa.morris==1,
if options_.opt_gsa.morris==1
MhDirectoryName = [CheckPath('gsa/screen',M_.dname) filesep ];
elseif options_.opt_gsa.morris==2,
elseif options_.opt_gsa.morris==2
MhDirectoryName = [CheckPath('gsa/identif',M_.dname) filesep ];
elseif options_.opt_gsa.pprior
MhDirectoryName = [CheckPath(['gsa' filesep 'prior'],M_.dname) filesep ];
......
......@@ -134,7 +134,7 @@ for ig = 1:ngrid
g_omega = [aa*tneg(ig) bb]*f_omega*[aa'*tpos(ig); bb']; % selected variables
f_hp = filter_gain(ig)^2*g_omega; % spectral density of selected filtered series
mathp_col(ig,:) = (f_hp(:))'; % store as matrix row
end;
end
f = zeros(nvar,ngrid);
for i=1:nvar
......
......@@ -42,7 +42,7 @@ end
% number of components equals number of shocks + 1 (initial conditions)
comp_nbr = size(z,2)-1;
if nargin==8 ,
if nargin==8
if isfield(opts_decomp,'steady_state')
SteadyState = opts_decomp.steady_state;
end
......@@ -84,7 +84,7 @@ end
nvar = length(i_var);
labels = char(char(shock_names),'Initial values');
if ~(screen_shocks && comp_nbr>18),
if ~(screen_shocks && comp_nbr>18)
screen_shocks=0;
end
comp_nbr0=comp_nbr;
......@@ -92,7 +92,7 @@ comp_nbr0=comp_nbr;
for j=1:nvar
d0={};
z1 = squeeze(z(i_var(j),:,:));
if screen_shocks,
if screen_shocks
[junk, isort] = sort(mean(abs(z1(1:end-2,:)')), 'descend');
labels = char(char(shock_names(isort(1:16),:)),'Others', 'Initial values');
zres = sum(z1(isort(17:end),:),1);
......@@ -107,7 +107,7 @@ for j=1:nvar
d0(LastRow+2,1)={'Legend.'};
d0(LastRow+2,2)={'Shocks include:'};
d0(LastRow+3:LastRow+3+comp_nbr-1,1)=cellstr(labels(1:comp_nbr,:));
for ic=1:comp_nbr,
for ic=1:comp_nbr
group_members = shock_groups.(shock_ind{ic}).shocks;
d0(LastRow+2+ic,2:1+length(group_members))=group_members;
end
......
......@@ -75,7 +75,7 @@ if isfield(q2a,'name')
if isfield(q2a,'tex_name')
mytex = q2a.tex_name;
end
if mytype==2,
if mytype==2
gtxt = ['PHI' mytxt]; % inflation rate
gtex = ['{\pi(' mytex ')}'];
elseif mytype
......@@ -101,7 +101,7 @@ if isstruct(aux)
end
yaux=aux.y;
end
if mytype==2,
if mytype==2
gtxt = 'PHI'; % inflation rate
gtex = '\pi';
elseif mytype
......@@ -115,7 +115,7 @@ nterms = size(z,2);
nfrcst = opts.forecast/4;
for j=1:nvar
if j>1,
if j>1
endo_names = char(endo_names,[deblank(M_.endo_names(i_var(j),:)) '_A']);
endo_names_tex = char(endo_names_tex,['{' deblank(M_.endo_names_tex(i_var(j),:)) '}^A']);
gendo_names = char(gendo_names,[gtxt endo_names(j,:)]);
......@@ -133,15 +133,15 @@ for j=1:nvar
gendo_names_tex = [gtex '(' deblank(endo_names_tex(j,:)) ')'];
end
end
for k =1:nterms,
if isstruct(aux),
for k =1:nterms
if isstruct(aux)
aux.y = squeeze(yaux(j,k,min((t0-3):-4:1):end));
end
[za(j,k,:), steady_state_a(j,1), gza(j,k,:), steady_state_ga(j,1)] = ...
quarterly2annual(squeeze(z(j,k,min((t0-3):-4:1):end)),steady_state(j),GYTREND0,var_type,islog,aux);
end
ztmp=squeeze(za(j,:,:));
if cumfix==0,
if cumfix==0
zscale = sum(ztmp(1:end-1,:))./ztmp(end,:);
ztmp(1:end-1,:) = ztmp(1:end-1,:)./repmat(zscale,[nterms-1,1]);
else
......@@ -149,7 +149,7 @@ for j=1:nvar
ztmp(end-1,:) = ztmp(end-1,:) + zres;
end
gztmp=squeeze(gza(j,:,:));
if cumfix==0,
if cumfix==0
gscale = sum(gztmp(1:end-1,:))./ gztmp(end,:);
gztmp(1:end-1,:) = gztmp(1:end-1,:)./repmat(gscale,[nterms-1,1]);
else
......@@ -160,7 +160,7 @@ for j=1:nvar
gza(j,:,:) = gztmp;
end
if q2a.plot ==1,
if q2a.plot ==1
z=gza;
endo_names = gendo_names;
endo_names_tex = gendo_names_tex;
......@@ -176,9 +176,9 @@ end
% end
% realtime
if realtime_ && isstruct(oo_) && isfield(oo_, 'realtime_shock_decomposition'),
if realtime_ && isstruct(oo_) && isfield(oo_, 'realtime_shock_decomposition')
init=1;
for i=t0:4:t1,
for i=t0:4:t1
yr=floor(i/4);
za=[];
gza=[];
......@@ -202,13 +202,13 @@ end
% z = z(i_var,:,:);
for j=1:nvar
for k =nterms:-1:1,
for k =nterms:-1:1
% if k<nterms
% ztmp = squeeze(sum(z(j,[1:k-1,k+1:end-1],t0-4:end)));
% else
ztmp = squeeze(z(j,k,min((t0-3):-4:1):end));
% end
if isstruct(aux),
if isstruct(aux)
aux.y = squeeze(yaux(j,k,min((t0-3):-4:1):end));
end
[za(j,k,:), steady_state_a(j,1), gza(j,k,:), steady_state_ga(j,1)] = ...
......@@ -222,7 +222,7 @@ end
ztmp=squeeze(za(j,:,:));
if cumfix==0,
if cumfix==0
zscale = sum(ztmp(1:end-1,:))./ztmp(end,:);
ztmp(1:end-1,:) = ztmp(1:end-1,:)./repmat(zscale,[nterms-1,1]);
else
......@@ -231,7 +231,7 @@ end
end
gztmp=squeeze(gza(j,:,:));
if cumfix==0,
if cumfix==0
gscale = sum(gztmp(1:end-1,:))./ gztmp(end,:);
gztmp(1:end-1,:) = gztmp(1:end-1,:)./repmat(gscale,[nterms-1,1]);
else
......@@ -243,7 +243,7 @@ end
gza(j,:,:) = gztmp;
end
if q2a.plot ==1,
if q2a.plot ==1
z=gza;
elseif q2a.plot == 2
z=za;
......@@ -251,7 +251,7 @@ end
z=cat(1,za,gza);
end
if init==1,
if init==1
oo_.annualized_realtime_shock_decomposition.pool = z;
else
oo_.annualized_realtime_shock_decomposition.pool(:,:,yr) = z(:,:,end-nfrcst);
......@@ -272,7 +272,7 @@ end
oo_.annualized_realtime_conditional_shock_decomposition.(['yr_' int2str(yr-nfrcst)])(:,end,:) = ...
oo_.annualized_realtime_shock_decomposition.pool(:,end,yr-nfrcst:end);
if i==t1
for my_forecast_=(nfrcst-1):-1:1,
for my_forecast_=(nfrcst-1):-1:1
oo_.annualized_realtime_conditional_shock_decomposition.(['yr_' int2str(yr-my_forecast_)]) = ...
oo_.annualized_realtime_shock_decomposition.pool(:,:,yr-my_forecast_:yr) - ...
oo_.annualized_realtime_forecast_shock_decomposition.(['yr_' int2str(yr-my_forecast_)])(:,:,1:my_forecast_+1);
......@@ -320,12 +320,12 @@ switch realtime_
end
end
if q2a.plot ==0,
if q2a.plot ==0
i_var=1:2*nvar;
steady_state = [steady_state_a;steady_state_ga];
else
i_var=1:nvar;
if q2a.plot ==1,
if q2a.plot ==1
steady_state = steady_state_ga;
else
steady_state = steady_state_a;
......
......@@ -38,7 +38,7 @@ function plan = basic_plan(plan, exogenous, expectation_type, date, value)
ix = find(strcmp(exogenous, plan.exo_names));
if isempty(ix)
error(['in basic_plan the second argument ' exogenous ' is not an exogenous variable']);
end;
end
sdate = length(date);
if sdate > 1
if date(1) < plan.date(1) || date(end) > plan.date(end)
......
......@@ -32,11 +32,11 @@ function [posterior_sampler_options, options_] = check_posterior_sampler_options
init=0;
if isempty(posterior_sampler_options),
if isempty(posterior_sampler_options)
init=1;
end
if init,
if init
% set default options and user defined options
posterior_sampler_options.posterior_sampling_method = options_.posterior_sampler_options.posterior_sampling_method;
posterior_sampler_options.bounds = bounds;
......@@ -253,7 +253,7 @@ if init,
% This will automatically trigger <rotated>
% default = []
tmp_mode = options_list{i,2};
for j=1:size(tmp_mode,2),
for j=1:size(tmp_mode,2)
posterior_sampler_options.mode(j).m = tmp_mode(:,j);
end
......@@ -328,7 +328,7 @@ if init,
end
end
if any(isinf(bounds.lb)) || any(isinf(bounds.ub)),
if any(isinf(bounds.lb)) || any(isinf(bounds.ub))
skipline()
disp('some priors are unbounded and prior_trunc is set to zero')
error('The option "slice" is inconsistent with prior_trunc=0.')
......@@ -347,21 +347,21 @@ if init,
posterior_sampler_options.W1=posterior_sampler_options.initial_step_size*(bounds.ub-bounds.lb);
if options_.load_mh_file,
if options_.load_mh_file
posterior_sampler_options.slice_initialize_with_mode = 0;
else
if ~posterior_sampler_options.slice_initialize_with_mode,
if ~posterior_sampler_options.slice_initialize_with_mode
posterior_sampler_options.invhess=[];
end
end
if ~isempty(posterior_sampler_options.mode_files), % multimodal case
if ~isempty(posterior_sampler_options.mode_files) % multimodal case
modes = posterior_sampler_options.mode_files; % these can be also mean files from previous parallel slice chains
load(modes, 'xparams')
if size(xparams,2)<2,
if size(xparams,2)<2
error(['check_posterior_sampler_options:: Variable xparams loaded in file <' modes '> has size [' int2str(size(xparams,1)) 'x' int2str(size(xparams,2)) ']: it must contain at least two columns, to allow multi-modal sampling.'])
end
for j=1:size(xparams,2),
for j=1:size(xparams,2)
mode(j).m=xparams(:,j);
end
posterior_sampler_options.mode = mode;
......@@ -386,7 +386,7 @@ if ~strcmp(posterior_sampler_options.posterior_sampling_method,'slice')
end
end
if options_.load_mh_file && posterior_sampler_options.use_mh_covariance_matrix,
if options_.load_mh_file && posterior_sampler_options.use_mh_covariance_matrix
[junk, invhess] = compute_mh_covariance_matrix;
posterior_sampler_options.invhess = invhess;
end
......@@ -396,10 +396,8 @@ end
% check specific options for slice sampler
if strcmp(posterior_sampler_options.posterior_sampling_method,'slice')
invhess = posterior_sampler_options.invhess;
if posterior_sampler_options.rotated,
if isempty(posterior_sampler_options.mode_files) && isempty(posterior_sampler_options.mode), % rotated unimodal
if posterior_sampler_options.rotated
if isempty(posterior_sampler_options.mode_files) && isempty(posterior_sampler_options.mode) % rotated unimodal
if ~options_.cova_compute && ~(options_.load_mh_file && posterior_sampler_options.use_mh_covariance_matrix)
skipline()
disp('check_posterior_sampler_options:: I cannot start rotated slice sampler because')
......@@ -419,19 +417,13 @@ if strcmp(posterior_sampler_options.posterior_sampling_method,'slice')
posterior_sampler_options.WR=sqrt(diag(D))*3;
end
else
if ~options_.load_mh_file && ~posterior_sampler_options.slice_initialize_with_mode,
if ~options_.load_mh_file && ~posterior_sampler_options.slice_initialize_with_mode
posterior_sampler_options.invhess=[];
end
end
% needs to be re-set to zero otherwise posterior analysis is filtered
% out in dynare_estimation_1.m
options_.mh_posterior_mode_estimation = 0;
else
end
return
......
......@@ -293,16 +293,16 @@ function g=gersh_nested(A,j,n)
g=zeros(n,1);
for ii = j:n
if ii == 1;
if ii == 1
sum_up_to_i = 0;