Commit Graph

28 Commits (237aa465d23fb3113a27cf2d8f9932bd3c2e2e8f)

Author SHA1 Message Date
Johannes Pfeifer 25803a6842 dynare_minimize_objective: fix use of analytic derivatives by employing wrapper function 2021-01-24 17:40:24 +01:00
Johannes Pfeifer d2a55d1e49 method_of_moments: adapt analytic jacobian output to interface used elsewhere 2021-01-24 09:21:09 +01:00
Sébastien Villemot f81b330f14
Methods of moments: compatibility fix for MATLAB < R2015a
The mean(…, 'omitnan') syntax does not exist before R2015a. Use nanmean
instead (either provided by the statistics toolbox, or by our fallback under
matlab/missing/stats/).
2021-01-19 15:50:14 +01:00
Sébastien Villemot f946baf6c5
Testsuite: add workaround for crash of MATLAB R2014a with TeX option
The TeX option crashes MATLAB R2014a run with "-nodisplay" option
(as is done from the testsuite). We disable the TeX option in that case.

Since we can’t directly test whether "-nodisplay" has been passed, we test for
the "TOP_TEST_DIR" environment variable, which is set by the testsuite.

Note that it was not tested whether the crash happens with more recent MATLAB
versions, so when OLD_MATLAB_VERSION is increased, one should make a test
before removing this workaround.
2021-01-19 15:50:11 +01:00
Willi Mutschler 52a57eaf60
MoM: Remove duplicate check in gradient helper function 2021-01-14 14:17:55 +01:00
Willi Mutschler a697002a4e
MoM: Gradient-based optimizers can use analytical Jacobian for GMM
New option analytic_jacobian for mode_compute 1, 3, and 13
2021-01-14 10:03:39 +01:00
Johannes Pfeifer fbb1272164 Fix mode_compute=12 and filter out mode_compute=11 2021-01-10 17:30:35 +01:00
Willi Mutschler b3e3501a6d
MoM: Fix bug in SMM with ME
Occurs by running RBC_MoM_SMM_ME with mode_compute=9
2021-01-07 14:25:26 +01:00
Willi Mutschler 2b554e0511
MoM: cosmetical changes to description of options in testsuite 2021-01-07 13:39:45 +01:00
Willi Mutschler ba8d5d364d
MoM: Update copyright years 2021-01-07 10:32:35 +01:00
Willi Mutschler e2f16b504c
MoM: Improve mode_compute=0 and more details on optimizers 2021-01-06 13:57:07 +01:00
Willi Mutschler 205b87d195
MoM: Fix typos, improve messages and checks, schur_vec_tol option, dname 2020-12-18 16:16:30 +01:00
Willi Mutschler 2359a1496c
MoM: Changed default qz_criterium and added Schur_vec_tol 2020-12-18 16:16:30 +01:00
Willi Mutschler 4d9ee3f8e5
MoM: Update To-Do list
- lsqnonlin takes less time in Andreasen toolbox due to different handling of bounds; our approach is better (objective is smaller for RBC model)
- user-specified weightning matrix does work
- qz_criterium is set to  1+e-6 to allow for unit-roots (but observables need to be stationary)
- informative message is printed that NaN values in data moments are replaced by mean
- estimated_params_bounds work as well as informative message when parameters are not calibrated
- SMM at any order without pruning works
- SMM with pruning works for orders 1,2,3; for orders above 3 simult_.m throws an error that pruning is not available
- Analytical standard errors for GMM and Bayesian estimation is included
- dirname is not needed
- Remaining to dos are updated
2020-12-18 16:16:30 +01:00
Willi Mutschler 5d475d4527
MoM: Checks and fixes for perturbation order and pruning
- Set pruning to false as default, for GMM we turn it on for order>2 and display a message for the user that we do so
- Provide error if users try GMM with order > 3
- For SMM, order > 2 and no pruning, simult_.m uses Dynare++ routines which require a seed
2020-12-18 16:16:10 +01:00
Willi Mutschler 363610affe
MoM: Save checkplot data also in graphs folder 2020-12-18 16:16:10 +01:00
Willi Mutschler eae5e2f029
MoM: Add analytical standard errors for GMM
Reset analytic_derivation_mode for steadystate file parameter changes


MoM: Fix GMM analytical standard errors wrong dimensions in autocovs
2020-12-18 16:16:10 +01:00
Johannes Pfeifer da3943beba Make sure output is saved in dname-folder
That's where other functions are looking for them
2020-12-16 22:41:55 +01:00
Willi Mutschler 4aa0fa540e
Display minimum in check plots in method of moments 2020-11-26 13:28:29 +01:00
Johannes Pfeifer e42654b812 method_of_moments.m: Octave compatibility fix
Octave does not support randstream; related to https://git.dynare.org/Dynare/dynare/-/issues/1749
2020-11-19 10:07:35 +01:00
Johannes Pfeifer e9ef9a5f4b nanmean: Compatibility fix for Octave
Octave does not support Matlab's recommended syntax
2020-11-13 12:03:17 +01:00
Sébastien Villemot b891695680
Merge branch 'JohannesPfeifer/dynare-MoM' 2020-09-01 15:14:43 +02:00
Johannes Pfeifer 96be513ecf Remove matched_moments_ as input argument as it is now a field of M_ 2020-08-05 15:58:58 +02:00
Johannes Pfeifer 3b85fea02e Move setting of parameters out of check_bounds_and_definiteness_estimation.m
Increases transparency
2020-07-17 15:02:12 +02:00
Willi Mutschler b273a2792b Fix iterated method of moments
Also improve fprintf descriptions and comments and other cosmetical changes
2020-07-16 14:47:20 +02:00
Willi Mutschler 9c99eac55c Move more options to substructure options_mom_.mom 2020-07-16 11:38:41 +02:00
Willi Mutschler 552b995215 Remove stuff and checks that are already done in the preprocessor 2020-07-16 11:38:41 +02:00
Johannes Pfeifer 540f0454d2 Code Review of GMM routines
- fix prefilter option
- Implement iterative GMM
2020-07-16 11:38:40 +02:00