Commit add65291 authored by michel's avatar michel
Browse files

added possibility to call user defined optimizing routine with mode_compute option

git-svn-id: https://www.dynare.org/svn/dynare/trunk@3023 ac1d8469-bf42-47a9-8791-bf33cf982152
parent ce5c510d
......@@ -579,8 +579,17 @@ if options_.mode_compute > 0 & options_.posterior_mode_estimation
,neps,maxevl,LB,UB,c,idisp ,t,vm,gend);
end
otherwise
error(['ESTIMATION: mode_compute=' int2str(options_.mode_compute) ...
' option is unknown!'])
if ischar(options_.mode_compute)
if options_.bvar_dsge
[xparam1, fval, retcode ] = feval(options_.mode_compute,fh,xparam1,gend,data);
else
[xparam1, fval, retcode ] = feval(options_.mode_compute, ...
fh,xparam1,gend,data,data_index,number_of_observations,no_more_missing_observations);
end
else
error(['ESTIMATION: mode_compute=' int2str(options_.mode_compute) ...
' option is unknown!'])
end
end
if options_.mode_compute ~= 5
if options_.mode_compute ~= 6
......
......@@ -1539,6 +1539,7 @@ o_optim : OPTIM EQUAL '(' optim_options ')';
o_mh_init_scale : MH_INIT_SCALE EQUAL number { driver.option_num("mh_init_scale", $3); };
o_mode_file : MODE_FILE EQUAL symbol { driver.option_str("mode_file", $3); };
o_mode_compute : MODE_COMPUTE EQUAL INT_NUMBER { driver.option_num("mode_compute", $3); };
| MODE_COMPUTE EQUAL symbol { driver.option_str("mode_compute", $3); };
o_mode_check : MODE_CHECK { driver.option_num("mode_check", "1"); };
o_prior_trunc : PRIOR_TRUNC EQUAL number { driver.option_num("prior_trunc", $3); };
o_mh_mode : MH_MODE EQUAL INT_NUMBER { driver.option_num("mh_mode", $3); };
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment