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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
Stéphane Adjemian
dynare
Commits
3dc398f5
Commit
3dc398f5
authored
Dec 13, 2021
by
Johannes Pfeifer
Browse files
Options
Downloads
Patches
Plain Diff
dynare_estimation_1.m: improve comment on Hessian recomputation
parent
7303275b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/dynare_estimation_1.m
+5
-2
5 additions, 2 deletions
matlab/dynare_estimation_1.m
with
5 additions
and
2 deletions
matlab/dynare_estimation_1.m
+
5
−
2
View file @
3dc398f5
...
@@ -228,7 +228,9 @@ if ~isequal(options_.mode_compute,0) && ~options_.mh_posterior_mode_estimation
...
@@ -228,7 +228,9 @@ if ~isequal(options_.mode_compute,0) && ~options_.mh_posterior_mode_estimation
dataset_
,
dataset_info
,
options_
,
M_
,
estim_params_
,
bayestopt_
,
bounds
,
oo_
);
dataset_
,
dataset_info
,
options_
,
M_
,
estim_params_
,
bayestopt_
,
bounds
,
oo_
);
options_
.
analytic_derivation
=
ana_deriv_old
;
options_
.
analytic_derivation
=
ana_deriv_old
;
elseif
~
isnumeric
(
options_
.
mode_compute
)
||
~
(
isequal
(
options_
.
mode_compute
,
5
)
&&
newratflag
~=
1
&&
strcmp
(
func2str
(
objective_function
),
'dsge_likelihood'
))
elseif
~
isnumeric
(
options_
.
mode_compute
)
||
~
(
isequal
(
options_
.
mode_compute
,
5
)
&&
newratflag
~=
1
&&
strcmp
(
func2str
(
objective_function
),
'dsge_likelihood'
))
% with flag==0 or 2, we force to use the hessian from outer product gradient of optimizer 5
% enter here if i) not mode_compute_5, ii) if mode_compute_5 and newratflag==1;
% with flag==0 or 2 and dsge_likelihood, we force to use
% the hessian from outer product gradient of optimizer 5 below
if
options_
.
hessian
.
use_penalized_objective
if
options_
.
hessian
.
use_penalized_objective
penalized_objective_function
=
str2func
(
'penalty_objective_function'
);
penalized_objective_function
=
str2func
(
'penalty_objective_function'
);
hh
=
hessian
(
penalized_objective_function
,
xparam1
,
options_
.
gstep
,
objective_function
,
fval
,
dataset_
,
dataset_info
,
options_
,
M_
,
estim_params_
,
bayestopt_
,
bounds
,
oo_
);
hh
=
hessian
(
penalized_objective_function
,
xparam1
,
options_
.
gstep
,
objective_function
,
fval
,
dataset_
,
dataset_info
,
options_
,
M_
,
estim_params_
,
bayestopt_
,
bounds
,
oo_
);
...
@@ -237,7 +239,8 @@ if ~isequal(options_.mode_compute,0) && ~options_.mh_posterior_mode_estimation
...
@@ -237,7 +239,8 @@ if ~isequal(options_.mode_compute,0) && ~options_.mh_posterior_mode_estimation
end
end
hh
=
reshape
(
hh
,
nx
,
nx
);
hh
=
reshape
(
hh
,
nx
,
nx
);
elseif
isnumeric
(
options_
.
mode_compute
)
&&
isequal
(
options_
.
mode_compute
,
5
)
elseif
isnumeric
(
options_
.
mode_compute
)
&&
isequal
(
options_
.
mode_compute
,
5
)
% other numerical hessian options available with optimizer 5
% other numerical hessian options available with optimizer
% 5 and dsge_likelihood
%
%
% if newratflag == 0
% if newratflag == 0
% compute outer product gradient of optimizer 5
% compute outer product gradient of optimizer 5
...
...
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