Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Selma Malmberg
dynare
Commits
ea8ab0bb
Commit
ea8ab0bb
authored
Jun 08, 2017
by
Stéphane Adjemian
Browse files
Account for negative steady state in case of log-linearization.
(cherry picked from commit
be61de13
)
parent
1c2c80b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
matlab/cli/prior.m
View file @
ea8ab0bb
...
...
@@ -103,6 +103,9 @@ if ismember('simulate', varargin) % Prior simulations (BK).
disp
([
'mjdgges crash share = '
num2str
(
results
.
dll
.
problem_share
)])
disp
([
'Steady state problem share = '
num2str
(
results
.
ss
.
problem_share
)])
disp
([
'Complex steady state share = '
num2str
(
results
.
ss
.
complex_share
)])
if
options_
.
loglinear
disp
([
'Nonpositive steady state share = '
num2str
(
results
.
ss
.
nonpositive_share
)])
end
disp
([
'Analytical steady state problem share = '
num2str
(
results
.
ass
.
problem_share
)])
skipline
(
2
)
donesomething
=
true
;
...
...
matlab/prior_sampler.m
View file @
ea8ab0bb
...
...
@@ -49,6 +49,7 @@ count_complex_steadystate = 0;
count_nan_steadystate
=
0
;
count_nan_params
=
0
;
count_complex_params
=
0
;
count_nonpositive_steadystate
=
0
;
count_unknown_problem
=
0
;
NumberOfSimulations
=
options_
.
prior_mc
;
NumberOfParameters
=
length
(
bayestopt_
.
p1
);
...
...
@@ -135,6 +136,8 @@ while iteration < NumberOfSimulations
count_complex_params
=
count_complex_params
+
1
;
case
24
count_nan_params
=
count_nan_params
+
1
;
case
26
count_nonpositive_steadystate
=
count_nonpositive_steadystate
+
1
;
otherwise
count_unknown_problem
=
count_unknown_problem
+
1
;
end
...
...
@@ -162,6 +165,7 @@ results.dll.problem_share = count_dll_problem/loop_indx;
results
.
ss
.
problem_share
=
count_no_steadystate
/
loop_indx
;
results
.
ss
.
complex_share
=
count_complex_steadystate
/
loop_indx
;
results
.
ass
.
problem_share
=
count_steadystate_file_exit
/
loop_indx
;
results
.
ss
.
nonpositive_share
=
count_nonpositive_steadystate
/
loop_indx
;
results
.
jacobian
.
problem_share
=
count_complex_jacobian
/
loop_indx
;
results
.
garbage_share
=
...
results
.
bk
.
indeterminacy_share
+
...
...
...
@@ -170,6 +174,8 @@ results.garbage_share = ...
results
.
dll
.
problem_share
+
...
results
.
ss
.
problem_share
+
...
results
.
ass
.
problem_share
+
...
results
.
ss
.
complex_share
+
...
results
.
ss
.
nonpositive_share
+
...
results
.
jacobian
.
problem_share
+
...
count_unknown_problem
/
loop_indx
;
results
.
prior
.
mean
=
sampled_prior_expectation
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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