Commit Graph

16892 Commits (cfa978b39ead9815c608b2e24ed528e79c085c1a)

Author SHA1 Message Date
Sébastien Villemot 70b9d9277a Merge branch 'occbin_bugfixes_marco' into 'master'
Improvements to OccBin filtering/smoothing

See merge request Dynare/dynare!2237
2023-12-18 18:55:12 +00:00
Johannes Pfeifer 78abd68c9f EP: gracefully handle error 2023-12-18 17:08:28 +01:00
Johannes Pfeifer 4512e85cb2 Restore outputs erroneously removed in 735bd66d 2023-12-18 17:07:01 +01:00
Johannes Pfeifer d7ae0d0039 OccBin: improve consistency - Make name of opts_simul subfield homogeneous for likelihood computation and smoother - fill the new field opts_regime with init_binding_indicator init_regime_history, to avoid possible conflics with simulations done in realtime filtering steps - smoother: use init_binding_indicator and init_regime_history options set in options_.occbin.smoother 2023-12-18 16:16:50 +01:00
Marco Ratto ac346ef83d occbin.kalman_update_engine.m: embed use_relaxation and extend to work with 2 constraints 2023-12-18 16:16:49 +01:00
Marco Ratto 9b165d7785 occbin.map_regime.m: trap case where indicator is empty 2023-12-18 16:16:48 +01:00
Johannes Pfeifer 7b94310fd4 occbin.solver.m: fix header 2023-12-18 16:16:47 +01:00
Marco Ratto 8348cf009a OccBin: enhance search of filtered regime, using new kalman_update_engine.m
brute_force_regime_guess (default) and loss_function_regime_guess (optional, more time consuming) may be used to search for better solution (i.e. a solution providing better data density). Governed by options_.occbin.likelihood.number_of_initial_periods_with_extra_regime_guess
where the latter is 0 by default and can be set by user
2023-12-18 16:16:46 +01:00
Marco Ratto 75f5a463df OccBin smoother: trap realtime smoother error and use linear smoother for first guess 2023-12-18 16:16:45 +01:00
Marco Ratto e8d82ad840 Occbin: make convergence criteria for periodic solution more precise;
Also allows periodic loops to be a solution (periodic_solution_strict=false), provided regime is found that does not violate constraint in expectation AND the number of periods in violation is smaller than max allowed (periodic_solution_threshold= INTEGER)
2023-12-18 16:16:44 +01:00
Johannes Pfeifer ab6ea60967 Occbin smoother: try using smoothed shocks from linear smoother as last resort to initialize guess sequence of regimes 2023-12-18 16:16:43 +01:00
Marco Ratto 90fbb9559e 🐛 Occbin smoother: ensure all shocks are plotted with heteroskedastic_filter 2023-12-18 16:16:42 +01:00
Marco Ratto 3f1a37614f OccBin: store simul.piecewise and simul.linear in oo_.occbin.smoother, for easier post-processing of results 2023-12-18 16:16:40 +01:00
Marco Ratto ee5faf0783 🐛 Occbin smoother: set periods to the smpl size
Prevents crash if periods was too small
2023-12-18 16:16:39 +01:00
Marco Ratto cf7be44257 occbin.solver: initialize output ss to avoid crashes when call to resol fails 2023-12-18 16:16:38 +01:00
Sébastien Villemot c363355dbf
Merge branch 'obs_check' of git.dynare.org:JohannesPfeifer/dynare
Ref. !2236
2023-12-18 15:55:20 +01:00
Sébastien Villemot d50330aad3
Merge branch 'cosmetics' of git.dynare.org:JohannesPfeifer/dynare
Ref. !2235
2023-12-18 15:55:06 +01:00
Sébastien Villemot 380e78be53
user_has_matlab_license: fix spurious messages when toolbox is not present
This is effectively a partial revert of
735bd66d4d.
2023-12-18 15:47:45 +01:00
Sébastien Villemot 84a7b4b2cf
Merge branch 'dynare-PF_globals'
Ref. !2229
2023-12-18 11:51:46 +01:00
Johannes Pfeifer 48380a1370
Do not assign variables to base workspace by default
Related to https://git.dynare.org/Dynare/preprocessor/-/issues/95
2023-12-18 11:51:27 +01:00
Johannes Pfeifer 3faaffacc6
perfect foresight: remove globals 2023-12-18 11:51:21 +01:00
Sébastien Villemot e9ffb16ec6 Merge branch 'model_comp_tol' into 'master'
fs2000_model_comparison.mod: increase test tolerance due to problems on some runners

See merge request Dynare/dynare!2234
2023-12-18 10:11:43 +00:00
Stéphane Adjemian (Ryûk) 4982ce06b4
Remove unnecessary square brackets. 2023-12-18 10:49:49 +01:00
Johannes Pfeifer 37e4d68264 load_m_file_data_legacy.m: fix check for correct number of observations 2023-12-18 10:30:35 +01:00
Johannes Pfeifer 4d6d4953e7 GetPosteriorParametersStatistics.m and check_bounds_and_definiteness_estimation.m: cosmetic changes 2023-12-18 09:50:18 +01:00
Stéphane Adjemian (Ryûk) c399f54581
Remove call to eval. 2023-12-18 08:57:12 +01:00
Stéphane Adjemian (Ryûk) 735bd66d4d
Remove unused output arguments. 2023-12-18 07:48:27 +01:00
Stéphane Adjemian (Ryûk) 7468a903b7
Remove initialize_dataset routine.
This routine was no longer used in other parts of the code.
2023-12-17 19:00:37 +01:00
Stéphane Adjemian (Ryûk) c841f1474c
isinf(X)~= ⇔ isinf(X). 2023-12-17 08:30:56 +01:00
Stéphane Adjemian (Ryûk) b6619b342b
Remove unused variable. 2023-12-16 23:30:43 +01:00
Stéphane Adjemian (Ryûk) fef466ef34
Remove unused variable. 2023-12-16 23:13:15 +01:00
Stéphane Adjemian (Ryûk) 52be9d08c1
Cosmetic change (do not change index value in a for-loop). 2023-12-16 23:08:29 +01:00
Stéphane Adjemian (Ryûk) 5d8861ff29
Cosmetic change. 2023-12-16 23:03:02 +01:00
Stéphane Adjemian (Ryûk) 743de7da5c
Remove increment on for-loop index. 2023-12-16 23:03:02 +01:00
Stéphane Adjemian (Ryûk) e962cb4dba
Move the dseries submodule from the modules folder.
Makes no sense anymore to keep it there since it was the only git submdule.
2023-12-16 23:02:57 +01:00
Stéphane Adjemian (Ryûk) cf4c6cdf14
Update dseries submodule (rewrite two patches). 2023-12-16 22:26:43 +01:00
Stéphane Adjemian (Guts) 7915b91fdb
Error takes sprintf like arguments directly. 2023-12-16 22:24:26 +01:00
Johannes Pfeifer 72a8d53df8 fs2000_model_comparison.mod: increase test tolerance due to problems on some runners 2023-12-15 21:44:10 +01:00
Stéphane Adjemian (Guts) 23af7f64b6
Avoid using disp(sprintf()) constructs. 2023-12-15 18:56:08 +01:00
Stéphane Adjemian (Guts) 0249ea2116
Fix bug introduced in #47af0cde1. 2023-12-15 18:07:12 +01:00
Stéphane Adjemian (Guts) 44119077db
Separate outputs with commas. 2023-12-15 16:55:24 +01:00
Stéphane Adjemian (Guts) 47af0cde16
Remove calls to eval. 2023-12-15 16:34:27 +01:00
Sébastien Villemot eb043406e6
Merge branch 'path' of git.dynare.org:JohannesPfeifer/dynare
Ref. !2233
2023-12-15 16:32:08 +01:00
Sébastien Villemot ae082cffbe
Make function names consistent with filenames
Detected and automatically fixed by MATLAB Code Analyzer app.
2023-12-15 16:30:32 +01:00
Sébastien Villemot febd39713e
dseries: more fixes performed with MATLAB Code Analyzer app 2023-12-15 16:28:38 +01:00
Sébastien Villemot 20b2c79ffb
Remove unneeded uses of feval
Detected and automatically fixed by MATLAB Code Analyzer app.
2023-12-15 16:28:38 +01:00
Sébastien Villemot 458926b17b
Remove useless semicolons
Detected and automatically fixed by MATLAB Code Analyzer app.
2023-12-15 16:28:36 +01:00
Sébastien Villemot 162ca815bc
Replace calls to isdir by isfolder
isfolder is the modern replacement to isdir, and is available in MATLAB ⩾
R2017b and in Octave ⩾ 7.

Detected and automatically fixed by MATLAB Code Analyzer app.
2023-12-15 15:40:25 +01:00
Sébastien Villemot ff7cc9267e
Remove useless commas
Detected and automatically fixed by MATLAB Code Analyzer app.
2023-12-15 15:37:35 +01:00
Sébastien Villemot 56e97e29aa
dseries: various fixes performed with MATLAB Code Analyzer app 2023-12-15 15:31:52 +01:00