Merge branch 'master' of https://github.com/DynareTeam/dynare
commit
bd68970c62
|
@ -656,7 +656,7 @@ can be solved using the algorithm proposed by
|
|||
\citet{kamenik:2003}\footnote{This paper is distributed with Dynare, in the
|
||||
\texttt{sylvester.pdf} file under the documentation directory.}.
|
||||
|
||||
\bibliographystyle{ecta}
|
||||
\bibliographystyle{elsarticle-harv}
|
||||
\bibliography{dr}
|
||||
|
||||
\end{document}
|
||||
|
|
|
@ -4312,6 +4312,22 @@ Tells Dynare to plot the posterior density for values around the
|
|||
computed mode for each estimated parameter in turn. This is helpful to
|
||||
diagnose problems with the optimizer
|
||||
|
||||
@item mode_check_neighbourhood_size = @var{DOUBLE}
|
||||
Used in conjunction with option @code{mode_check}, gives the width of
|
||||
the window around the posterior mode to be displayed on the diagnostic
|
||||
plots. This width is expressed in percentage deviation. The @code{Inf}
|
||||
value is allowed, and will trigger a plot over the entire domain
|
||||
(see also @code{mode_check_symmetric_plots}).
|
||||
Default: @code{0.5}.
|
||||
|
||||
@item mode_check_symmetric_plots = @var{INTEGER}
|
||||
Used in conjunction with option @code{mode_check}, if set to @code{1},
|
||||
tells Dynare to ensure that the check plots are symmetric around the
|
||||
posterior mode. A value of @code{0} allows to have asymmetric plots,
|
||||
which can be useful if the posterior mode is close to a domain
|
||||
boundary, or in conjunction with @code{mode_check_neighbourhood_size =
|
||||
Inf} when the domain in not the entire real line. Default: @code{1}.
|
||||
|
||||
@item prior_trunc = @var{DOUBLE}
|
||||
@anchor{prior_trunc} Probability of extreme values of the prior
|
||||
density that is ignored when computing bounds for the
|
||||
|
@ -4424,10 +4440,32 @@ files (not yet implemented)
|
|||
|
||||
@item kalman_algo = @var{INTEGER}
|
||||
@anchor{kalman_algo}
|
||||
@dots{}
|
||||
|
||||
@table @code
|
||||
|
||||
@item 0
|
||||
Automatically use the Multivariate Kalman Filter for stationary models and the Multivariate Diffuse Kalman Filter for non-stationary models
|
||||
|
||||
@item 1
|
||||
Use the Multivariate Kalman Filter
|
||||
|
||||
@item 2
|
||||
Use the Univariate Kalman Filter
|
||||
|
||||
@item 3
|
||||
Use the Multivariate Diffuse Kalman Filter
|
||||
|
||||
@item 4
|
||||
Use the Univariate Diffuse Kalman Filter
|
||||
|
||||
@end table
|
||||
@noindent
|
||||
Default value is @code{0}.
|
||||
|
||||
|
||||
@item kalman_tol = @var{DOUBLE}
|
||||
@dots{}
|
||||
@anchor{kalman_tol} Numerical tolerance for determining the singularity of the covariance matrix of the prediction errors during the Kalman filter (minimum allowed reciprocal of the matrix condition number). Default value is @code{1e-10}
|
||||
|
||||
|
||||
@item filter_covariance
|
||||
@anchor{filter_covariance} Saves the series of one step ahead error of
|
||||
|
|
|
@ -112,7 +112,7 @@ The email addresses above are provided in case you wish to contact any one of th
|
|||
\backmatter
|
||||
|
||||
\bibliography{DynareBib}
|
||||
\bibliographystyle{econometrica}
|
||||
\bibliographystyle{elsarticle-harv}
|
||||
%\printindex
|
||||
|
||||
\end{document}
|
||||
|
|
|
@ -55,6 +55,10 @@ for i=1:nvar
|
|||
IndxVariables = [IndxVariables,idx];
|
||||
end
|
||||
end
|
||||
|
||||
% Get index of shocks for requested IRFs
|
||||
irf_shocks_indx = getIrfShocksIndx();
|
||||
|
||||
% Set various parameters & Check or create directories
|
||||
nvx = estim_params_.nvx;
|
||||
nvn = estim_params_.nvn;
|
||||
|
@ -290,7 +294,7 @@ kdx = 0;
|
|||
|
||||
for file = 1:NumberOfIRFfiles_dsge
|
||||
load([MhDirectoryName filesep M_.fname '_IRF_DSGEs' int2str(file) '.mat']);
|
||||
for i = 1:M_.exo_nbr
|
||||
for i = irf_shocks_indx
|
||||
for j = 1:nvar
|
||||
for k = 1:size(STOCK_IRF_DSGE,1)
|
||||
kk = k+kdx;
|
||||
|
@ -305,7 +309,7 @@ end
|
|||
|
||||
clear STOCK_IRF_DSGE;
|
||||
|
||||
for i = 1:M_.exo_nbr
|
||||
for i = irf_shocks_indx
|
||||
for j = 1:nvar
|
||||
name = [deblank(M_.endo_names(IndxVariables(j),:)) '_' deblank(tit(i,:))];
|
||||
eval(['oo_.PosteriorIRF.dsge.Mean.' name ' = MeanIRF(:,j,i);']);
|
||||
|
@ -329,7 +333,7 @@ if MAX_nirfs_dsgevar
|
|||
kdx = 0;
|
||||
for file = 1:NumberOfIRFfiles_dsgevar
|
||||
load([MhDirectoryName filesep M_.fname '_IRF_BVARDSGEs' int2str(file) '.mat']);
|
||||
for i = 1:M_.exo_nbr
|
||||
for i = irf_shocks_indx
|
||||
for j = 1:nvar
|
||||
for k = 1:size(STOCK_IRF_BVARDSGE,1)
|
||||
kk = k+kdx;
|
||||
|
@ -342,7 +346,7 @@ if MAX_nirfs_dsgevar
|
|||
kdx = kdx + size(STOCK_IRF_BVARDSGE,1);
|
||||
end
|
||||
clear STOCK_IRF_BVARDSGE;
|
||||
for i = 1:M_.exo_nbr
|
||||
for i = irf_shocks_indx
|
||||
for j = 1:nvar
|
||||
name = [deblank(M_.endo_names(IndxVariables(j),:)) '_' deblank(tit(i,:))];
|
||||
eval(['oo_.PosteriorIRF.bvardsge.Mean.' name ' = MeanIRFdsgevar(:,j,i);']);
|
||||
|
@ -395,7 +399,7 @@ if options_.TeX
|
|||
fprintf(fidTeX,' \n');
|
||||
titTeX(M_.exo_names_orig_ord,:) = M_.exo_names_tex;
|
||||
|
||||
for i=1:M_.exo_nbr
|
||||
for i=irf_shocks_indx
|
||||
NAMES = [];
|
||||
TEXNAMES = [];
|
||||
|
||||
|
|
|
@ -114,17 +114,18 @@ sims_with_shocks_sort = sort(sims_with_shocks, 3);
|
|||
sims_with_shocks_down_conf = sims_with_shocks_sort(:, :, sort_idx(1));
|
||||
sims_with_shocks_up_conf = sims_with_shocks_sort(:, :, sort_idx(2));
|
||||
|
||||
dynare_graph_init(sprintf('BVAR forecasts (nlags = %d)', nlags), ny, {'b-' 'g-' 'g-' 'r-' 'r-'});
|
||||
OutputDirectoryName = CheckPath('graphs',M_.fname);
|
||||
|
||||
dyn_graph=dynare_graph_init(sprintf('BVAR forecasts (nlags = %d)', nlags), ny, {'b-' 'g-' 'g-' 'r-' 'r-'});
|
||||
|
||||
for i = 1:ny
|
||||
dynare_graph([ sims_no_shock_median(:, i) ...
|
||||
dyn_graph=dynare_graph(dyn_graph,[ sims_no_shock_median(:, i) ...
|
||||
sims_no_shock_up_conf(:, i) sims_no_shock_down_conf(:, i) ...
|
||||
sims_with_shocks_up_conf(:, i) sims_with_shocks_down_conf(:, i) ], ...
|
||||
options_.varobs(i, :));
|
||||
end
|
||||
|
||||
dynare_graph_close;
|
||||
|
||||
dyn_saveas(dyn_graph.fh,[OutputDirectoryName '/' M_.fname '_BVAR_forecast_',num2str(nlags)],options_)
|
||||
|
||||
% Compute RMSE
|
||||
|
||||
|
|
|
@ -435,8 +435,6 @@ for i = 1:Size;
|
|||
if (task ~= 1 && ((options_.dr_cycle_reduction == 1 && info ==1) || options_.dr_cycle_reduction == 0)) || task == 1
|
||||
D = [[aa(row_indx,index_0m) zeros(n_dynamic,n_both) aa(row_indx,index_p)] ; [zeros(n_both, n_pred) eye(n_both) zeros(n_both, n_both + n_fwrd)]];
|
||||
E = [-aa(row_indx,[index_m index_0p]) ; [zeros(n_both, n_both + n_pred) eye(n_both, n_both + n_fwrd) ] ];
|
||||
D
|
||||
E
|
||||
|
||||
[err, ss, tt, w, sdim, data(i).eigval, info1] = mjdgges(E,D,options_.qz_criterium);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
function dynare_graph(y,tit,x)
|
||||
function dyn_graph=dynare_graph(dyn_graph,y,tit,x)
|
||||
% function dynare_graph(y,tit,x)
|
||||
% graphs
|
||||
%
|
||||
|
@ -7,12 +7,12 @@ function dynare_graph(y,tit,x)
|
|||
% colors: line colors
|
||||
%
|
||||
% OUTPUT
|
||||
% none
|
||||
% dyn_graph: structure with figure information
|
||||
%
|
||||
% SPECIAL REQUIREMENT
|
||||
% none
|
||||
|
||||
% Copyright (C) 2006-2009 Dynare Team
|
||||
% Copyright (C) 2006-2013 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -29,9 +29,7 @@ function dynare_graph(y,tit,x)
|
|||
% You should have received a copy of the GNU General Public License
|
||||
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
global dyn_graph
|
||||
|
||||
if nargin < 3
|
||||
if nargin < 4
|
||||
x = (1:size(y,1))';
|
||||
end
|
||||
nplot = dyn_graph.plot_nbr + 1;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
function dynare_graph_init(figure_name,nplot,line_types,line_width)
|
||||
function dyn_graph=dynare_graph_init(figure_name,nplot,line_types,line_width)
|
||||
% function dynare_graph_init(figure_name,colors)
|
||||
% initializes set of graphs
|
||||
%
|
||||
|
@ -7,12 +7,12 @@ function dynare_graph_init(figure_name,nplot,line_types,line_width)
|
|||
% colors: line colors
|
||||
%
|
||||
% OUTPUTS
|
||||
% none
|
||||
% dyn_graph: structure with figure information
|
||||
%
|
||||
% SPECIAL REQUIREMENT
|
||||
% none
|
||||
|
||||
% Copyright (C) 2006-2009 Dynare Team
|
||||
% Copyright (C) 2006-2013 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -29,9 +29,9 @@ function dynare_graph_init(figure_name,nplot,line_types,line_width)
|
|||
% You should have received a copy of the GNU General Public License
|
||||
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
global dyn_graph options_
|
||||
global options_
|
||||
|
||||
dyn_graph.fh = figure('Name',figure_name);
|
||||
dyn_graph.fh = dyn_figure(options_,'Name',figure_name);
|
||||
dyn_graph.figure_name = figure_name;
|
||||
if nargin > 2
|
||||
dyn_graph.line_types = line_types;
|
||||
|
|
|
@ -15,7 +15,7 @@ function forcst_unc(y0,var_list)
|
|||
% SPECIAL REQUIREMENTS
|
||||
% None.
|
||||
|
||||
% Copyright (C) 2006-2011 Dynare Team
|
||||
% Copyright (C) 2006-2013 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -129,20 +129,21 @@ yf3_1 = yf3'-[zeros(maximum_lag,n); yf3_intv];
|
|||
yf3_2 = yf3'+[zeros(maximum_lag,n); yf3_intv];
|
||||
|
||||
% graphs
|
||||
OutputDirectoryName = CheckPath('graphs',M_.fname);
|
||||
|
||||
dynare_graph_init('Forecasts type I',n,{'b-' 'g-' 'g-' 'r-' 'r-'});
|
||||
dyn_graph=dynare_graph_init('Forecasts type I',n,{'b-' 'g-' 'g-' 'r-' 'r-'});
|
||||
for i=1:n
|
||||
dynare_graph([yf_mean(:,i) squeeze(yf1(:,i,k1)) squeeze(yf2(:,i,k2))],...
|
||||
dynare_graph(dyn_graph,[yf_mean(:,i) squeeze(yf1(:,i,k1)) squeeze(yf2(:,i,k2))],...
|
||||
var_list(i,:));
|
||||
end
|
||||
dynare_graph_close;
|
||||
dyn_saveas(dyn_graph.fh,[OutputDirectoryName '/' M_.fname '_forecast_param_uncert_',num2str(nlags)],options_)
|
||||
|
||||
dynare_graph_init('Forecasts type II',n,{'b-' 'k-' 'k-' 'r-' 'r-'});
|
||||
dyn_graph=dynare_graph_init('Forecasts type II',n,{'b-' 'k-' 'k-' 'r-' 'r-'});
|
||||
for i=1:n
|
||||
dynare_graph([yf_mean(:,i) yf3_1(:,i) yf3_2(:,i) squeeze(yf2(:,i,k2))],...
|
||||
dynare_graph(dyn_graph,[yf_mean(:,i) yf3_1(:,i) yf3_2(:,i) squeeze(yf2(:,i,k2))],...
|
||||
var_list(i,:));
|
||||
end
|
||||
dynare_graph_close;
|
||||
dyn_saveas(dyn_graph.fh,[OutputDirectoryName '/' M_.fname '_forecast_param_shock_uncert_',num2str(nlags)],options_)
|
||||
|
||||
|
||||
% saving results
|
||||
|
|
|
@ -57,6 +57,7 @@ options_.solve_tolx = eps^(2/3);
|
|||
options_.solve_maxit = 500;
|
||||
|
||||
options_.mode_check_neighbourhood_size = 0.5;
|
||||
options_.mode_check_symmetric_plots = 1;
|
||||
|
||||
% Default number of threads for parallelized mex files.
|
||||
options_.threads.kronecker.A_times_B_kronecker_C = 1;
|
||||
|
|
|
@ -81,14 +81,19 @@ if estimated_model
|
|||
switch options_cond_fcst.parameter_set
|
||||
case 'posterior_mode'
|
||||
xparam = get_posterior_parameters('mode');
|
||||
graph_title='Posterior Mode';
|
||||
case 'posterior_mean'
|
||||
xparam = get_posterior_parameters('mean');
|
||||
graph_title='Posterior Mean';
|
||||
case 'posterior_median'
|
||||
xparam = get_posterior_parameters('median');
|
||||
graph_title='Posterior Median';
|
||||
case 'prior_mode'
|
||||
xparam = bayestopt_.p5(:);
|
||||
graph_title='Prior Mode';
|
||||
case 'prior_mean'
|
||||
xparam = bayestopt_.p1;
|
||||
graph_title='Prior Mean';
|
||||
otherwise
|
||||
disp('imcforecast:: If the input argument is a string, then it has to be equal to:')
|
||||
disp(' ''calibration'', ')
|
||||
|
@ -232,5 +237,7 @@ for i = 1:EndoSize
|
|||
eval(['forecasts.uncond.ci.' deblank(M_.endo_names(oo_.dr.order_var(i),:)) ...
|
||||
' = [tmp(t1,:)'' ,tmp(t2,:)'' ]'';']);
|
||||
end
|
||||
forecasts.graph.title=graph_title;
|
||||
forecasts.graph.fname=M_.fname;
|
||||
|
||||
save('conditional_forecasts.mat','forecasts');
|
|
@ -85,6 +85,9 @@ if TeX
|
|||
end
|
||||
|
||||
ll = DynareOptions.mode_check_neighbourhood_size;
|
||||
if isinf(ll),
|
||||
DynareOptions.mode_check_symmetric_plots = 0;
|
||||
end
|
||||
|
||||
for plt = 1:nbplt,
|
||||
if TeX
|
||||
|
@ -108,12 +111,14 @@ for plt = 1:nbplt,
|
|||
xx = x;
|
||||
l1 = max(BayesInfo.lb(kk),(1-ll)*x(kk)); m1 = 0;
|
||||
l2 = min(BayesInfo.ub(kk),(1+ll)*x(kk));
|
||||
if l2<(1+ll)*x(kk)
|
||||
l1 = x(kk) - (l2-x(kk));
|
||||
m1 = 1;
|
||||
end
|
||||
if ~m1 && (l1>(1-ll)*x(kk)) && (x(kk)+(x(kk)-l1)<BayesInfo.ub(kk))
|
||||
l2 = x(kk) + (x(kk)-l1);
|
||||
if DynareOptions.mode_check_symmetric_plots,
|
||||
if l2<(1+ll)*x(kk)
|
||||
l1 = x(kk) - (l2-x(kk));
|
||||
m1 = 1;
|
||||
end
|
||||
if ~m1 && (l1>(1-ll)*x(kk)) && (x(kk)+(x(kk)-l1)<BayesInfo.ub(kk))
|
||||
l2 = x(kk) + (x(kk)-l1);
|
||||
end
|
||||
end
|
||||
z1 = l1:((x(kk)-l1)/10):x(kk);
|
||||
z2 = x(kk):((l2-x(kk))/10):l2;
|
||||
|
|
|
@ -38,16 +38,18 @@ if nargin==1 || isempty(periods) % Set default number of periods.
|
|||
eval(['periods = length(forecasts.cond.Mean.' Variables(1,:) ');']);
|
||||
end
|
||||
|
||||
forecasts.graph.OutputDirectoryName = CheckPath('graphs',forecasts.graph.fname);
|
||||
|
||||
for i=1:size(Variables,1)
|
||||
eval(['ci1 = forecasts.cond.ci.' Variables(i,:) ';'])
|
||||
eval(['m1 = forecasts.cond.Mean.' Variables(i,:) ';'])
|
||||
eval(['ci2 = forecasts.uncond.ci.' Variables(i,:) ';'])
|
||||
eval(['m2 = forecasts.uncond.Mean.' Variables(i,:) ';'])
|
||||
build_figure(Variables(i,:),ci1(:,1:periods),ci2(:,1:periods),m1(1:periods),m2(1:periods),options_);
|
||||
build_figure(Variables(i,:),ci1(:,1:periods),ci2(:,1:periods),m1(1:periods),m2(1:periods),options_,forecasts.graph);
|
||||
end
|
||||
|
||||
function build_figure(name,cci1,cci2,mm1,mm2,options_)
|
||||
hh = dyn_figure(options_,'Name',['Conditional forecast: ' name '.']);
|
||||
function build_figure(name,cci1,cci2,mm1,mm2,options_,graphoptions)
|
||||
hh = dyn_figure(options_,'Name',['Conditional forecast (' graphoptions.title ,'): ' name '.']);
|
||||
H = length(mm1);
|
||||
h1 = area(1:H,cci1(2,1:H));
|
||||
set(h1,'BaseValue',min([min(cci1(1,:)),min(cci2(1,:))]))
|
||||
|
@ -61,4 +63,5 @@ plot(1:H,mm2,'--k','linewidth',3)
|
|||
plot(1:H,cci2(1,:),'--k','linewidth',1)
|
||||
plot(1:H,cci2(2,:),'--k','linewidth',1)
|
||||
axis tight
|
||||
hold off
|
||||
hold off
|
||||
dyn_saveas(hh,[graphoptions.OutputDirectoryName '/Conditional_forecast_',strrep(deblank(graphoptions.title),' ','_'),'_',deblank(name)],options_)
|
|
@ -54,7 +54,7 @@ isf1 = [nyp+ny+1:nyf+nyp+ny+1] ;
|
|||
stop = 0 ;
|
||||
iz = [1:ny+nyp+nyf];
|
||||
|
||||
periods = options_.periods
|
||||
periods = options_.periods;
|
||||
steady_state = oo_.steady_state;
|
||||
params = M_.params;
|
||||
endo_simul = oo_.endo_simul;
|
||||
|
|
|
@ -227,11 +227,11 @@ while ~(cvg==1 || iter>maxit_),
|
|||
[za,flag1] = gmres(g1a,b,Blck_size,1e-6,Blck_size*periods,L1,U1);
|
||||
if (flag1>0 || reduced)
|
||||
if(flag1==1)
|
||||
disp(['Error in simul: No convergence inside GMRES after ' num2str(periods*10,'%6d') ' iterations, in block' num2str(Block_Size,'%3d')]);
|
||||
disp(['Error in simul: No convergence inside GMRES after ' num2str(periods*10,'%6d') ' iterations, in block ' num2str(Blck_size,'%3d')]);
|
||||
elseif(flag1==2)
|
||||
disp(['Error in simul: Preconditioner is ill-conditioned, in block' num2str(Block_Size,'%3d')]);
|
||||
disp(['Error in simul: Preconditioner is ill-conditioned, in block ' num2str(Blck_size,'%3d')]);
|
||||
elseif(flag1==3)
|
||||
disp(['Error in simul: GMRES stagnated (Two consecutive iterates were the same.), in block' num2str(Block_Size,'%3d')]);
|
||||
disp(['Error in simul: GMRES stagnated (Two consecutive iterates were the same.), in block ' num2str(Blck_size,'%3d')]);
|
||||
end;
|
||||
ilu_setup.droptol = ilu_setup.droptol/10;
|
||||
reduced = 0;
|
||||
|
@ -265,11 +265,11 @@ while ~(cvg==1 || iter>maxit_),
|
|||
end;
|
||||
if (flag1>0 || reduced)
|
||||
if(flag1==1)
|
||||
disp(['Error in simul: No convergence inside BICGSTAB after ' num2str(periods*10,'%6d') ' iterations, in block' num2str(Block_Size,'%3d')]);
|
||||
disp(['Error in simul: No convergence inside BICGSTAB after ' num2str(periods*10,'%6d') ' iterations, in block ' num2str(Blck_size,'%3d')]);
|
||||
elseif(flag1==2)
|
||||
disp(['Error in simul: Preconditioner is ill-conditioned, in block' num2str(Block_Size,'%3d')]);
|
||||
disp(['Error in simul: Preconditioner is ill-conditioned, in block ' num2str(Blck_size,'%3d')]);
|
||||
elseif(flag1==3)
|
||||
disp(['Error in simul: GMRES stagnated (Two consecutive iterates were the same.), in block' num2str(Block_Size,'%3d')]);
|
||||
disp(['Error in simul: GMRES stagnated (Two consecutive iterates were the same.), in block ' num2str(Blck_size,'%3d')]);
|
||||
end;
|
||||
ilu_setup.droptol = ilu_setup.droptol/10;
|
||||
reduced = 0;
|
||||
|
|
|
@ -4589,15 +4589,17 @@ dynSparseMatrix::Solve_Matlab_GMRES(mxArray *A_m, mxArray *b_m, int Size, double
|
|||
throw FatalExceptionHandling(tmp.str());
|
||||
#endif
|
||||
size_t n = mxGetM(A_m);
|
||||
const char *field_names[] = {"droptol"};
|
||||
const char *field_names[] = {"droptol", "type"};
|
||||
mwSize dims[1] = { 1 };
|
||||
mxArray *Setup = mxCreateStructArray(1, dims, 1, field_names);
|
||||
mxArray *Setup = mxCreateStructArray(1, dims, 2, field_names);
|
||||
mxSetFieldByNumber(Setup, 0, 0, mxCreateDoubleScalar(lu_inc_tol));
|
||||
mxSetFieldByNumber(Setup, 0, 1, mxCreateString("ilutp"));
|
||||
mxArray *lhs0[2];
|
||||
mxArray *rhs0[2];
|
||||
rhs0[0] = A_m;
|
||||
rhs0[1] = Setup;
|
||||
mexCallMATLAB(2, lhs0, 2, rhs0, "ilu");
|
||||
if (mexCallMATLAB(2, lhs0, 2, rhs0, "ilu"))
|
||||
throw FatalExceptionHandling("In GMRES, the incomplet LU decomposition (ilu) ahs failed.");
|
||||
mxArray *L1 = lhs0[0];
|
||||
mxArray *U1 = lhs0[1];
|
||||
/*[za,flag1] = gmres(g1a,b,Blck_size,1e-6,Blck_size*periods,L1,U1);*/
|
||||
|
|
|
@ -112,7 +112,7 @@ class ParsingDriver;
|
|||
%token LABELS LAPLACE LIK_ALGO LIK_INIT LINEAR LOAD_IDENT_FILES LOAD_MH_FILE LOAD_PARAMS_AND_STEADY_STATE LOGLINEAR LYAPUNOV
|
||||
%token LYAPUNOV_FIXED_POINT_TOL LYAPUNOV_DOUBLING_TOL LYAPUNOV_SQUARE_ROOT_SOLVER_TOL LOG_DEFLATOR LOG_TREND_VAR LOG_GROWTH_FACTOR MARKOWITZ MARGINAL_DENSITY MAX MAXIT
|
||||
%token MFS MH_DROP MH_INIT_SCALE MH_JSCALE MH_MODE MH_NBLOCKS MH_REPLIC MH_RECOVER MIN MINIMAL_SOLVING_PERIODS SOLVE_MAXIT
|
||||
%token MODE_CHECK MODE_COMPUTE MODE_FILE MODEL MODEL_COMPARISON MODEL_INFO MSHOCKS ABS SIGN
|
||||
%token MODE_CHECK MODE_CHECK_NEIGHBOURHOOD_SIZE MODE_CHECK_SYMMETRIC_PLOTS MODE_COMPUTE MODE_FILE MODEL MODEL_COMPARISON MODEL_INFO MSHOCKS ABS SIGN
|
||||
%token MODEL_DIAGNOSTICS MODIFIEDHARMONICMEAN MOMENTS_VARENDO DIFFUSE_FILTER SUB_DRAWS
|
||||
%token <string_val> NAME
|
||||
%token NAN_CONSTANT NO_STATIC NOBS NOCONSTANT NODISPLAY NOCORR NODIAGNOSTIC NOFUNCTIONS
|
||||
|
@ -1513,6 +1513,8 @@ estimation_options : o_datafile
|
|||
| o_mode_file
|
||||
| o_mode_compute
|
||||
| o_mode_check
|
||||
| o_mode_check_neighbourhood_size
|
||||
| o_mode_check_symmetric_plots
|
||||
| o_prior_trunc
|
||||
| o_mh_mode
|
||||
| o_mh_nblocks
|
||||
|
@ -2336,6 +2338,8 @@ o_mode_file : MODE_FILE EQUAL filename { driver.option_str("mode_file", $3); };
|
|||
o_mode_compute : MODE_COMPUTE EQUAL INT_NUMBER { driver.option_num("mode_compute", $3); };
|
||||
| MODE_COMPUTE EQUAL symbol { driver.option_str("mode_compute", $3); };
|
||||
o_mode_check : MODE_CHECK { driver.option_num("mode_check", "1"); };
|
||||
o_mode_check_neighbourhood_size : MODE_CHECK_NEIGHBOURHOOD_SIZE EQUAL signed_number_w_inf { driver.option_num("mode_check_neighbourhood_size", $3); };
|
||||
o_mode_check_symmetric_plots : MODE_CHECK_SYMMETRIC_PLOTS EQUAL INT_NUMBER { driver.option_num("mode_check_symmetric_plots", $3); };
|
||||
o_prior_trunc : PRIOR_TRUNC EQUAL non_negative_number { driver.option_num("prior_trunc", $3); };
|
||||
o_mh_mode : MH_MODE EQUAL INT_NUMBER { driver.option_num("mh_mode", $3); };
|
||||
o_mh_nblocks : MH_NBLOCKS EQUAL INT_NUMBER { driver.option_num("mh_nblck", $3); };
|
||||
|
|
|
@ -239,6 +239,8 @@ string eofbuff;
|
|||
<DYNARE_STATEMENT>mode_file {return token::MODE_FILE;}
|
||||
<DYNARE_STATEMENT>mode_compute {return token::MODE_COMPUTE;}
|
||||
<DYNARE_STATEMENT>mode_check {return token::MODE_CHECK;}
|
||||
<DYNARE_STATEMENT>mode_check_neighbourhood_size {return token::MODE_CHECK_NEIGHBOURHOOD_SIZE;}
|
||||
<DYNARE_STATEMENT>mode_check_symmetric_plots {return token::MODE_CHECK_SYMMETRIC_PLOTS;}
|
||||
<DYNARE_STATEMENT>prior_trunc {return token::PRIOR_TRUNC;}
|
||||
<DYNARE_STATEMENT>mh_mode {return token::MH_MODE;}
|
||||
<DYNARE_STATEMENT>mh_nblocks {return token::MH_NBLOCKS;}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
% Copyright (C) 2011-2012 Dynare Team
|
||||
% Copyright (C) 2011-2013 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -124,8 +124,8 @@ for blockFlag = 0:1
|
|||
catch exception
|
||||
load wsMat
|
||||
path(old_path);
|
||||
failedBlock{size(failedBlock,2)+1} = ['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(solve_algos(i)) ',' num2str(default_stack_solve_algo) ')'];
|
||||
printMakeCheckMatlabErrMsg(['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(solve_algos(i)) ',' num2str(default_stack_solve_algo) ')'], exception);
|
||||
failedBlock{size(failedBlock,2)+1} = ['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(default_solve_algo) ',' num2str(stack_solve_algos(i)) ')'];
|
||||
printMakeCheckMatlabErrMsg(['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(default_solve_algo) ',' num2str(stack_solve_algos(i)) ')'], exception);
|
||||
clear exception
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
## Copyright (C) 2009-2012 Dynare Team
|
||||
## Copyright (C) 2009-2013 Dynare Team
|
||||
##
|
||||
## This file is part of Dynare.
|
||||
##
|
||||
|
@ -95,7 +95,9 @@ for blockFlag = 0:1
|
|||
endif
|
||||
catch
|
||||
load wsOct
|
||||
e = lasterror(); # The path() command alters the lasterror, because of io package
|
||||
path(old_path);
|
||||
lasterror(e);
|
||||
failedBlock{size(failedBlock,2)+1} = ['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(solve_algos(i)) ',' num2str(default_stack_solve_algo) ')'];
|
||||
printMakeCheckOctaveErrMsg(['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(solve_algos(i)) ',' num2str(default_stack_solve_algo) ')'], lasterror);
|
||||
end_try_catch
|
||||
|
@ -106,6 +108,9 @@ for blockFlag = 0:1
|
|||
try
|
||||
old_path = path;
|
||||
save wsOct
|
||||
if blockFlag && ~bytecodeFlag && stack_solve_algos(i) == 3
|
||||
error('This test currently enters an infinite loop, skipping')
|
||||
end
|
||||
run_ls2003(blockFlag, bytecodeFlag, default_solve_algo, stack_solve_algos(i))
|
||||
load wsOct
|
||||
path(old_path);
|
||||
|
@ -119,9 +124,11 @@ for blockFlag = 0:1
|
|||
endif
|
||||
catch
|
||||
load wsOct
|
||||
e = lasterror(); # The path() command alters the lasterror, because of io package
|
||||
path(old_path);
|
||||
failedBlock{size(failedBlock,2)+1} = ['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(solve_algos(i)) ',' num2str(default_stack_solve_algo) ')'];
|
||||
printMakeCheckOctaveErrMsg(['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(solve_algos(i)) ',' num2str(default_stack_solve_algo) ')'], lasterror);
|
||||
lasterror(e);
|
||||
failedBlock{size(failedBlock,2)+1} = ['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(default_solve_algo) ',' num2str(stack_solve_algos(i)) ')'];
|
||||
printMakeCheckOctaveErrMsg(['block_bytecode' filesep 'run_ls2003.m(' num2str(blockFlag) ',' num2str(bytecodeFlag) ',' num2str(default_solve_algo) ',' num2str(stack_solve_algos(i)) ')'], lasterror);
|
||||
end_try_catch
|
||||
endfor
|
||||
endfor
|
||||
|
|
Loading…
Reference in New Issue