Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dynare
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dynare
dynare
Commits
cb81e4a9
Commit
cb81e4a9
authored
May 13, 2011
by
Stéphane Adjemian
Committed by
Sébastien Villemot
May 20, 2011
Browse files
Options
Downloads
Patches
Plain Diff
Allow empty hessian in mode_check routine (options_.cova_compute==0)
(cherry picked from commit
6302abd7
)
parent
16968cbf
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
matlab/dynare_estimation_1.m
+5
-1
5 additions, 1 deletion
matlab/dynare_estimation_1.m
matlab/mode_check.m
+14
-9
14 additions, 9 deletions
matlab/mode_check.m
with
19 additions
and
10 deletions
matlab/dynare_estimation_1.m
+
5
−
1
View file @
cb81e4a9
...
@@ -438,7 +438,11 @@ if ~options_.mh_posterior_mode_estimation && options_.cova_compute
...
@@ -438,7 +438,11 @@ if ~options_.mh_posterior_mode_estimation && options_.cova_compute
end
end
if
options_
.
mode_check
==
1
&&
~
options_
.
mh_posterior_mode_estimation
&&
options_
.
cova_compute
if
options_
.
mode_check
==
1
&&
~
options_
.
mh_posterior_mode_estimation
&&
options_
.
cova_compute
if
options_
.
cova_compute
mode_check
(
xparam1
,
0
,
hh
,
gend
,
data
,
lb
,
ub
,
data_index
,
number_of_observations
,
no_more_missing_observations
);
mode_check
(
xparam1
,
0
,
hh
,
gend
,
data
,
lb
,
ub
,
data_index
,
number_of_observations
,
no_more_missing_observations
);
else
mode_check
(
xparam1
,
0
,[],
gend
,
data
,
lb
,
ub
,
data_index
,
number_of_observations
,
no_more_missing_observations
);
end
end
end
if
~
options_
.
mh_posterior_mode_estimation
&&
options_
.
cova_compute
if
~
options_
.
mh_posterior_mode_estimation
&&
options_
.
cova_compute
...
...
This diff is collapsed.
Click to expand it.
matlab/mode_check.m
+
14
−
9
View file @
cb81e4a9
...
@@ -38,13 +38,17 @@ function mode_check(x,fval,hessian,gend,data,lb,ub,data_index,number_of_observat
...
@@ -38,13 +38,17 @@ function mode_check(x,fval,hessian,gend,data,lb,ub,data_index,number_of_observat
global
bayestopt_
M_
options_
global
bayestopt_
M_
options_
TeX
=
options_
.
TeX
;
TeX
=
options_
.
TeX
;
if
~
isempty
(
hessian
);
[
s_min
,
k
]
=
min
(
diag
(
hessian
));
[
s_min
,
k
]
=
min
(
diag
(
hessian
));
end
if
options_
.
dsge_var
if
options_
.
dsge_var
fval
=
DsgeVarLikelihood
(
x
,
gend
);
fval
=
DsgeVarLikelihood
(
x
,
gend
);
else
else
fval
=
DsgeLikelihood
(
x
,
gend
,
data
,
data_index
,
number_of_observations
,
no_more_missing_observations
);
fval
=
DsgeLikelihood
(
x
,
gend
,
data
,
data_index
,
number_of_observations
,
no_more_missing_observations
);
end
end
bayestopt_
.
penalty
=
fval
;
bayestopt_
.
penalty
=
fval
;
if
~
isempty
(
hessian
);
disp
(
' '
)
disp
(
' '
)
disp
(
'MODE CHECK'
)
disp
(
'MODE CHECK'
)
disp
(
' '
)
disp
(
' '
)
...
@@ -53,6 +57,7 @@ disp(' ')
...
@@ -53,6 +57,7 @@ disp(' ')
if
s_min
<
eps
if
s_min
<
eps
disp
(
sprintf
(
'Most negative variance %f for parameter %d (%s = %f)'
,
s_min
,
k
,
bayestopt_
.
name
{
k
},
x
(
k
)))
disp
(
sprintf
(
'Most negative variance %f for parameter %d (%s = %f)'
,
s_min
,
k
,
bayestopt_
.
name
{
k
},
x
(
k
)))
end
end
end
[
nbplt
,
nr
,
nc
,
lr
,
lc
,
nstar
]
=
pltorg
(
length
(
x
));
[
nbplt
,
nr
,
nc
,
lr
,
lc
,
nstar
]
=
pltorg
(
length
(
x
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment