Commit d6f8e252 authored by MichelJuillard's avatar MichelJuillard
Browse files

Merge remote-tracking branch 'origin/master' into dr1break

parents 1fcf708b 5d4d318b
Announcement for Dynare 4.2.5 (on 2012-03-14)
=============================================
We are pleased to announce the release of Dynare 4.2.5.
This is a bugfix release.
The Windows package for the new release is already available for download at
the official Dynare website <http://www.dynare.org>. The Mac and Linux packages
should follow soon.
All users are strongly encouraged to upgrade.
The new release is compatible with MATLAB versions ranging from 7.0 (R14) to
7.14 (R2012a) and with GNU Octave versions ranging from 3.0 to 3.6.
Note that GNU Octave users under Windows will have to upgrade to GNU Octave
version 3.6.1 (MinGW). The Octave installer can be downloaded at:
http://www.dynare.org/octave/Octave3.6.1_gcc4.6.2_20120303-setup.exe
Here is a non-exhaustive list of the problems identified in version 4.2.4 and
that have been fixed in version 4.2.5:
* The MATLAB optimization toolbox was sometimes not correctly detected even
when installed
* Using the inverse gamma distribution with extreme hyperparameter values
could lead to a crash
* Various issues in the accelerated deterministic solver with block
decomposition
* Various issues in the parallelization engine
* Compatibility issues with the Global Sensitivity Analysis toolbox
* The Dynare++ binary was broken in the Windows package because of a missing
dynamic library
Announcement for Dynare 4.2.4 (on 2011-12-02)
=============================================
......
dnl Copyright (C) 2009-2011 Dynare Team
dnl Copyright (C) 2009-2012 Dynare Team
dnl
dnl This file is part of Dynare.
dnl
......@@ -22,6 +22,9 @@ AC_REQUIRE([AX_MATLAB])
AC_MSG_CHECKING([for MATLAB version])
if test "x$MATLAB_VERSION" != "x"; then
case $MATLAB_VERSION in
*2012a | *2012A)
MATLAB_VERSION="7.14"
;;
*2011b | *2011B)
MATLAB_VERSION="7.13"
;;
......
......@@ -122,7 +122,7 @@ else
addpath(mexpath)
end
else
mexpath = [dynareroot '../mex/matlab/win32-7.5-7.13'];
mexpath = [dynareroot '../mex/matlab/win32-7.5-7.14'];
if exist(mexpath, 'dir')
addpath(mexpath)
end
......@@ -147,7 +147,7 @@ else
addpath(mexpath)
end
else
mexpath = [dynareroot '../mex/matlab/win64-7.8-7.13'];
mexpath = [dynareroot '../mex/matlab/win64-7.8-7.14'];
if exist(mexpath, 'dir')
addpath(mexpath)
end
......@@ -161,7 +161,7 @@ else
addpath(mexpath)
end
else
mexpath = [dynareroot '../mex/matlab/osx32-7.5-7.13'];
mexpath = [dynareroot '../mex/matlab/osx32-7.5-7.14'];
if exist(mexpath, 'dir')
addpath(mexpath)
end
......
This diff is collapsed.
......@@ -203,10 +203,8 @@ while (t<sample_size)
endo_simul = endo_simul_1;
while 1
if ~increase_periods
if bytecode_flag
oo_.endo_simul = endo_simul_1;
oo_.exo_simul = exo_simul_1;
[flag,tmp] = bytecode('dynamic');
if bytecode_flag && ~options_.ep.stochastic.order
[flag,tmp] = bytecode('dynamic',endo_simul_1,exo_simul_1);
else
flag = 1;
end
......@@ -282,10 +280,8 @@ while (t<sample_size)
exo_simul_1 = [ exo_simul_1 ; zeros(ep.step,exo_nbr)];
end
% Solve the perfect foresight model with an increased number of periods.
if bytecode_flag
oo_.endo_simul = endo_simul_1;
oo_.exo_simul = exo_simul_1;
[flag,tmp] = bytecode('dynamic');
if bytecode_flag && ~options_.ep.stochastic.order
[flag,tmp] = bytecode('dynamic',endo_simul_1,exo_simul_1);
else
flag = 1;
end
......
......@@ -96,6 +96,8 @@ options_.graphics.nrows = 3;
options_.graphics.ncols = 3;
options_.graphics.line_types = {'b-'};
options_.graphics.line_width = 1;
options_.graph_format = 'eps';
options_.nodisplay = 1;
options_.nograph = 0;
options_.XTick = [];
options_.XTickLabel = [];
......
......@@ -130,6 +130,7 @@ for t=1:sample_size
wtilde = weights.*exp(lnw-dfac);
lik(t) = log(mean(wtilde))+dfac;
weights = wtilde/sum(wtilde);
% sum(weights>max(weights)*1e-6)
Neff = 1/(weights*weights');
if (Neff<DynareOptions.particle.resampling.neff_threshold*sample_size && strcmpi(DynareOptions.particle.resampling.status,'generic')) || strcmpi(DynareOptions.particle.resampling.status,'systematic')
nb_obs_resamp = nb_obs_resamp+1 ;
......
......@@ -42,105 +42,16 @@ if TeX
fprintf(fidTeX,['%% ' datestr(now,0) '\n']);
fprintf(fidTeX,' \n');
end
if nbplt == 1
h1 = figure('Name',figurename);
for plt = 1:nbplt,
hplt = dyn_figure(options_,'Name',figurename);
if TeX
TeXNAMES = [];
NAMES = [];
end
for i=1:npar
[x,f,abscissa,dens,binf,bsup] = draw_prior_density(i,bayestopt_);
[nam,texnam] = get_the_name(i,TeX,M_,estim_params_,options_);
if TeX
if i==1
TeXNAMES = texnam;
NAMES = nam;
else
TeXNAMES = char(TeXNAMES,texnam);
NAMES = char(NAMES,nam);
end
end
subplot(nr,nc,i)
hh = plot(x,f,'-k','linewidth',2);
set(hh,'color',[0.7 0.7 0.7]);
box on
title(nam,'Interpreter','none')
drawnow
end
eval(['print -depsc2 ' M_.fname '_Priors' int2str(1) '.eps']);
if ~exist('OCTAVE_VERSION')
eval(['print -dpdf ' M_.fname '_Priors' int2str(1)]);
saveas(h1,[M_.fname '_Priors' int2str(1) '.fig']);
end
if options_.nograph, close(h1), end
if TeX
fprintf(fidTeX,'\\begin{figure}[H]\n');
for jj = 1:npar
fprintf(fidTeX,'\\psfrag{%s}[1][][0.5][0]{%s}\n',deblank(NAMES(jj,:)),deblank(TeXNAMES(jj,:)));
end
fprintf(fidTeX,'\\centering\n');
fprintf(fidTeX,'\\includegraphics[scale=0.5]{%s_Priors%s}\n',M_.fname,int2str(1));
fprintf(fidTeX,'\\caption{Priors.}');
fprintf(fidTeX,'\\label{Fig:Priors:%s}\n',int2str(1));
fprintf(fidTeX,'\\end{figure}\n');
fprintf(fidTeX,' \n');
fprintf(fidTeX,'%% End of TeX file.\n');
fclose(fidTeX);
end
else
for plt = 1:nbplt-1
hplt = figure('Name',figurename);
if TeX
TeXNAMES = [];
NAMES = [];
end
for index=1:nstar
names = [];
i = (plt-1)*nstar + index;
[nam,texnam] = get_the_name(i,TeX,M_,estim_params_,options_);
[x,f,abscissa,dens,binf,bsup] = draw_prior_density(i,bayestopt_);
if TeX
if index==1
TeXNAMES = texnam;
NAMES = nam;
else
TeXNAMES = char(TeXNAMES,texnam);
NAMES = char(NAMES,nam);
end
end
subplot(nr,nc,index)
hh = plot(x,f,'-k','linewidth',2);
set(hh,'color',[0.7 0.7 0.7]);
box on
title(nam,'Interpreter','none')
drawnow
end % index=1:nstar
eval(['print -depsc2 ' M_.fname '_Priors' int2str(plt) '.eps']);
if ~exist('OCTAVE_VERSION')
eval(['print -dpdf ' M_.fname '_Priors' int2str(plt)]);
saveas(hplt,[M_.fname '_Priors' int2str(plt) '.fig']);
end
if options_.nograph, close(hplt), end
if TeX
fprintf(fidTeX,'\\begin{figure}[H]\n');
for jj = 1:nstar
fprintf(fidTeX,'\\psfrag{%s}[1][][0.5][0]{%s}\n',deblank(NAMES(jj,:)),deblank(TeXNAMES(jj,:)));
end
fprintf(fidTeX,'\\centering\n');
fprintf(fidTeX,'\\includegraphics[scale=0.5]{%s_Priors%s}\n',M_.fname,int2str(plt));
fprintf(fidTeX,'\\caption{Priors.}');
fprintf(fidTeX,'\\label{Fig:Priors:%s}\n',int2str(plt));
fprintf(fidTeX,'\\end{figure}\n');
fprintf(fidTeX,' \n');
end
end % plt = 1:nbplt-1
hplt = figure('Name',figurename);
if TeX
TeXNAMES = [];
NAMES = [];
end
for index=1:npar-(nbplt-1)*nstar
i = (nbplt-1)*nstar + index;
nstar0 = min(nstar,npar-(plt-1)*nstar);
for index=1:nstar0
names = [];
i = (plt-1)*nstar + index;
[x,f,abscissa,dens,binf,bsup] = draw_prior_density(i,bayestopt_);
[nam,texnam] = get_the_name(i,TeX,M_,estim_params_,options_);
if TeX
......@@ -152,35 +63,28 @@ else
NAMES = char(NAMES,nam);
end
end
if lr
subplot(lc,lr,index);
else
subplot(nr,nc,index);
end
subplot(nr,nc,index)
hh = plot(x,f,'-k','linewidth',2);
set(hh,'color',[0.7 0.7 0.7]);
box on
title(nam,'Interpreter','none')
drawnow
end % index=1:npar-(nbplt-1)*nstar
eval(['print -depsc2 ' M_.fname '_Priors' int2str(nbplt) '.eps']);
if ~exist('OCTAVE_VERSION')
eval(['print -dpdf ' M_.fname '_Priors' int2str(nbplt)]);
saveas(hplt,[M_.fname '_Priors' int2str(nbplt) '.fig']);
end
if options_.nograph, close(hplt), end
dyn_saveas(hplt,[M_.fname '_Priors' int2str(plt)],options_);
if TeX
fprintf(fidTeX,'\\begin{figure}[H]\n');
for jj = 1:npar-(nbplt-1)*nstar
for jj = 1:nstar0,
fprintf(fidTeX,'\\psfrag{%s}[1][][0.5][0]{%s}\n',deblank(NAMES(jj,:)),deblank(TeXNAMES(jj,:)));
end
fprintf(fidTeX,'\\centering\n');
fprintf(fidTeX,'\\includegraphics[scale=0.5]{%s_Priors%s}\n',M_.fname,int2str(nbplt));
fprintf(fidTeX,'\\includegraphics[scale=0.5]{%s_Priors%s}\n',M_.fname,int2str(plt));
fprintf(fidTeX,'\\caption{Priors.}');
fprintf(fidTeX,'\\label{Fig:Priors:%s}\n',int2str(nbplt));
fprintf(fidTeX,'\\label{Fig:Priors:%s}\n',int2str(plt));
fprintf(fidTeX,'\\end{figure}\n');
fprintf(fidTeX,' \n');
fprintf(fidTeX,'%% End of TeX file.\n');
fclose(fidTeX);
end
end
if TeX
fprintf(fidTeX,' \n');
fprintf(fidTeX,'%% End of TeX file.\n');
fclose(fidTeX);
end
\ No newline at end of file
......@@ -10,7 +10,7 @@ function warning_config()
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2008-2010 Dynare Team
% Copyright (C) 2008-2012 Dynare Team
%
% This file is part of Dynare.
%
......@@ -41,7 +41,13 @@ if exist('OCTAVE_VERSION')
warning('off', 'Octave:num-to-str');
warning('off', 'Octave:resize-on-range-error');
warning('off', 'Octave:str-to-num');
warning('off', 'Octave:string-concat');
warning('off', 'Octave:array-as-scalar');
warning('off', 'Octave:array-as-vector');
if octave_ver_less_than('3.6')
warning('off', 'Octave:string-concat');
else
warning('off', 'Octave:mixed-string-concat');
end
warning('off', 'Octave:variable-switch-label');
warning('off', 'Octave:fortran-indexing');
else
......
......@@ -1758,6 +1758,8 @@ PriorStatement::writeOutput(ostream &output, const string &basename) const
writeOutputHelper(output, "date1", lhs_field);
writeOutputHelper(output, "date2", lhs_field);
writeOutputHelper(output, "domain", lhs_field);
writeOutputHelper(output, "median", lhs_field);
writeOutputHelper(output, "truncate", lhs_field);
writeOutputHelper(output, "interval", lhs_field);
writeVarianceOption(output, lhs_field);
}
......@@ -1799,6 +1801,8 @@ StdPriorStatement::writeOutput(ostream &output, const string &basename) const
writeOutputHelper(output, "shape", lhs_field);
writeOutputHelper(output, "shift", lhs_field);
writeOutputHelper(output, "domain", lhs_field);
writeOutputHelper(output, "median", lhs_field);
writeOutputHelper(output, "truncate", lhs_field);
writeOutputHelper(output, "interval", lhs_field);
writeVarianceOption(output, lhs_field);
}
......@@ -1849,6 +1853,8 @@ CorrPriorStatement::writeOutput(ostream &output, const string &basename) const
writeOutputHelper(output, "shape", lhs_field);
writeOutputHelper(output, "shift", lhs_field);
writeOutputHelper(output, "domain", lhs_field);
writeOutputHelper(output, "median", lhs_field);
writeOutputHelper(output, "truncate", lhs_field);
writeOutputHelper(output, "interval", lhs_field);
writeVarianceOption(output, lhs_field);
}
......
......@@ -121,7 +121,7 @@ class ParsingDriver;
%token PARAMETERS PARAMETER_SET PARTIAL_INFORMATION PERIODS PLANNER_OBJECTIVE PLOT_CONDITIONAL_FORECAST PLOT_PRIORS PREFILTER PRESAMPLE
%token PRINT PRIOR_MC PRIOR_TRUNC PRIOR_MODE PRIOR_MEAN POSTERIOR_MODE POSTERIOR_MEAN POSTERIOR_MEDIAN PRUNING
%token <string_val> QUOTED_STRING
%token QZ_CRITERIUM FULL DSGE_VAR DSGE_VARLAG DSGE_PRIOR_WEIGHT
%token QZ_CRITERIUM FULL DSGE_VAR DSGE_VARLAG DSGE_PRIOR_WEIGHT TRUNCATE
%token RELATIVE_IRF REPLIC RPLOT SAVE_PARAMS_AND_STEADY_STATE PARAMETER_UNCERTAINTY
%token SHOCKS SHOCK_DECOMPOSITION SIGMA_E SIMUL SIMUL_ALGO SIMUL_SEED SMOOTHER STACK_SOLVE_ALGO STEADY_STATE_MODEL SOLVE_ALGO
%token STDERR STEADY STOCH_SIMUL SYLVESTER REGIMES REGIME
......@@ -1244,7 +1244,9 @@ prior_options_list : prior_options_list COMMA prior_options
prior_options : o_shift
| o_mean
| o_median
| o_stdev
| o_truncate
| o_variance
| o_mode
| o_interval
......@@ -2008,6 +2010,7 @@ o_shift : SHIFT EQUAL signed_number { driver.option_num("shift", $3); };
o_shape : SHAPE EQUAL prior_distribution { driver.prior_shape = $3; };
o_mode : MODE EQUAL signed_number { driver.option_num("mode", $3); };
o_mean : MEAN EQUAL signed_number { driver.option_num("mean", $3); };
o_truncate : TRUNCATE EQUAL vec_value { driver.option_num("truncate", $3); };
o_stdev : STDEV EQUAL non_negative_number { driver.option_num("stdev", $3); };
o_jscale : JSCALE EQUAL non_negative_number { driver.option_num("jscale", $3); };
o_init : INIT EQUAL signed_number { driver.option_num("init", $3); };
......@@ -2332,7 +2335,8 @@ o_error_band_percentiles : ERROR_BAND_PERCENTILES EQUAL vec_value { driver.optio
o_shock_draws : SHOCK_DRAWS EQUAL INT_NUMBER { driver.option_num("ms.shock_draws",$3); };
o_shocks_per_parameter : SHOCKS_PER_PARAMETER EQUAL INT_NUMBER { driver.option_num("ms.shocks_per_parameter",$3); };
o_free_parameters : FREE_PARAMETERS EQUAL vec_value { driver.option_num("ms.free_parameters",$3); };
o_median : MEDIAN { driver.option_num("ms.median","1"); };
o_median : MEDIAN { driver.option_num("ms.median","1"); }
| MEDIAN EQUAL signed_number { driver.option_num("median", $3); };
o_regimes : REGIMES { driver.option_num("ms.regimes","1"); };
o_regime : REGIME EQUAL INT_NUMBER { driver.option_num("ms.regime",$3); };
o_data_obs_nbr : DATA_OBS_NBR EQUAL INT_NUMBER { driver.option_num("ms.forecast_data_obs",$3); };
......
......@@ -203,6 +203,7 @@ string eofbuff;
<DYNARE_STATEMENT>first_obs {return token::FIRST_OBS;}
<DYNARE_STATEMENT>mean {return token::MEAN;}
<DYNARE_STATEMENT>stdev {return token::STDEV;}
<DYNARE_STATEMENT>truncate {return token::TRUNCATE;}
<DYNARE_STATEMENT>domain {return token::DOMAINN;}
<DYNARE_STATEMENT>variance {return token::VARIANCE;}
<DYNARE_STATEMENT>mode {return token::MODE;}
......
......@@ -54,13 +54,14 @@ specify a MOD file.
Using Dynare with Octave
------------------------
Dynare is now available for GNU Octave, a free clone of MATLAB (R) (see
Dynare also works on top of GNU Octave, a free clone of MATLAB (R) (see
<http://www.octave.org>).
The recommended Octave distribution is the Octave/MinGW 3.4.3
precompiled binaries from Octave Forge, available at:
This version of Dynare is compiled for Octave 3.6.1 (MinGW), and may not work
with other versions of Octave. You can download an installer for the right
version of Octave at:
http://sourceforge.net/projects/octave/files/Octave_Windows%20-%20MinGW/Octave%203.4.3%20for%20Windows%20MinGW%20Installer/
http://www.dynare.org/octave/Octave3.6.1_gcc4.6.2_20120303-setup.exe
Every time you run Octave, you should type the two following commands (assuming
that you have installed Dynare at the standard location, and replacing '4.x.y'
......@@ -68,19 +69,15 @@ by correct version number):
addpath c:\dynare\4.x.y\matlab
NOTE: if you don't want to type this command every time you run
Octave, you can put it in a file called '.octaverc' in your home
directory (generally 'c:\Documents and Settings\USERNAME\'). This file
is run by Octave at every startup.
NOTE: if you don't want to type this command every time you run Octave, you can
put it in a file called '.octaverc' in your home directory ('c:\Documents and
Settings\USERNAME\' for Windows XP or 'c:\Users\USERNAME' for Windows 7). This
file is run by Octave at every startup.
You can test your installation by typing 'dynare' at the Octave prompt. This
should give you an error message complaining that you did not specify a MOD
file.
For more information about Dynare for Octave, go to:
http://www.dynare.org/DynareWiki/DynareOctave
Dynamic Loadable Libraries
--------------------------
......
......@@ -85,9 +85,9 @@ Section "MEX files for MATLAB 32-bit, version 7.1 to 7.4 (R14SP3 to R2007a)"
File ..\mex\matlab\win32-7.1-7.4\*.mexw32
SectionEnd
Section "MEX files for MATLAB 32-bit, version 7.5 to 7.13 (R2007b to R2011b)"
SetOutPath $INSTDIR\mex\matlab\win32-7.5-7.13
File ..\mex\matlab\win32-7.5-7.13\*.mexw32
Section "MEX files for MATLAB 32-bit, version 7.5 to 7.14 (R2007b to R2012a)"
SetOutPath $INSTDIR\mex\matlab\win32-7.5-7.14
File ..\mex\matlab\win32-7.5-7.14\*.mexw32
SectionEnd
# Currently we don't have that version of MATLAB
......@@ -106,14 +106,14 @@ Section "MEX files for MATLAB 64-bit, version 7.5 to 7.7 (R2007b to R2008b)"
File ..\mex\matlab\win64-7.5-7.7\*.mexw64
SectionEnd
Section "MEX files for MATLAB 64-bit, version 7.8 to 7.13 (R2009a to R2011b)"
SetOutPath $INSTDIR\mex\matlab\win64-7.8-7.13
File ..\mex\matlab\win64-7.8-7.13\*.mexw64
Section "MEX files for MATLAB 64-bit, version 7.8 to 7.14 (R2009a to R2012a)"
SetOutPath $INSTDIR\mex\matlab\win64-7.8-7.14
File ..\mex\matlab\win64-7.8-7.14\*.mexw64
SectionEnd
SectionGroupEnd
Section "MEX files for Octave 3.4.3 (MinGW build)"
Section "MEX files for Octave 3.6.1 (MinGW)"
SetOutPath $INSTDIR\mex\octave
File ..\mex\octave\*.mex ..\mex\octave\*.oct
SectionEnd
......
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