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
|
% Prior draws
|
||||||
options_.forecast = 0;
|
options_.forecast = 0;
|
||||||
options_.replic = 0;
|
options_.replic = 1;
|
||||||
|
|
||||||
% Model
|
% Model
|
||||||
options_.linear = 0;
|
options_.linear = 0;
|
||||||
|
|
|
@ -18,11 +18,12 @@ function prior_analysis(var_list)
|
||||||
global M_ options_ oo_ estim_params_ bayestopt_
|
global M_ options_ oo_ estim_params_ bayestopt_
|
||||||
|
|
||||||
old_options = options_;
|
old_options = options_;
|
||||||
if options_.replic == 0;
|
if options_.replic < 100
|
||||||
options_.replic = 1000;
|
warning('Prior analysis requires at least 100 replications, preferably many more! options replic reset to 100')
|
||||||
options_.order = 1;
|
options_.replic = 100;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
options_.order = 1;
|
||||||
if options_.forecast
|
if options_.forecast
|
||||||
forcst_unc(oo_.endo_simul(:,1:M_.maximum_lag),var_list);
|
forcst_unc(oo_.endo_simul(:,1:M_.maximum_lag),var_list);
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
% Copyright (C) 2001 Michel Juillard
|
% Copyright (C) 2001 Michel Juillard
|
||||||
%
|
%
|
||||||
function info=stoch_simul(var_list)
|
function info=stoch_simul(var_list)
|
||||||
global M_ options_ oo_
|
global M_ options_ oo_ it_
|
||||||
|
|
||||||
global it_
|
options_old = options_;
|
||||||
options_ = set_default_option(options_,'TeX',0);
|
options_ = set_default_option(options_,'TeX',0);
|
||||||
options_ = set_default_option(options_,'order',2);
|
options_ = set_default_option(options_,'order',2);
|
||||||
options_ = set_default_option(options_,'linear',0);
|
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);
|
[oo_.dr, info] = resol(oo_.steady_state,0);
|
||||||
|
|
||||||
if info(1)
|
if info(1)
|
||||||
|
options_ = options_old;
|
||||||
print_info(info);
|
print_info(info);
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
@ -75,6 +76,7 @@ function info=stoch_simul(var_list)
|
||||||
if options_.periods < options_.drop
|
if options_.periods < options_.drop
|
||||||
disp(['STOCH_SIMUL error: The horizon of simulation is shorter' ...
|
disp(['STOCH_SIMUL error: The horizon of simulation is shorter' ...
|
||||||
' than the number of observations to be DROPed'])
|
' than the number of observations to be DROPed'])
|
||||||
|
options_ =options_old;
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
oo_.endo_simul = simult(repmat(oo_.dr.ys,1,M_.maximum_lag),oo_.dr);
|
oo_.endo_simul = simult(repmat(oo_.dr.ys,1,M_.maximum_lag),oo_.dr);
|
||||||
|
@ -275,3 +277,5 @@ if isfield(options_,'SpectralDensity')
|
||||||
[omega,f] = UnivariateSpectralDensity(oo_.dr,var_list);
|
[omega,f] = UnivariateSpectralDensity(oo_.dr,var_list);
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
options_ = options_old;
|
||||||
|
|
Loading…
Reference in New Issue