Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alexander Tishin
dynare
Commits
d0dc40c2
Commit
d0dc40c2
authored
Jan 27, 2020
by
Sébastien Villemot
Browse files
Merge branch 'sub_draws' into 'master'
trap error when sub_draws is set to zero See merge request
Dynare/dynare!1699
parents
f9e7ede8
79cca46d
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/dynare_estimation_1.m
View file @
d0dc40c2
...
...
@@ -519,23 +519,27 @@ if (any(bayestopt_.pshape >0 ) && options_.mh_replic) || ...
end
end
[
error_flag
,
~
,
options_
]
=
metropolis_draw
(
1
,
options_
,
estim_params_
,
M_
);
if
options_
.
bayesian_irf
if
error_flag
error
(
'Estimation::mcmc: I cannot compute the posterior IRFs!'
)
if
~
(
~
isempty
(
options_
.
sub_draws
)
&&
options_
.
sub_draws
==
0
)
if
options_
.
bayesian_irf
if
error_flag
error
(
'Estimation::mcmc: I cannot compute the posterior IRFs!'
)
end
PosteriorIRF
(
'posterior'
);
end
PosteriorIRF
(
'posterior'
);
end
if
options_
.
moments_varendo
if
error_flag
error
(
'Estimation::mcmc: I cannot compute the posterior moments for the endogenous variables!'
)
if
options_
.
moments_varendo
if
error_flag
error
(
'Estimation::mcmc: I cannot compute the posterior moments for the endogenous variables!'
)
end
oo_
=
compute_moments_varendo
(
'posterior'
,
options_
,
M_
,
oo_
,
var_list_
);
end
oo_
=
compute_moments_varendo
(
'posterior'
,
options_
,
M_
,
oo_
,
var_list_
);
end
if
options_
.
smoother
||
~
isempty
(
options_
.
filter_step_ahead
)
||
options_
.
forecast
if
error_flag
er
r
or
(
'Estimation::mcmc: I cannot compute the posterior statistics!'
)
if
options_
.
smoother
||
~
isempty
(
options_
.
filter_step_ahead
)
||
options_
.
forecast
if
error_flag
error
(
'Estimation::mcmc: I cannot compute the posterior statistics!'
)
end
prior_post
er
i
or
_statistics
(
'posterior'
,
dataset_
,
dataset_info
);
end
prior_posterior_statistics
(
'posterior'
,
dataset_
,
dataset_info
);
else
fprintf
(
'Estimation:mcmc: sub_draws was set to 0. Skipping posterior computations.'
)
end
xparam1
=
get_posterior_parameters
(
'mean'
,
M_
,
estim_params_
,
oo_
,
options_
);
M_
=
set_all_parameters
(
xparam1
,
estim_params_
,
M_
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment