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
2f3c8f91
Commit
2f3c8f91
authored
Mar 03, 2012
by
Stéphane Adjemian
Browse files
Fixed bug related to the dynare implementation of the simplex algorithm.
parent
8aea0bf1
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/dynare_estimation_1.m
View file @
2f3c8f91
...
...
@@ -267,25 +267,15 @@ if ~isequal(options_.mode_compute,0) && ~options_.mh_posterior_mode_estimation
[
xparam1
,
fval
,
exitflag
]
=
fminsearch
(
objective_function
,
xparam1
,
optim_options
,
dataset_
,
options_
,
M_
,
estim_params_
,
bayestopt_
,
oo_
);
case
8
% Dynare implementation of the simplex algorithm.
[
xparam1
,
fval
,
exitflag
]
=
simplex_optimization
-
routine
(
objective_function
,
xparam1
,
opti
m_options
,
dataset_
,
options_
,
M_
,
estim_params_
,
bayestopt_
,
oo_
);
case
9
[
xparam1
,
fval
,
exitflag
]
=
simplex_optimization
_
routine
(
objective_function
,
xparam1
,
opti
ons_
.
simplex
,
dataset_
,
options_
,
M_
,
estim_params_
,
bayestopt_
,
oo_
);
case
9
H0
=
1e-4
*
ones
(
nx
,
1
);
opts
.
SaveVariables
=
'off'
;
opts
.
DispFinal
=
'on'
;
opts
.
WarnOnEqualFunctionValues
=
'no'
;
opts
.
DispModulo
=
'10'
;
opts
.
LogModulo
=
'0'
;
opts
.
LogTime
=
'0'
;
warning
(
'off'
,
'CMAES:NonfinitenessRange'
);
warning
(
'off'
,
'CMAES:InitialSigma'
);
if
~
options_
.
dsge_var
[
x
,
fval
,
COUNTEVAL
,
STOPFLAG
,
OUT
,
BESTEVER
]
=
cmaes
(
'dsge_likelihood'
,
xparam1
,
H0
,
opts
,
dataset_
,
options_
,
M_
,
estim_params_
,
bayestopt_
,
oo_
);
else
[
x
,
fval
,
COUNTEVAL
,
STOPFLAG
,
OUT
,
BESTEVER
]
=
cmaes
(
'DsgeVarLikelihood'
,
xparam1
,
H0
,
opts
,
dataset_
,
options_
,
M_
,
estim_params_
,
bayestopt_
,
oo_
);
end
[
x
,
fval
,
COUNTEVAL
,
STOPFLAG
,
OUT
,
BESTEVER
]
=
cmaes
(
objective_function
,
xparam1
,
H0
,
options_
.
cmaes
,
dataset_
,
options_
,
M_
,
estim_params_
,
bayestopt_
,
oo_
);
xparam1
=
BESTEVER
.
x
;
disp
(
sprintf
(
'\n Objective function at mode: %f'
,
fval
))
case
101
disp
(
sprintf
(
'\n Objective function at mode: %f'
,
fval
))
case
101
myoptions
=
soptions
;
myoptions
(
2
)
=
1e-6
;
%accuracy of argument
myoptions
(
3
)
=
1e-6
;
%accuracy of function (see Solvopt p.29)
...
...
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