Commit Graph

105 Commits (82aa669b303fa3dd493defde73862747bc091812)

Author SHA1 Message Date
Stéphane Adjemian (Charybdis) 2b7dbff459
Cosmetic change.
[skip ci]
2021-01-23 09:53:54 +01:00
Johannes Pfeifer 29537b761b
csminwel1.m: fix bug with user-supplied gradient function
transformation to function handle made subsequent ischar-checks non-functioning
2021-01-22 21:19:07 +01:00
Johannes Pfeifer a89f21b53d solvopt.m: prevent returning with inf 2021-01-22 14:56:49 +01:00
Johannes Pfeifer 371fdb227b solvopt.m: use gradient as second output instead of expecting separate function 2021-01-22 14:56:49 +01:00
Stéphane Adjemian (Odysseus) 0e1c9312e2
Merge remote-tracking branch 'Dynare/master' into enterprise 2021-01-11 11:06:55 +01:00
Willi Mutschler 03641585e4
Fix lsqnonlin in Octave 2020-11-26 17:07:46 +01:00
Stéphane Adjemian (Odysseus) 248ad18846 Merge remote-tracking branch 'Dynare/master' into enterprise
Fixed conflicts in:

 - .gitlab-ci.yml
 - matlab/dynare_config.m
 - matlab/dynare_solve.m
 - matlab/initvalf.m
 - matlab/perfect-foresight-models/make_ex_.m
 - matlab/perfect-foresight-models/perfect_foresight_setup.m
 - mex/build/matlab/Makefile.am
 - mex/build/matlab/configure.ac
 - mex/build/octave/Makefile.am
 - mex/build/octave/configure.ac
 - mex/sources/Makefile.am
 - preprocessor
 - tests/Makefile.am
2020-09-17 14:53:32 +02:00
Willi Mutschler 3615962a61 First draft of method of moments toolbox with GMM and SMM 2020-07-16 11:38:38 +02:00
Johannes Pfeifer d10242fbab dynare_minimize_objective.m: change parameter names to expected cell array 2020-07-08 11:44:47 +02:00
Johannes Pfeifer 6b592cbb00 newrat: Further replacement of varargins by explicit options 2020-07-08 11:44:34 +02:00
Johannes Pfeifer 4a9f9263df Make newrat and gmhmaxlik independent of varargin inputs
Makes the optimizers useable in other contexts where varargin is different
2020-06-23 15:04:11 +02:00
Sébastien Villemot 43ed7b2b69
Merge remote-tracking branch 'community/master' into enterprise 2020-03-27 16:28:41 +01:00
Stéphane Adjemian (Charybdis) fb19cce284
Fixed online filter (wrong number of arguments).
[skip ci]
2020-02-15 13:58:48 +01:00
Sébastien Villemot 49dc997073
Global reindentation of MATLAB code (excluding submodules)
Also convert to Unix end-of-lines, and remove trailing whitespaces.
2019-12-20 16:30:27 +01:00
Sébastien Villemot 8875ac14d8
Merge remote-tracking branch 'community/master' into enterprise 2019-10-09 12:32:12 +02:00
Sébastien Villemot 71996fd077
Error out if mode_compute=12 and under Octave, or MATLAB w/o global optim tbox
[skip ci]
2019-10-09 12:30:41 +02:00
Sébastien Villemot b3d1e8412b
Add support for mode_compute=1 under Octave
Since version 1.6, the optim Forge package has an implementation of fmincon.
Hence we can now use mode_compute=1 under Octave.

This commit also adds tests/optimizers/fs2000_1.mod to the testsuite. It will
be skipped under MATLAB if the optimization toolbox is not there, or under
Octave if optim ≥ 1.6 is not there.
2019-10-08 18:38:15 +02:00
Sébastien Villemot cbb59fe6f8
Merge remote-tracking branch 'community/master' into enterprise 2019-09-26 16:54:27 +02:00
Johannes Pfeifer d5e25c8f43 mr_hessian.m: prevent infinite loop
Make sure hessian is not 0 and add counter.
Fixes #1636
2019-02-05 10:00:54 +01:00
Stéphane Adjemia (Scylla) 650c78f99d
Merge branch 'master' into ecb-master 2018-11-30 21:34:56 +01:00
Stéphane Adjemia (Scylla) 139c58dd76
Added Gauss Newton algorithm for minimizing sum of squared residuals. 2018-11-26 09:48:50 +01:00
Sébastien Villemot 7a75872f72
Modernization: use tilde (~) syntax for ignored output arguments 2018-11-13 18:02:09 +01:00
Stéphane Adjemia (Scylla) e5317b17de
Cosmetic change. 2018-10-06 17:52:58 +02:00
Stéphane Adjemia (Scylla) 108854a484
Bug fix. verbosity option was not honoured in simplex algorithm (8).
Thanks to Reuben for reporting.
2018-10-06 17:50:37 +02:00
Stéphane Adjemian(Charybdis) 7421e6b5b2 Fixed copyright header. 2018-07-19 15:36:02 +02:00
Stéphane Adjemian(Charybdis) 44c49eaef8 Improved iterations display of Dynare's simplex routine. 2018-07-19 15:15:05 +02:00
Stéphane Adjemian(Charybdis) 2d321cb0e3 Increased default number of iterations in simplex. 2018-07-19 15:15:05 +02:00
Johannes Pfeifer 97229177b4 simplex_optimization_routine.m: account for penalty indicator being third output, not fourth one
Caused occasional crashes
2018-07-19 09:25:27 +02:00
Sébastien Villemot 7cbac0c989 Fix user_has_octave_forge_package
Packages are no longer autoloaded, so testing whether they are "Loaded" does
not work in all cases.

The function now ensures that the package is loaded.
2018-06-05 19:53:02 +02:00
Stéphane Adjemian (Scylla) ce7cfccddb Cosmetic changes. 2017-10-10 10:14:59 +02:00
Marco Ratto da063b2e18 bug fix in optimizer 5 [newrat] for dsge_var_likelihood objective function. Fixes #1494 2017-10-09 17:53:19 +02:00
Johannes Pfeifer 89326090b9 simpsa: Only store output strcuture if requested
Otherwise a huge three-dimensional array is created by default that is not used, but can run computer out of memory
2017-06-23 10:50:06 +02:00
Stéphane Adjemian (Charybdis) 1bf81c9f5a Fixed copyright notices. 2017-05-18 18:36:38 +02:00
Stéphane Adjemian (Charybdis) 5417b27ac7 Fixed indentation of matlab files. 2017-05-16 15:10:20 +02:00
Stéphane Adjemian (Charybdis) a53636e24e Fixed copyright notices. 2017-05-16 14:11:15 +02:00
Stéphane Adjemian (Charybdis) 88e1701289 Removed useless commas and semicolons. 2017-05-16 13:24:46 +02:00
Johannes Pfeifer f1123200e5 mode_compute=9: Make sure initial search volume (SIGMA) is not badly conditioned 2017-04-12 13:39:34 +02:00
Stéphane Adjemian (Charybdis) 9fbef0c107 Removed penalty_hessian routine.
+ Code factorization.
 + Added an option for using the penalized objective when computing numerically
 the hessian at the mode.

Previous behaviour (introduced with penalty_hessian routine) was to compute the
hessian matrix at the mode with the penalized objective function (instead of
the original objective function). This behaviour hides problematic situations,
where the computed hessian (using the original objective) would not be full
rank. For instance, if the estimation ends up with a parameter on (or very
close to) the bounds of its possible values (which is often not a desirable
outcome), the estimated posterior variance would be zero for this
parameter (with the original objective) because the hessian is not finite in
this direction, while the posterior variance would be positive if the penalized
objective is used instead. But this estimate would not be reliable by
construction of the penalty which is quite ad-hoc (more fundamentally I do not
think that there exists any rational for approximating the covariance matrix
with the inverse of the hessian matrix if the mode is on the border of the set
of possible values).

This commit restore the behaviour previous to 2446ab02ba.

An option is available for computing the hessian with the penalized
objective function.
2017-02-08 13:07:25 +00:00
Stéphane Adjemian (Charybdis) 5b73d7d59c Added new optimization routine (particleswarm).
Only available under Matlab if the Global Optimization Toolbox is installed.
2017-02-08 13:07:25 +00:00
Stéphane Adjemian (Charybdis) 35078e13ee Completed header + cosmetic changes. 2017-02-08 13:07:25 +00:00
Houtan Bastani 920a9911ee add missing copyright 2016-11-10 17:49:05 +01:00
Houtan Bastani 46cdaf8e0a fiminsearch only has two output args under Octave 2016-10-21 17:40:27 +02:00
Houtan Bastani 744b52d362 fix bug introduced in 1c892bb3e9 2016-09-27 15:28:43 +02:00
Houtan Bastani 1c892bb3e9 octave: try to load the needed package before ending with an error 2016-09-27 15:26:59 +02:00
Johannes Pfeifer 552a9b5230 Fix bugs previously introduces in dynare_estimation_1.m related to penalty function 2016-06-15 00:30:28 +02:00
Johannes Pfeifer 2446ab02ba Transform persistent variables of newrat.m into function arguments 2016-06-15 00:30:28 +02:00
Johannes Pfeifer 0c00e28799 Remove objective_function_penalty_base 2016-06-15 00:30:28 +02:00
Johannes Pfeifer 0edd8e2025 Add penalty_hessian.m and penalty_objective_function.m 2016-06-15 00:30:28 +02:00
Johannes Pfeifer 676182f550 Cosmetic fix to dynare_minimize_objective.m 2016-05-22 11:41:54 +02:00
Houtan Bastani bebcfffe04 fix license, file copyright errors 2016-05-04 16:30:16 +02:00