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
40e1e60f
Commit
40e1e60f
authored
Jul 05, 2012
by
Marco Ratto
Browse files
1) changed options of optimizer n. 1 with analytic derivs;
2) force no analytic derivative with mode_check;
parent
ed4d3734
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/dynare_estimation_1.m
View file @
40e1e60f
...
...
@@ -186,7 +186,7 @@ if ~isequal(options_.mode_compute,0) && ~options_.mh_posterior_mode_estimation
eval
([
'optim_options = optimset(optim_options,'
options_
.
optim_opt
');'
]);
end
if
options_
.
analytic_derivation
,
optim_options
=
optimset
(
optim_options
,
'GradObj'
,
'on'
);
optim_options
=
optimset
(
optim_options
,
'GradObj'
,
'on'
,
'TolX'
,
1e-7
);
end
[
xparam1
,
fval
,
exitflag
,
output
,
lamdba
,
grad
,
hessian_fmincon
]
=
...
fmincon
(
objective_function
,
xparam1
,[],[],[],[],
lb
,
ub
,[],
optim_options
,
dataset_
,
options_
,
M_
,
estim_params_
,
bayestopt_
,
oo_
);
...
...
@@ -426,7 +426,10 @@ if ~options_.mh_posterior_mode_estimation && options_.cova_compute
end
if
options_
.
mode_check
==
1
&&
~
options_
.
mh_posterior_mode_estimation
ana_deriv
=
options_
.
analytic_derivation
;
options_
.
analytic_derivation
=
0
;
mode_check
(
objective_function
,
xparam1
,
hh
,
dataset_
,
options_
,
M_
,
estim_params_
,
bayestopt_
,
oo_
);
options_
.
analytic_derivation
=
ana_deriv
;
end
oo_
.
posterior
.
optimization
.
mode
=
xparam1
;
...
...
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