Commit Graph

119 Commits (master)

Author SHA1 Message Date
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 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
Stéphane Adjemian (Ryûk) 4982ce06b4
Remove unnecessary square brackets. 2023-12-18 10:49:49 +01:00
Stéphane Adjemian (Ryûk) 735bd66d4d
Remove unused output arguments. 2023-12-18 07:48:27 +01:00
Sébastien Villemot 79959aa587
Remove duplicate branches in if/then/else statements
Detected by MATLAB Code Analyzer app.
2023-12-15 15:31:52 +01:00
Johannes Pfeifer c3268c0279
Move various functions from main matlab folder to subfolders 2023-12-14 18:29:04 +01:00
Marco Ratto de152a3de3 bug fix: indexing must also contain smpl+1 (needed for 1 step ahead forecast in last period when filtering). 2023-12-13 21:01:02 +01:00
Johannes Pfeifer 5103d55cb4 PKF: add period to debugging information 2023-10-29 11:30:23 +01:00
Johannes Pfeifer b3ce518433 Further naming consistency improvements 2023-10-25 11:22:50 +02:00
Johannes Pfeifer 3a115d4fcc Remove full oo_ input from likelihood functions 2023-10-02 09:48:34 +02:00
Johannes Pfeifer 8da98057b9
Have computation of decision rules and smoother only input and output required arguments instead of full oo_ and M_ 2023-09-25 17:17:34 +02:00
Marco Ratto 7132cb593e bug fix for init variables to be defined only with occbin PKF 2023-02-03 14:20:16 +01:00
Marco Ratto a346639020 when filter is NOT diffuse, allow likelihood to handle violation of constraints in period 1. 2023-02-03 14:19:28 +01:00
Johannes Pfeifer 4307711c60 missing_observations_kalman_filter.m: provide debugging information on PKF problems 2023-01-19 11:57:35 +01:00
Johannes Pfeifer 93ae4849b7 missing_observations_kalman_filter.m: remove unused output whose dimensions grow over time 2022-05-25 12:55:05 +02:00
Sébastien Villemot 10af04c6d8
Use Unicode copyright symbol (in UTF-8 encoding) in all source files
It is now supported by the MATLAB editor (as of R2022a).

The old ASCII notation is left in some files that we copy as-is from other
sources (e.g. in the contrib/ and m4/ subdirectories).

The particles submodule is not updated at this point, because it is in an
inconsistent state.

[skip ci]
2022-04-13 14:54:25 +02:00
Johannes Pfeifer 1bfb9ffbb9 heteroskedastic shocks: take into account first_obs 2021-12-14 11:21:16 +01:00
Sébastien Villemot 229282a1c4
Occbin: the +<basename>/occbin_difference.m file is now generated by the preprocessor
Some fields have also changed under M_.occbin.

Ref. #569
2021-07-20 12:35:15 +02:00
Marco Ratto 02072dde39
Add Occbin routines
Syntax is not yet finalized (see preprocessor#68).
Documentation still to be done.

Ref. #569
2021-07-16 17:20:11 +02:00
Sébastien Villemot 766fff88f6
Use secure URL for link to GNU licenses 2021-06-09 17:35:05 +02:00
Marcoo Ratto 1645f38269
Implement heteroskedastic filter and smoother 2021-05-26 18:45:16 +02:00
Sébastien Villemot 565d61aad3
Merge branch 'kalman_analytic_bug' of git.dynare.org:JohannesPfeifer/dynare 2021-01-22 18:32:42 +01:00
Johannes Pfeifer c6c9b4e356 kalman_filter.m: fix bug when using analytic_derivation 2021-01-22 14:54:17 +01:00
Johannes Pfeifer 869147c13a Kalman filter functions: clarify header comments 2021-01-18 17:33:21 +01:00
Marco Ratto 73291b0b19 before issuing F singularity, check with rescaled F matrix: this spares lots of computing time when singularity only happens in the first KF step. 2020-01-24 14:17:26 +01:00
Sébastien Villemot 7a75872f72
Modernization: use tilde (~) syntax for ignored output arguments 2018-11-13 18:02:09 +01:00
Stéphane Adjemian (Charybdis) c4f1958690 Cosmetic changes + Copyright headers fixes. 2018-01-26 12:00:27 +01:00
Johannes Pfeifer b933a440bf Add debugging info to Kalman filter routines 2018-01-26 11:47:39 +01:00
Marco Ratto b9741548b0 As we do for the smoother, check the rank of Pinf only for the observables (i.e. using Z*Pinf*Z') 2018-01-26 11:47:39 +01: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
Stéphane Adjemian (Charybdis) c1b6a58eb7 Manually revert 05fc096569.
Robust prediction error covariance matrix computation is now optional (with
rescale_prediction_error_covariance option).

Closes #1437.
2017-04-27 10:44:27 +02:00
Johannes Pfeifer e3aecd4e74 Diffuse Kalman filter: add comment for better comparison to Koopman/Durbin (2003) as there is a typo in their paper 2016-11-04 09:21:53 +01:00
Johannes Pfeifer 57d600301b Correct description of Kstar 2016-11-04 09:21:53 +01:00
Johannes Pfeifer 73d0a82267 Add comment on logic of singularity testing in univariate_kalman_filter_d.m
See discussion on mailing list 18/06/2016
2016-08-22 19:24:35 +02:00
Johannes Pfeifer 8dc96cafa4 If F is identically 0 in Kalman filter, discard parameter draw instead of treating current observation as unobserved
See discussion on mailing list 18/06/2016
2016-08-22 19:24:35 +02:00
Johannes Pfeifer 36ccec75ce Add missing constant 2*pi to missing_observations_kalman_filter_d.m 2016-08-22 19:24:35 +02:00
Johannes Pfeifer f95619b46a Add header info to univariate_kalman_filter.m 2016-08-22 19:24:35 +02:00
Johannes Pfeifer 15f95cec4a Add comments to Kalman filtering routines 2016-08-22 19:24:35 +02:00
Houtan Bastani 25121bca4f fix copyright dates 2016-05-04 16:05:31 +02:00
Johannes Pfeifer 8908d46567 Initialize s to make sure univariate_kalman_filter_d.m does not crash if newRank is 0 initially 2016-04-14 20:11:49 +02:00
Michel Juillard 953ac851c0 & into && 2015-11-09 09:03:55 +01:00
Marco Ratto 93e7be66e7 proper use on diffuse_kalman_tol in univariate diffuse filter and smoother 2015-10-13 17:28:29 +02:00
Marco Ratto 05fc096569 Make multivariate kalman filter and smoother robust to badly scaled covariance matrix of observables.
This avoids shifting to univariate filter in most cases.
2015-10-13 17:15:01 +02:00
Marco Ratto ca8f0ea006 Harmonize filters/likelihood with smoothers by using new option diffuse_kalman_tol 2015-04-08 15:49:12 +02:00
Marco Ratto 5297836577 Harmonize criteria for exiting diffuse steps in likelihood with the smoother.
Since initial Pinf is well scaled to unity, crit1= 1.e-6 is used for smoother and should also apply to likelihood evaluations.
2015-04-03 18:02:03 +02:00
Stéphane Adjemian (Scylla) 89fa0ae9b6 Fixed typo. 2014-09-11 17:33:42 +02:00
Marco Ratto a6bddb2d57 Improve computation of outer product gradient for univariate Kalman algorithms, by exploiting the larger number of individual densities computed during recursions (used in optimizer number 5). 2014-07-23 16:33:39 +02:00