bug fixes for use with octave for windows
parent
0d2448c375
commit
be510a4b93
|
@ -79,11 +79,11 @@ else
|
||||||
MhDirectoryName = CheckPath('prior');
|
MhDirectoryName = CheckPath('prior');
|
||||||
end
|
end
|
||||||
if strcmpi(type,'posterior')
|
if strcmpi(type,'posterior')
|
||||||
load([ MhDirectoryName '/' M_.fname '_mh_history.mat'])
|
load([ MhDirectoryName filesep M_.fname '_mh_history.mat'])
|
||||||
TotalNumberOfMhDraws = sum(record.MhDraws(:,1));
|
TotalNumberOfMhDraws = sum(record.MhDraws(:,1));
|
||||||
NumberOfDraws = TotalNumberOfMhDraws-floor(options_.mh_drop*TotalNumberOfMhDraws);
|
NumberOfDraws = TotalNumberOfMhDraws-floor(options_.mh_drop*TotalNumberOfMhDraws);
|
||||||
elseif strcmpi(type,'gsa')
|
elseif strcmpi(type,'gsa')
|
||||||
load([ MhDirectoryName '/' M_.fname '_prior.mat'],'lpmat0','lpmat','istable')
|
load([ MhDirectoryName filesep M_.fname '_prior.mat'],'lpmat0','lpmat','istable')
|
||||||
x=[lpmat0(istable,:) lpmat(istable,:)];
|
x=[lpmat0(istable,:) lpmat(istable,:)];
|
||||||
clear lpmat istable
|
clear lpmat istable
|
||||||
NumberOfDraws=size(x,1);
|
NumberOfDraws=size(x,1);
|
||||||
|
@ -94,10 +94,10 @@ end
|
||||||
if ~strcmpi(type,'gsa')
|
if ~strcmpi(type,'gsa')
|
||||||
B = min([round(.5*NumberOfDraws),500]); options_.B = B;
|
B = min([round(.5*NumberOfDraws),500]); options_.B = B;
|
||||||
end
|
end
|
||||||
try delete([MhDirectoryName '/' M_.fname '_irf_dsge*.mat'])
|
try delete([MhDirectoryName filesep M_.fname '_irf_dsge*.mat'])
|
||||||
catch disp('No _IRFs (dsge) files to be deleted!')
|
catch disp('No _IRFs (dsge) files to be deleted!')
|
||||||
end
|
end
|
||||||
try delete([MhDirectoryName '/' M_.fname '_irf_bvardsge*.mat'])
|
try delete([MhDirectoryName filesep M_.fname '_irf_bvardsge*.mat'])
|
||||||
catch disp('No _IRFs (bvar-dsge) files to be deleted!')
|
catch disp('No _IRFs (bvar-dsge) files to be deleted!')
|
||||||
end
|
end
|
||||||
irun = 0;
|
irun = 0;
|
||||||
|
@ -239,10 +239,10 @@ if strcmpi(type,'gsa')
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
IRF_DSGEs = dir([MhDirectoryName '/' M_.fname '_IRF_DSGEs*.mat']);
|
IRF_DSGEs = dir([MhDirectoryName filesep M_.fname '_IRF_DSGEs*.mat']);
|
||||||
NumberOfIRFfiles_dsge = length(IRF_DSGEs);
|
NumberOfIRFfiles_dsge = length(IRF_DSGEs);
|
||||||
|
|
||||||
IRF_BVARDSGEs = dir([MhDirectoryName '/' M_.fname '_IRF_BVARDSGEs*.mat']);
|
IRF_BVARDSGEs = dir([MhDirectoryName filesep M_.fname '_IRF_BVARDSGEs*.mat']);
|
||||||
NumberOfIRFfiles_dsgevar = length(IRF_BVARDSGEs);
|
NumberOfIRFfiles_dsgevar = length(IRF_BVARDSGEs);
|
||||||
|
|
||||||
|
|
||||||
|
@ -265,7 +265,7 @@ tit(M_.exo_names_orig_ord,:) = M_.exo_names;
|
||||||
kdx = 0;
|
kdx = 0;
|
||||||
|
|
||||||
for file = 1:NumberOfIRFfiles_dsge
|
for file = 1:NumberOfIRFfiles_dsge
|
||||||
load([MhDirectoryName '/' M_.fname '_IRF_DSGEs' int2str(file) '.mat']);
|
load([MhDirectoryName filesep M_.fname '_IRF_DSGEs' int2str(file) '.mat']);
|
||||||
for i = 1:M_.exo_nbr
|
for i = 1:M_.exo_nbr
|
||||||
for j = 1:nvar
|
for j = 1:nvar
|
||||||
for k = 1:size(STOCK_IRF_DSGE,1)
|
for k = 1:size(STOCK_IRF_DSGE,1)
|
||||||
|
@ -304,7 +304,7 @@ if MAX_nirfs_dsgevar
|
||||||
tit(M_.exo_names_orig_ord,:) = M_.exo_names;
|
tit(M_.exo_names_orig_ord,:) = M_.exo_names;
|
||||||
kdx = 0;
|
kdx = 0;
|
||||||
for file = 1:NumberOfIRFfiles_dsgevar
|
for file = 1:NumberOfIRFfiles_dsgevar
|
||||||
load([MhDirectoryName '/' M_.fname '_IRF_BVARDSGEs' int2str(file) '.mat']);
|
load([MhDirectoryName filesep M_.fname '_IRF_BVARDSGEs' int2str(file) '.mat']);
|
||||||
for i = 1:M_.exo_nbr
|
for i = 1:M_.exo_nbr
|
||||||
for j = 1:nvar
|
for j = 1:nvar
|
||||||
for k = 1:size(STOCK_IRF_BVARDSGE,1)
|
for k = 1:size(STOCK_IRF_BVARDSGE,1)
|
||||||
|
@ -363,7 +363,7 @@ localVars.MaxNumberOfPlotPerFigure=MaxNumberOfPlotPerFigure;
|
||||||
%%% The files .TeX are genereted in sequential way!
|
%%% The files .TeX are genereted in sequential way!
|
||||||
|
|
||||||
if options_.TeX
|
if options_.TeX
|
||||||
fidTeX = fopen([DirectoryName '/' M_.fname '_BayesianIRF.TeX'],'w');
|
fidTeX = fopen([DirectoryName filesep M_.fname '_BayesianIRF.TeX'],'w');
|
||||||
fprintf(fidTeX,'%% TeX eps-loader file generated by PosteriorIRF.m (Dynare).\n');
|
fprintf(fidTeX,'%% TeX eps-loader file generated by PosteriorIRF.m (Dynare).\n');
|
||||||
fprintf(fidTeX,['%% ' datestr(now,0) '\n']);
|
fprintf(fidTeX,['%% ' datestr(now,0) '\n']);
|
||||||
fprintf(fidTeX,' \n');
|
fprintf(fidTeX,' \n');
|
||||||
|
|
Loading…
Reference in New Issue