Commit e08cad82 authored by sebastien's avatar sebastien
Browse files

v4: merged Octave branch into trunk


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1899 ac1d8469-bf42-47a9-8791-bf33cf982152
parent f12c2f4e
dynare (4~svn.20080619) UNRELEASED; urgency=low
* New SVN snapshot.
* Changes to packaging:
- All files are now installed under /usr/lib/dynare.
- Added new packages for Matlab which contains compiled MEX files.
- No longer depend on octave-miscellaneous.
- Compile preprocessor with g++-4.1: Matlab 7.4 and 7.5 override libstdc++-6
with their own version, which is not compatible with newer versions of
g++-4.2.
- Use debhelper version 6 for compatibility with Ubuntu "Hardy Heron"
-- Sébastien Villemot <sebastien.villemot@ens.fr> Thu, 19 Jun 2008 17:32:41 +0200
dynare (4~svn.20080613) UNRELEASED; urgency=low
* Initial release.
-- Sébastien Villemot <sebastien.villemot@ens.fr> Fri, 13 Jun 2008 17:01:56 +0200
Source: dynare
Maintainer: Sébastien Villemot <sebastien.villemot@ens.fr>
Section: math
Priority: optional
Build-Depends: debhelper (>= 6), octave3.0-headers, g++-4.1
Standards-Version: 3.8.0
Homepage: http://www.dynare.org
Package: dynare
Architecture: any
Depends: octave3.0, ${shlibs:Depends}
Description: Software suite for non-linear models with forward looking variables
Dynare is a pre-preprocesser and a collection of Octave and Matlab (R) routines
which can solve, simulate and estimate non-linear models with forward looking
variables.
.
In particular, in the field of computational economics, it is used for solving
and estimating dynamic stochastic general equilibrium (DSGE) models.
.
This package contains:
* the binary preprocessor
* the various M-files which can be run under both Octave and Matlab (R)
* dynamic libraries for faster computation, compiled for Octave
.
For dynamic libraries compiled for Matlab (R), see dynare-matlab* packages.
Package: dynare-matlab7.4
Architecture: any
Section: contrib/math
Depends: dynare, ${shlibs:Depends}
Description: Software suite for non-linear models with forward looking variables
This package contains binary MEX files for faster execution of Dynare under
Matlab (R).
.
Compilation was done using Matlab (R) version 7.4, but the binaries may work
with older versions.
Package: dynare-matlab7.5
Architecture: any
Section: contrib/math
Depends: dynare, ${shlibs:Depends}
Description: Software suite for non-linear models with forward looking variables
This package contains binary MEX files for faster execution of Dynare under
Matlab (R).
.
Compilation was done using Matlab (R) version 7.5, but the binaries may work
with newer versions.
mex/2007a/*.mex* /usr/lib/dynare/mex/2007a
mex/2007b/*.mex* /usr/lib/dynare/mex/2007b
/usr/lib/dynare/mex/2007a
/usr/lib/dynare/mex/2007b
matlab/*.m /usr/lib/dynare/matlab
matlab/gensylv/*.m /usr/lib/dynare/matlab/gensylv
matlab/qz/*.m /usr/lib/dynare/matlab/qz
matlab/kronecker/*.m /usr/lib/dynare/matlab/kronecker
mex/octave/*.mex /usr/lib/dynare/mex/octave
mex/octave/rcond.m /usr/lib/dynare/mex/octave
preprocessor/dynare_m /usr/lib/dynare/matlab
#!/usr/bin/make -f
MATLAB74_ROOT=/usr/local/matlab74
MATLAB75_ROOT=/usr/local/matlab75
# Build only Matlab packages for which Matlab is installed on this machine
export DH_OPTIONS
DH_OPTIONS += $(shell test -d $(MATLAB74_ROOT) || echo "-Ndynare-matlab7.4 ")
DH_OPTIONS += $(shell test -d $(MATLAB75_ROOT) || echo "-Ndynare-matlab7.5 ")
build: build-stamp
build-stamp:
dh_testdir
# Building preprocessor
# It is necessary to build it with g++ 4.1 to avoid dynamic
# loading problems under Matlab 7.4 and 7.5
make -C preprocessor CXX=g++-4.1
# Building Octave MEX/OCT files
cd mex/sources && octave build_octave.m
# Building Matlab 7.4 MEX files
ifeq ($(shell test -d $(MATLAB74_ROOT) && echo yes), yes)
$(MATLAB74_ROOT)/etc/lmboot
cd mex/sources && $(MATLAB74_ROOT)/bin/matlab -nodisplay < build.m
$(MATLAB74_ROOT)/etc/lmdown
endif
# Building Matlab 7.5 MEX files
ifeq ($(shell test -d $(MATLAB75_ROOT) && echo yes), yes)
$(MATLAB75_ROOT)/etc/lmboot
cd mex/sources && $(MATLAB75_ROOT)/bin/matlab -nodisplay < build.m
$(MATLAB75_ROOT)/etc/lmdown
endif
touch build-stamp
clean:
dh_testdir
dh_testroot
make clean -C preprocessor
find mex/sources -name *.o | xargs rm -f
rm -f mex/octave/*.mex mex/2007a/* mex/2007b/*
rm -f matlab/dynare_m matlab/dynare_m.exe
rm -rf preprocessor/doc/html
rm -f build-stamp
dh_clean
binary-arch: build
dh_testdir
dh_testroot
dh_clean -k # Do not use dh_prep for compatibility with debhelper 6 on Hardy Ubuntu
dh_installdirs
dh_install
dh_installchangelogs
dh_installdocs
dh_strip
dh_compress
dh_fixperms
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary-indep:
binary: binary-arch binary-indep
.PHONY: build clean binary-arch binary-indep binary
......@@ -19,6 +19,10 @@ global M_
DirectoryName = [ M_.dname '/' type ];
if ~isdir(M_.dname)
mkdir('.', M_.dname);
end
if ~isdir(DirectoryName)
mkdir('.',DirectoryName);
end
\ No newline at end of file
......@@ -30,7 +30,7 @@ if ~length(file)
disp('MH:: FAILURE! there is no MH-history file!')
return
else
load([ DirectoryName '/' M_.fname '_mh_history'])
load([ DirectoryName '/' M_.fname '_mh_history.mat'])
end
TotalNumberOfMhFiles = sum(record.MhDraws(:,2));
TotalNumberOfMhDraws = sum(record.MhDraws(:,1));
......@@ -49,7 +49,7 @@ elseif TotalNumberOfMhFiles == 1
elseif TotalNumberOfMhFiles == 2 & FirstMhFile > 1
record.KeepedDraws.Distribution = [MAX_nruns-FirstLine+1 ; record.MhDraws(end,3)];
end
save([DirectoryName '/' M_.fname '_mh_history'],'record');
save([DirectoryName '/' M_.fname '_mh_history.mat'],'record');
fprintf('MH: Total number of Mh draws: %d.\n',TotalNumberOfMhDraws);
fprintf('MH: Total number of generated Mh files: %d.\n',TotalNumberOfMhFiles);
fprintf('MH: I''ll use mh-files %d to %d.\n',FirstMhFile,TotalNumberOfMhFiles);
......
......@@ -164,10 +164,14 @@ for i = 1:pages
boxplot = boxplot + 1;
end
end
eval(['print -depsc2 ' DirectoryName '/' M_.fname '_udiag' int2str(i)]);
eval(['print -dpdf ' DirectoryName '/' M_.fname '_udiag' int2str(i)]);
eval(['print -depsc2 ' DirectoryName '/' M_.fname '_udiag' int2str(i) '.eps']);
if ~exist('OCTAVE_VERSION')
eval(['print -dpdf ' DirectoryName '/' M_.fname '_udiag' int2str(i)]);
end
if options_.nograph, set(h,'visible','on'), end
saveas(h,[DirectoryName '/' M_.fname '_udiag' int2str(i) '.fig']);
if ~exist('OCTAVE_VERSION')
saveas(h,[DirectoryName '/' M_.fname '_udiag' int2str(i) '.fig']);
end
if options_.nograph, close(h), end
if TeX
fprintf(fidTeX,'\\begin{figure}[H]\n');
......@@ -234,10 +238,14 @@ if reste
boxplot = boxplot + 1;
end
end
eval(['print -depsc2 ' DirectoryName '/' M_.fname '_udiag' int2str(pages+1)]);
eval(['print -dpdf ' DirectoryName '/' M_.fname '_udiag' int2str(pages+1)]);
eval(['print -depsc2 ' DirectoryName '/' M_.fname '_udiag' int2str(pages+1) '.eps']);
if ~exist('OCTAVE_VERSION')
eval(['print -dpdf ' DirectoryName '/' M_.fname '_udiag' int2str(pages+1)]);
end
if options_.nograph, set(h,'visible','on'), end
saveas(h,[DirectoryName '/' M_.fname '_udiag' int2str(pages+1) '.fig']);
if ~exist('OCTAVE_VERSION')
saveas(h,[DirectoryName '/' M_.fname '_udiag' int2str(pages+1) '.fig']);
end
if options_.nograph, close(h), end
if TeX
fprintf(fidTeX,'\\begin{figure}[H]\n');
......@@ -347,10 +355,14 @@ for crit = 1:3
title(namnam,'Interpreter','none');
boxplot = boxplot + 1;
end
eval(['print -depsc2 ' DirectoryName '/' M_.fname '_mdiag']);
eval(['print -dpdf ' DirectoryName '/' M_.fname '_mdiag']);
eval(['print -depsc2 ' DirectoryName '/' M_.fname '_mdiag.eps']);
if ~exist('OCTAVE_VERSION')
eval(['print -dpdf ' DirectoryName '/' M_.fname '_mdiag']);
end
if options_.nograph, set(h,'visible','on'), end
saveas(h,[DirectoryName '/' M_.fname '_mdiag.fig']);
if ~exist('OCTAVE_VERSION')
saveas(h,[DirectoryName '/' M_.fname '_mdiag.fig']);
end
if options_.nograph, close(h), end
if TeX
fprintf(fidTeX,'\\begin{figure}[H]\n');
......
......@@ -139,12 +139,16 @@ for i=1:npar
hold off;
drawnow
if subplotnum == MaxNumberOfPlotPerFigure | i == npar;
eval(['print -depsc2 ' OutputDirectoryName '/' M_.fname '_PriorsAndPosteriors' int2str(figunumber)]);
eval(['print -dpdf ' OutputDirectoryName '/' M_.fname '_PriorsAndPosteriors' int2str(figunumber)]);
eval(['print -depsc2 ' OutputDirectoryName '/' M_.fname '_PriorsAndPosteriors' int2str(figunumber) '.eps']);
if ~exist('OCTAVE_VERSION')
eval(['print -dpdf ' OutputDirectoryName '/' M_.fname '_PriorsAndPosteriors' int2str(figunumber)]);
end
if options_.nograph,
set(hfig,'Visible','on');
end
saveas(hfig,[OutputDirectoryName '/' M_.fname '_PriorsAndPosteriors' int2str(figunumber) '.fig']);
if ~exist('OCTAVE_VERSION')
saveas(hfig,[OutputDirectoryName '/' M_.fname '_PriorsAndPosteriors' int2str(figunumber) '.fig']);
end
if TeX
fprintf(fidTeX,'\\begin{figure}[H]\n');
for j = 1:size(NAMES,1)
......
......@@ -45,7 +45,7 @@ maxlag = M_.maximum_endo_lag;
%%
CheckPath('Plots/');
DirectoryName = CheckPath('metropolis');
load([ DirectoryName '/' M_.fname '_mh_history'])
load([ DirectoryName '/' M_.fname '_mh_history.mat'])
FirstMhFile = record.KeepedDraws.FirstMhFile;
FirstLine = record.KeepedDraws.FirstLine;
TotalNumberOfMhFiles = sum(record.MhDraws(:,2)); LastMhFile = TotalNumberOfMhFiles;
......@@ -191,49 +191,49 @@ for b=1:B
if irun1 > MAX_nsmoo | b == B
stock = stock_smooth(:,:,1:irun1-1);
ifil1 = ifil1 + 1;
save([DirectoryName '/' M_.fname '_smooth' int2str(ifil1)],'stock');
save([DirectoryName '/' M_.fname '_smooth' int2str(ifil1) '.mat'],'stock');
irun1 = 1;
end
if nvx & (irun2 > MAX_ninno | b == B)
stock = stock_innov(:,:,1:irun2-1);
ifil2 = ifil2 + 1;
save([DirectoryName '/' M_.fname '_inno' int2str(ifil2)],'stock');
save([DirectoryName '/' M_.fname '_inno' int2str(ifil2) '.mat'],'stock');
irun2 = 1;
end
if nvn & (irun3 > MAX_error | b == B)
stock = stock_error(:,:,1:irun3-1);
ifil3 = ifil3 + 1;
save([DirectoryName '/' M_.fname '_error' int2str(ifil3)],'stock');
save([DirectoryName '/' M_.fname '_error' int2str(ifil3) '.mat'],'stock');
irun3 = 1;
end
if naK & (irun4 > MAX_naK | b == B)
stock = stock_filter(:,:,:,1:irun4-1);
ifil4 = ifil4 + 1;
save([DirectoryName '/' M_.fname '_filter' int2str(ifil4)],'stock');
save([DirectoryName '/' M_.fname '_filter' int2str(ifil4) '.mat'],'stock');
irun4 = 1;
end
if irun5 > MAX_nruns | b == B
stock = stock_param(1:irun5-1,:);
ifil5 = ifil5 + 1;
save([DirectoryName '/' M_.fname '_param' int2str(ifil5)],'stock','stock_logpo','stock_ys');
save([DirectoryName '/' M_.fname '_param' int2str(ifil5) '.mat'],'stock','stock_logpo','stock_ys');
irun5 = 1;
end
if horizon & (irun6 > MAX_nforc1 | b == B)
stock = stock_forcst_mean(:,:,1:irun6-1);
ifil6 = ifil6 + 1;
save([DirectoryName '/' M_.fname '_forc_mean' int2str(ifil6)],'stock');
save([DirectoryName '/' M_.fname '_forc_mean' int2str(ifil6) '.mat'],'stock');
irun6 = 1;
end
if horizon & (irun7 > MAX_nforc2 | b == B)
stock = stock_forcst_total(:,:,1:irun7-1);
ifil7 = ifil7 + 1;
save([DirectoryName '/' M_.fname '_forc_total' int2str(ifil7)],'stock');
save([DirectoryName '/' M_.fname '_forc_total' int2str(ifil7) '.mat'],'stock');
irun7 = 1;
end
......@@ -243,7 +243,7 @@ close(h)
stock_gend=gend;
stock_data=Y;
save([DirectoryName '/' M_.fname '_data'],'stock_gend','stock_data');
save([DirectoryName '/' M_.fname '_data.mat'],'stock_gend','stock_data');
if options_.smoother
pm3(endo_nbr,gend,ifil1,B,'Smoothed variables',...
......
......@@ -64,11 +64,11 @@ else
MhDirectoryName = CheckPath('prior');
end
if strcmpi(type,'posterior')
load([ MhDirectoryName '/' M_.fname '_mh_history'])
load([ MhDirectoryName '/' M_.fname '_mh_history.mat'])
TotalNumberOfMhDraws = sum(record.MhDraws(:,1));
NumberOfDraws = TotalNumberOfMhDraws-floor(options_.mh_drop*TotalNumberOfMhDraws);
elseif strcmpi(type,'gsa')
load([ MhDirectoryName '/' M_.fname '_prior'],'lpmat0','lpmat','istable')
load([ MhDirectoryName '/' M_.fname '_prior.mat'],'lpmat0','lpmat','istable')
x=[lpmat0(istable,:) lpmat(istable,:)];
clear lpmat istable
NumberOfDraws=size(x,1);
......@@ -232,7 +232,7 @@ while b<=B
else
stock_irf_bvardsge(:,:,:,IRUN) = reshape(tmp_dsgevar,options_.irf,nvobs,M_.exo_nbr);
instr = [MhDirectoryName '/' M_.fname '_irf_bvardsge' ...
int2str(NumberOfIRFfiles_dsgevar) ' stock_irf_bvardsge;'];,
int2str(NumberOfIRFfiles_dsgevar) '.mat stock_irf_bvardsge;'];,
eval(['save ' instr]);
NumberOfIRFfiles_dsgevar = NumberOfIRFfiles_dsgevar+1;
IRUN =0;
......@@ -251,7 +251,7 @@ while b<=B
irun = 0;
end
end
save([MhDirectoryName '/' M_.fname '_irf_dsge' int2str(NumberOfIRFfiles_dsge)],'stock_irf_dsge');
save([MhDirectoryName '/' M_.fname '_irf_dsge' int2str(NumberOfIRFfiles_dsge) '.mat'],'stock_irf_dsge');
NumberOfIRFfiles_dsge = NumberOfIRFfiles_dsge+1;
irun = 0;
end
......@@ -260,7 +260,7 @@ while b<=B
stock_param = stock_param(1:irun2,:);
end
stock = stock_param;
save([MhDirectoryName '/' M_.fname '_param_irf' int2str(ifil2)],'stock');
save([MhDirectoryName '/' M_.fname '_param_irf' int2str(ifil2) '.mat'],'stock');
ifil2 = ifil2 + 1;
irun2 = 0;
end
......@@ -306,7 +306,7 @@ tit(M_.exo_names_orig_ord,:) = M_.exo_names;
kdx = 0;
for file = 1:NumberOfIRFfiles_dsge
load([MhDirectoryName '/' M_.fname '_IRF_DSGEs' int2str(file)]);
load([MhDirectoryName '/' M_.fname '_IRF_DSGEs' int2str(file) '.mat']);
for i = 1:M_.exo_nbr
for j = 1:nvar
for k = 1:size(STOCK_IRF_DSGE,1)
......@@ -344,7 +344,7 @@ if MAX_nirfs_dsgevar
tit(M_.exo_names_orig_ord,:) = M_.exo_names;
kdx = 0;
for file = 1:NumberOfIRFfiles_dsgevar
load([MhDirectoryName '/' M_.fname '_IRF_BVARDSGEs' int2str(file)]);
load([MhDirectoryName '/' M_.fname '_IRF_BVARDSGEs' int2str(file) '.mat']);
for i = 1:M_.exo_nbr
for j = 1:nvar
for k = 1:size(STOCK_IRF_BVARDSGE,1)
......
......@@ -102,31 +102,31 @@ end
for f1=1:NumberOfTYPEfiles-foffset
eval(['STOCK_' CAPtype ' = zeros(NumberOfPeriodsPerTYPEfiles,TYPEsize(2),TYPEsize(3),B);'])
for f2 = 1:NumberOfTYPEfiles
load([MhDirectoryName M_.fname '_' type int2str(f2)]);
load([MhDirectoryName M_.fname '_' type int2str(f2) '.mat']);
eval(['STOCK_' CAPtype '(:,:,:,idx+1:idx+size(stock_' type ',4))=stock_' ...
type '(jdx+1:jdx+NumberOfPeriodsPerTYPEfiles,:,:,:);'])
eval(['idx = idx + size(stock_' type ',4);'])
end
%eval(['STOCK_' CAPtype ' = sort(STOCK_' CAPtype ',4);'])
save([MhDirectoryName M_.fname '_' CAPtype 's' int2str(f1)],['STOCK_' CAPtype]);
save([MhDirectoryName M_.fname '_' CAPtype 's' int2str(f1) '.mat'],['STOCK_' CAPtype]);
jdx = jdx + NumberOfPeriodsPerTYPEfiles;
idx = 0;
end
if reste
eval(['STOCK_' CAPtype ' = zeros(reste,TYPEsize(2),TYPEsize(3),B);'])
for f2 = 1:NumberOfTYPEfiles
load([MhDirectoryName M_.fname '_' type int2str(f2)]);
load([MhDirectoryName M_.fname '_' type int2str(f2) '.mat']);
eval(['STOCK_' CAPtype '(:,:,:,idx+1:idx+size(stock_' type ',4))=stock_' type '(jdx+1:jdx+reste,:,:,:);'])
eval(['idx = idx + size(stock_' type ',4);'])
end
%eval(['STOCK_' CAPtype ' = sort(STOCK_' CAPtype ',4);'])
save([MhDirectoryName M_.fname '_' CAPtype 's' int2str(NumberOfTYPEfiles-foffset+1)],['STOCK_' CAPtype]);
save([MhDirectoryName M_.fname '_' CAPtype 's' int2str(NumberOfTYPEfiles-foffset+1) '.mat'],['STOCK_' CAPtype]);
end
else
load([MhDirectoryName M_.fname '_' type '1']);
load([MhDirectoryName M_.fname '_' type '1.mat']);
%eval(['STOCK_' CAPtype ' = sort(stock_' type ',4);'])
eval(['STOCK_' CAPtype ' = stock_' type ';'])
save([MhDirectoryName M_.fname '_' CAPtype 's' int2str(1)],['STOCK_' CAPtype ]);
save([MhDirectoryName M_.fname '_' CAPtype 's' int2str(1) '.mat'],['STOCK_' CAPtype ]);
end
% Original file format may be useful in some cases...
% for file = 1:NumberOfTYPEfiles
......@@ -141,28 +141,28 @@ end
for f1=1:NumberOfTYPEfiles-1
eval(['STOCK_' CAPtype ' = zeros(TYPEsize(1),NumberOfPeriodsPerTYPEfiles,B);'])
for f2 = 1:NumberOfTYPEfiles
load([MhDirectoryName M_.fname '_' type int2str(f2)]);
load([MhDirectoryName M_.fname '_' type int2str(f2) '.mat']);
eval(['STOCK_' CAPtype '(:,:,idx+1:idx+size(stock_ ' type ',3))=stock_' type '(:,jdx+1:jdx+NumberOfPeriodsPerTYPEfiles,:);'])
eval(['idx = idx + size(stock_' type ',3);'])
end
%eval(['STOCK_' CAPtype ' = sort(STOCK_' CAPtype ',3);'])
save([MhDirectoryName M_.fname '_' CAPtype 's' int2str(f1)],['STOCK_' CAPtype]);
save([MhDirectoryName M_.fname '_' CAPtype 's' int2str(f1) '.mat'],['STOCK_' CAPtype]);
jdx = jdx + NumberOfPeriodsPerTYPEfiles;
idx = 0;
end
eval(['STOCK_' CAPtype ' = zeros(TYPEsize(1),reste,B);'])
for f2 = 1:NumberOfTYPEfiles
load([MhDirectoryName M_.fname '_' type int2str(f2)]);
load([MhDirectoryName M_.fname '_' type int2str(f2) '.mat']);
eval(['STOCK_' CAPtype '(:,:,idx+1:idx+size(stock_' type ',3))=stock_' type '(:,jdx+1:jdx+reste,:);'])
eval(['idx = idx + size(stock_' type ',3);'])
end
%eval(['STOCK_' CAPtype ' = sort(STOCK_' CAPtype ',3);'])
save([MhDirectoryName M_.fname '_' CAPtype 's' int2str(NumberOfTYPEfiles)],['STOCK_' CAPtype]);
save([MhDirectoryName M_.fname '_' CAPtype 's' int2str(NumberOfTYPEfiles) '.mat'],['STOCK_' CAPtype]);
else
load([MhDirectoryName M_.fname '_' type '1']);
load([MhDirectoryName M_.fname '_' type '1.mat']);
%eval(['STOCK_' CAPtype ' = sort(stock_' type ',3);'])
eval(['STOCK_' CAPtype ' = stock_' type ';'])
save([MhDirectoryName M_.fname '_' CAPtype 's' int2str(1)],['STOCK_' CAPtype ]);
save([MhDirectoryName M_.fname '_' CAPtype 's' int2str(1) '.mat'],['STOCK_' CAPtype ]);
end
% Original file format may be useful in some cases...
% for file = 1:NumberOfTYPEfiles
......
......@@ -23,7 +23,9 @@ sdl = 0.01;%options_.SepctralDensity.Th.sdl;
omega = (0:sdl:pi)';
GridSize = length(omega);
exo_names_orig_ord = M_.exo_names_orig_ord;
if sscanf(version('-release'),'%d') < 13
if exist('OCTAVE_VERSION')
warning('off', 'Octave:divide-by-zero')
elseif sscanf(version('-release'),'%d') < 13
warning off
else
eval('warning off MATLAB:dividebyzero')
......@@ -146,8 +148,10 @@ for i=1:nvar
f(i,:) = Gamma(i,1)/(2*pi) + Gamma(i,H+1)*cos(H'*omega')/pi;
end
if sscanf(version('-release'),'%d') < 13
warning on
if exist('OCTAVE_VERSION')
warning('on', 'Octave:divide-by-zero')
elseif sscanf(version('-release'),'%d') < 13
warning_config
else
eval('warning on MATLAB:dividebyzero')
end
......
......@@ -145,7 +145,7 @@ function bvar_forecast(nlags)
if ~isdir(DirectoryName)
mkdir('.',DirectoryName);
end
save([ DirectoryName '/simulations'], 'sims_no_shock', 'sims_with_shocks');
save([ DirectoryName '/simulations.mat'], 'sims_no_shock', 'sims_with_shocks');
for i = 1:size(options_.varobs, 1)
name = options_.varobs(i, :);
......
......@@ -27,7 +27,7 @@ n = estim_params_.np + ...
nblck = options_.mh_nblck;
MhDirectoryName = CheckPath('metropolis');
load([ MhDirectoryName '/' M_.fname '_mh_history'])
load([ MhDirectoryName '/' M_.fname '_mh_history.mat'])
FirstMhFile = record.KeepedDraws.FirstMhFile;
FirstLine = record.KeepedDraws.FirstLine;
......@@ -41,7 +41,7 @@ s0 = zeros(n,n);
for n = FirstMhFile:TotalNumberOfMhFiles
for b = 1:nblck
load([ MhDirectoryName '/' M_.fname '_mh' int2str(n) '_blck' int2str(b)],'x2','logpo2');
load([ MhDirectoryName '/' M_.fname '_mh' int2str(n) '_blck' int2str(b) '.mat'],'x2','logpo2');
[tmp,idx] = max(logpo2);
if tmp>oldlogpo2
oldlogpo2 = tmp;
......@@ -56,4 +56,4 @@ xparam1 = params';
hh = inv(s0);
fval = oldlogpo2;
save([M_.fname '_mh_mode'],'xparam1','hh','fval');
\ No newline at end of file
save([M_.fname '_mh_mode.mat'],'xparam1','hh','fval');
\ No newline at end of file
......@@ -105,7 +105,7 @@ while ~done
end
wall1=badg1;
% g1
save g1 g1 x1 f1 varargin;
save g1.mat g1 x1 f1 varargin;
%ARGLIST
%save g1 g1 x1 f1 P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11 P12 P13;
end
......@@ -139,7 +139,7 @@ while ~done
wall2=badg2;
% g2
badg2
save g2 g2 x2 f2 varargin
save g2.mat g2 x2 f2 varargin
%ARGLIST
%save g2 g2 x2 f2 P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11 P12 P13;
end
......@@ -173,7 +173,7 @@ while ~done
wall3=badg3;
% g3
badg3
save g3 g3 x3 f3 varargin;
save g3.mat g3 x3 f3 varargin;
%ARGLIST
%save g3 g3 x3 f3 P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11 P12 P13;
end
......
......@@ -3,6 +3,7 @@
function disp_moments(y,var_list)
global M_ options_ oo_
warning_old_state = warning;
warning off
nvar = size(var_list,1);
if nvar == 0
......@@ -72,7 +73,7 @@ function disp_moments(y,var_list)
table(title,headers,labels,autocorr,size(labels,2)+2,8,4);
end
warning on
warning(warning_old_state);
% 10/03/02 MJ corrected order std. dev var in printed report.
% 01/02/03 MJ added correlation and autocorrelation
% 01/19/03 MJ corrected variable name truncation
......
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