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
FerhatMihoubi
dynare
Commits
2815d5fb
Commit
2815d5fb
authored
Apr 26, 2013
by
Johannes Pfeifer
Browse files
Make error message for prior violation more explicit by adding second argument to info()
parent
d3457ee4
Changes
3
Hide whitespace changes
Inline
Side-by-side
matlab/dsge_likelihood.m
View file @
2815d5fb
...
...
@@ -180,7 +180,7 @@ if ~isequal(DynareOptions.mode_compute,1) && any(xparam1<BayesInfo.lb)
k
=
find
(
xparam1
<
BayesInfo
.
lb
);
fval
=
objective_function_penalty_base
+
sum
((
BayesInfo
.
lb
(
k
)
-
xparam1
(
k
)).
^
2
);
exit_flag
=
0
;
info
=
41
;
info
=
[
41
k
'
]
;
if
analytic_derivation
,
DLIK
=
ones
(
length
(
xparam1
),
1
);
end
...
...
@@ -192,7 +192,7 @@ if ~isequal(DynareOptions.mode_compute,1) && any(xparam1>BayesInfo.ub)
k
=
find
(
xparam1
>
BayesInfo
.
ub
);
fval
=
objective_function_penalty_base
+
sum
((
xparam1
(
k
)
-
BayesInfo
.
ub
(
k
)).
^
2
);
exit_flag
=
0
;
info
=
42
;
info
=
[
42
k
'
]
;
if
analytic_derivation
,
DLIK
=
ones
(
length
(
xparam1
),
1
);
end
...
...
matlab/non_linear_dsge_likelihood.m
View file @
2815d5fb
...
...
@@ -145,7 +145,7 @@ if (DynareOptions.mode_compute~=1) && any(xparam1<BayesInfo.lb)
k
=
find
(
xparam1
(
:
)
<
BayesInfo
.
lb
);
fval
=
objective_function_penalty_base
+
sum
((
BayesInfo
.
lb
(
k
)
-
xparam1
(
k
)).
^
2
);
exit_flag
=
0
;
info
=
41
;
info
=
[
41
k
'
]
;
return
end
...
...
@@ -154,7 +154,7 @@ if (DynareOptions.mode_compute~=1) && any(xparam1>BayesInfo.ub)
k
=
find
(
xparam1
(
:
)
>
BayesInfo
.
ub
);
fval
=
objective_function_penalty_base
+
sum
((
xparam1
(
k
)
-
BayesInfo
.
ub
(
k
)).
^
2
);
exit_flag
=
0
;
info
=
42
;
info
=
[
42
k
'
]
;
return
end
...
...
matlab/print_info.m
View file @
2815d5fb
...
...
@@ -83,9 +83,19 @@ if ~noprint
case
30
error
(
'Variance can
''
t be computed'
)
case
41
error
(
'one (many) parameter(s) do(es) not satisfy the lower bound'
);
global
bayestopt_
;
disp_string
=
deblank
(
bayestopt_
.
name
{
info
(
2
),
1
});
for
ii
=
1
:
length
(
info
)
-
2
disp_string
=
[
disp_string
,
', '
,
deblank
(
bayestopt_
.
name
{
info
(
2
+
ii
),:})];
end
error
([
'The following parameter(s) do(es) not satisfy the lower bound: '
disp_string
]);
case
42
error
(
'one (many) parameter(s) do(es) not satisfy the upper bound'
);
global
bayestopt_
;
disp_string
=
deblank
(
bayestopt_
.
name
{
info
(
2
),
1
});
for
ii
=
1
:
length
(
info
)
-
2
disp_string
=
[
disp_string
,
', '
,
deblank
(
bayestopt_
.
name
{
info
(
2
+
ii
),:})];
end
error
([
'The following parameter(s) do(es) not satisfy the upper bound: '
disp_string
]);
case
43
error
(
'Covariance matrix of structural shocks is not positive definite'
)
case
44
%DsgeLikelihood_hh / dsge_likelihood
...
...
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