Commit Graph

35 Commits (7dd2dd5e24a343fbeaf3522ea5e535c27d8b9f95)

Author SHA1 Message Date
Johannes Pfeifer 2816550290 PKF: get required output if nk=1
Related to https://git.dynare.org/Dynare/dynare/-/issues/1861
2022-07-26 15:07:23 +02:00
Marco Ratto 9304b535f4 port to occbin smoother the same computational improvements done for standard one under smother_redux option. This also require to provide occbin reduced state-space matrices as output argument of missing_DiffuseKalmanSmootherH3_Z.m 2022-06-02 09:52:47 +02:00
Marco Ratto 12c4e03d7b bug fixes in retrieving the k-step ahead predictions and updated variables from occbin simulations 2022-06-02 09:52:47 +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
Marco Ratto 06a7e6c7be bug fixes with occbin smoother: reset nested waitbars and fix names of outut structure of solver 2022-01-06 15:01:35 +01:00
Marco Ratto d3e5e7b8ef Initialize state space matrices with occbin smoother, when realtime regimes are computed, otherwise they are set to 0 for t<first_period_occbin_update! 2021-07-21 17:51:00 +02: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
Marco Ratto 5fa6265944 Implement new option smoother_redux, to allow fast smoother for very large models. It runs smoother only for state variables and computes the remaining ones ex-post
Contains improvements, in order to recover as much as possible static unobserved (filtered, smoothed, updated, k-step ahead), Variance, State_uncertainty, k-step ahead variances trying to map lagged states onto current ones using pinv(T). This has exceptions (namely lagged shocks which are ONLY used to recover static NON observed variables). this exception is also trapped.
For such extensions we can only recover smoothed variables starting from d+1. Variances CANNOT be recovered for such variables (the smoother gives ZERO.)
2021-05-27 16:59:15 +02:00
Marcoo Ratto 1645f38269
Implement heteroskedastic filter and smoother 2021-05-26 18:45:16 +02:00
Marco Ratto 551917581f
Bug fixes in fitered variances of smoother
- kalman_algo=1: kstep-ahead variances were WRONG, since Pf was initialized using P in PREVIOUS period
- kalman_algo=2: output argument for filtered varainces should be P1, not P (P are UPDATED variances, there).

For kalman_algo=2, also make a small factorization fix (compute P(:,:,t+1) before defining Pf, so to compute 1-step ahead variance only once)
2021-05-07 16:34:53 +02:00
Johannes Pfeifer 7c8f486727 Allow setting initial state for Kalman filter
Supersedes https://git.dynare.org/Dynare/dynare/-/merge_requests/1522
2021-01-28 17:24:27 +01:00
Stéphane Adjemian (Charybdis) 74fc7cc078 Copyright header fix. 2018-01-26 12:01:07 +01:00
Johannes Pfeifer b933a440bf Add debugging info to Kalman filter routines 2018-01-26 11:47:39 +01: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
Johannes Pfeifer 1755192e63 Make 792924 consistent with cases where Pinf is an empty matrix
Fixes the crash in `analytic_derivatives/fs2000_analytic_derivation.mod`
2017-03-31 17:41:38 +02:00
Marco Ratto 792924a3b7 - test the rank of Pinf in univariate smoother for the subset of observables, in order to trap cases where this is not already trapped in compute_Pinf_Pstar.m
- issue warning when diffuse steps never end [maybe we should issue an error?]
2017-03-30 11:21:54 +02:00
Johannes Pfeifer 1a978e42df Fix bug in missing_DiffuseKalmanSmootherH3_Z.m
Closes #1339 by properly factorizing computations
2016-11-19 10:07:16 +01:00
Johannes Pfeifer 46b44cd481 missing_DiffuseKalmanSmootherH3_Z.m: Fix typo in formula that makes tests fail 2016-11-14 11:54:39 +01:00
Johannes Pfeifer 98cf1bfc1d Add smoothed state uncertainty to Kalman smoother routines 2016-11-04 09:23:55 +01:00
Johannes Pfeifer 8166707dd4 Document missing_DiffuseKalmanSmootherH3_Z.m
Also properly initializes Kinf
2016-11-04 09:21:53 +01:00
Johannes Pfeifer f61453211c Correct header of missing_DiffuseKalmanSmootherH3_Z.m and make sure H is vector 2016-08-22 19:24:35 +02:00
Houtan Bastani 25121bca4f fix copyright dates 2016-05-04 16:05:31 +02:00
Johannes Pfeifer 98384eb6f2 Document variable ordering in various headers 2016-04-12 10:52:37 +02:00
Marco Ratto 93e7be66e7 proper use on diffuse_kalman_tol in univariate diffuse filter and smoother 2015-10-13 17:28:29 +02:00
Stéphane Adjemian (Charybdis) 090c4fedbd Added new option (diffuse_kalman_tol) and fixed tolerance paremeters in diffuse smoother routines. 2015-04-03 18:02:03 +02:00
Michel Juillard 6eb16f06f5 fixed bug for measurement errors returned by smoother 2011-11-04 21:15:47 +01:00
Michel Juillard 78d882900a more bug corrections in smoother routines 2011-03-25 21:32:45 +01:00
Michel Juillard 5f8b5fa467 removing useless 'd' output argument from the Kalman smoother functions. Removed global initialization of options_.diffuse_d. Fixed minor bugs in Kalman smoother functions. 2011-03-24 18:38:01 +01:00
Houtan Bastani 43479f6ef3 use short-circuit ops (|| and &&) as opposed to (| and &) to avoid warnings in Octave (and save time) 2011-02-10 15:54:23 +01:00
Sébastien Villemot 02652f6eb8 Updated copyright notices 2011-02-04 17:27:33 +01:00
Michel Juillard 1db24b3107 bug correction for diffuse smoother 2011-01-18 19:04:20 +01:00
Michel Juillard e2a1d77f6e - added schur_statespace_transformation.m to factor it out of DsgeLikelihood.m and DsgeSmoother.m
and corrected a bug in the code
- added missing functions missing_DiffuseKalmanSmootherH1_Z.m (multivariate version) and
                          missing_DiffuseKalmanSmootherH3_Z.m (univariate version)
- use only these two versions of the Kalman smoother in DsgeSmoother.m
2011-01-13 21:50:26 +01:00