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
Dóra Kocsis
dynare
Commits
459a93d2
Commit
459a93d2
authored
May 12, 2013
by
MichelJuillard
Browse files
Merge pull request #395 from JohannesPfeifer/prior_violation
Make error message if mode violated prior more explicit
parents
3a39cc09
d9fb19e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/dynare_estimation_1.m
View file @
459a93d2
...
...
@@ -927,9 +927,12 @@ if (any(bayestopt_.pshape >0 ) && options_.mh_replic) || ...
bayestopt_
.
lb
=
bounds
(:,
1
);
bayestopt_
.
ub
=
bounds
(:,
2
);
if
any
(
xparam1
<
bounds
(:,
1
))
||
any
(
xparam1
>
bounds
(:,
2
))
find
(
xparam1
<
bounds
(:,
1
))
find
(
xparam1
>
bounds
(:,
2
))
error
(
'Mode values are outside prior bounds. Reduce prior_trunc.'
)
outside_bound_vars
=
bayestopt_
.
name
([
find
(
xparam1
<
bounds
(:,
1
));
find
(
xparam1
>
bounds
(:,
2
))],:);
disp_string
=
[
outside_bound_vars
{
1
,:}];
for
ii
=
2
:
size
(
outside_bound_vars
,
1
)
disp_string
=
[
disp_string
,
', '
,
outside_bound_vars
{
ii
,:}];
end
error
([
'Mode value(s) of '
,
disp_string
,
' are outside parameter bounds. Potentially, you should set prior_trunc=0.'
])
end
% runs MCMC
if
options_
.
mh_replic
...
...
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