v4: bug around options_.replic
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1085 ac1d8469-bf42-47a9-8791-bf33cf982152time-shift
parent
6d18a704b0
commit
ce3a9a76ae
|
@ -46,7 +46,7 @@ function global_initialization()
|
|||
|
||||
% Prior draws
|
||||
options_.forecast = 0;
|
||||
options_.replic = 0;
|
||||
options_.replic = 1;
|
||||
|
||||
% Model
|
||||
options_.linear = 0;
|
||||
|
@ -62,4 +62,4 @@ function global_initialization()
|
|||
oo_.endo_simul = [];
|
||||
oo_.dr = [];
|
||||
oo_.exo_det_steady_state = [];
|
||||
oo_.exo_det_simul = [];
|
||||
oo_.exo_det_simul = [];
|
||||
|
|
|
@ -18,13 +18,14 @@ function prior_analysis(var_list)
|
|||
global M_ options_ oo_ estim_params_ bayestopt_
|
||||
|
||||
old_options = options_;
|
||||
if options_.replic == 0;
|
||||
options_.replic = 1000;
|
||||
options_.order = 1;
|
||||
if options_.replic < 100
|
||||
warning('Prior analysis requires at least 100 replications, preferably many more! options replic reset to 100')
|
||||
options_.replic = 100;
|
||||
end
|
||||
|
||||
options_.order = 1;
|
||||
if options_.forecast
|
||||
forcst_unc(oo_.endo_simul(:,1:M_.maximum_lag),var_list);
|
||||
end
|
||||
|
||||
options_ = old_options;
|
||||
options_ = old_options;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
% Copyright (C) 2001 Michel Juillard
|
||||
%
|
||||
function info=stoch_simul(var_list)
|
||||
global M_ options_ oo_
|
||||
|
||||
global it_
|
||||
global M_ options_ oo_ it_
|
||||
|
||||
options_old = options_;
|
||||
options_ = set_default_option(options_,'TeX',0);
|
||||
options_ = set_default_option(options_,'order',2);
|
||||
options_ = set_default_option(options_,'linear',0);
|
||||
|
@ -42,6 +42,7 @@ function info=stoch_simul(var_list)
|
|||
[oo_.dr, info] = resol(oo_.steady_state,0);
|
||||
|
||||
if info(1)
|
||||
options_ = options_old;
|
||||
print_info(info);
|
||||
return
|
||||
end
|
||||
|
@ -75,6 +76,7 @@ function info=stoch_simul(var_list)
|
|||
if options_.periods < options_.drop
|
||||
disp(['STOCH_SIMUL error: The horizon of simulation is shorter' ...
|
||||
' than the number of observations to be DROPed'])
|
||||
options_ =options_old;
|
||||
return
|
||||
end
|
||||
oo_.endo_simul = simult(repmat(oo_.dr.ys,1,M_.maximum_lag),oo_.dr);
|
||||
|
@ -274,4 +276,6 @@ if isfield(options_,'SpectralDensity')
|
|||
if options_.SpectralDensity == 1
|
||||
[omega,f] = UnivariateSpectralDensity(oo_.dr,var_list);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
options_ = options_old;
|
||||
|
|
Loading…
Reference in New Issue