Commit Graph

1863 Commits (kalman_mex)

Author SHA1 Message Date
Stéphane Adjemian (Argos) b863c309bd
Improve tests and timings for the Kalman mex.
- Ensure that we always use the same DGP (e.g. same transition matrix).
 - Call the mex more than once with different samples.
 - Ensure that the size of the state space model is the same in tests 1, 2 and 3.
 - Fix the seed (same samples across 1, 2 and 3 except for the additive noise in 2 and 3 on the observed variables).
2023-11-09 19:00:37 +01:00
Stéphane Adjemian (Argos) 9c61422a75
Improve debug mode. 2023-11-09 19:00:37 +01:00
Normann Rion 3a461c996c
Kalman filter mex: routine and tests 2023-11-09 19:00:37 +01:00
Stéphane Adjemian (Argos) b0a84bd6f8
Bug fixes.
- Simulation of the model was not working since to (1) wrong commented
 line (dynare comments in a verbatim block), and (2) dates are not interpreted
 in a verbatim block.

 - A variable was missing (the auxiliary for the PAC expectation term) causing
 problems for the initialisation of the simulations in dcontribs (presence of a
 NaN in the guess for the first period).
2023-10-26 18:25:35 +02:00
Stéphane Adjemian (Argos) 76a2203b50
Make debug mode easier to use. 2023-10-26 14:59:12 +02:00
Stéphane Adjemian (Argos) cdd842cc19
Do not overwrite macro variable simulate. 2023-10-26 14:57:37 +02:00
Sébastien Villemot 896c48eba7
Testsuite: move some files for more consistency in tests file structure 2023-10-23 17:00:01 +02:00
Sébastien Villemot 8c3429bb0f
Perfect foresight with expectation errors: change the semantics of endval(learnt_in=…)
Similarly to the regular “endval” block, any variable mentioned in this
block will jump to its new value in the period where the information is learnt.
In particular, this means that any temporary shock that may have been
anticipated on that variable (as specified through a “shocks(learnt_in=...)”
block for a previous informational period) will be overwritten.
2023-10-20 16:05:56 -04:00
Sébastien Villemot df9c7d85b8
Error out if perfect_foresight_solver is called with shocks(learnt_in=…) or endval(learnt_in=…) blocks
This is to prevent the accidental use of the regular perfect foresight solver
when one actually wants the one with expectation errors.
2023-10-20 16:05:53 -04:00
Sébastien Villemot 9ef3f7d0ed
Testsuite: fix test comparison value in pfwee_learnt_in.mod
It would fail on some processors, due to tiny floating point discrepancies.
2023-10-18 21:18:52 -04:00
Sébastien Villemot 5145bd0708
New option “relative_to_initval” to “mshocks” block 2023-10-18 16:45:06 -04:00
Sébastien Villemot 39f9d4352a
The “mshocks” block now accepts the “learnt_in” option 2023-10-17 17:24:15 -04:00
Sébastien Villemot 3e5591d41f
New “static_mfs” option to the “model” block (and the “model_options” command) 2023-10-16 11:57:02 -04:00
Johannes Pfeifer a67cd58d1f
fs2000_corr_ME.mod: switch to simulated, longer data set 2023-10-11 09:26:04 -04:00
Sébastien Villemot 03433112a4
Testsuite: add tests for print_bytecode_{static,dynamic}_model commands 2023-10-10 17:42:12 -04:00
Sébastien Villemot 2e3fbfc040
New option “from_initval_to_endval” to “homotopy_setup” block 2023-10-10 13:19:12 -04:00
Sébastien Villemot e4afa5eee0 Merge branch 'more_globals' into 'master'
Eliminate some more globals

See merge request Dynare/dynare!2187
2023-10-03 12:48:34 +00:00
Johannes Pfeifer 3a115d4fcc Remove full oo_ input from likelihood functions 2023-10-02 09:48:34 +02:00
Johannes Pfeifer acb9518dec get_perturbation_params_derivs and friends: do not pass full oo_ structure 2023-10-02 09:18:58 +02:00
Johannes Pfeifer 7da5ff4fad gsa: reduce sample size of tests 2023-10-01 18:04:35 +02:00
Johannes Pfeifer 776c247b9b testsuite: use silent_optimizer option to not clutter meson log-file 2023-10-01 18:04:16 +02:00
Sébastien Villemot 0e5bba7567
Testsuite: fix workaround for TeX option with MATLAB R2014a
MATLAB R2014a run with -nodisplay crashes with the TeX option. A workaround was
introduced in commit f946baf6c5. The present
commit updates this workaround following the move to the Meson build system.

By the way, use consistent variable naming in tests/run_mod_file.m.
2023-09-28 15:17:00 +02:00
Sébastien Villemot 2600a878da
Testsuite: tolerance increase
estimation/fs2000_model_comparison.mod fails with MATLAB R2023b on the “pluto”
runner (which has AVX2).
2023-09-28 11:46:21 +02:00
Sébastien Villemot 01833b8a76
Testsuite: factorization between MATLAB and Octave 2023-09-26 15:59:38 +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
Johannes Pfeifer 5231fc04c1 Remove global variables from prior_posterior_statistics.m and PosteriorIRF.m 2023-09-25 12:08:41 +02:00
Sébastien Villemot 9a1f150e38
Merge branch 'default_mode_compute' of git.dynare.org:JohannesPfeifer/dynare
Ref. !2160
2023-09-22 14:35:45 +02:00
Sébastien Villemot 6dd55726e6
Drop autoconf/automake build system 2023-09-20 15:33:44 +02:00
Sébastien Villemot 834b04bcb4
Testsuite: compatibility fix with MATLAB < R2017a
Double quotes were introduced in R2017a.
2023-09-20 14:00:55 +02:00
Sébastien Villemot e549bbba7a
Meson build system: testsuite now fully implemented
By the way, switch the CI to use the Meson testsuite, because some test files
have been modified and no longer work with the old build system.
2023-09-20 13:55:55 +02:00
Johannes Pfeifer 1f723ebd7e fs2000: remove asymptote in prior for rho, which caused corner solutions 2023-09-20 12:55:30 +02:00
Sébastien Villemot 6f5e346bf6
Merge branch 'preparations_irf_matching' of git.dynare.org:wmutschl/dynare
Ref. !2181
2023-09-20 10:17:14 +02:00
Johannes Pfeifer f6a8473144 estimation: support additional_optimizer_steps
Closes https://git.dynare.org/Dynare/dynare/-/issues/1573
2023-09-19 18:14:24 +02:00
Willi Mutschler 649f668dd1
cosmetical: don't use hh for figure/plot/table handles
We use it to denote the hessian and even store it in many mat files.
2023-09-19 13:26:33 +02:00
Sébastien Villemot 8a79899189
Meson build system: implement most of the testsuite
The tests that are individually listed in {M,O}_TRS_FILES of tests/Makefile.am
are still missing.
2023-09-16 14:25:38 +02:00
Sébastien Villemot eb16bb4373
Merge branch 'dynare-osr_analytic'
Ref. !2171
2023-09-13 11:19:20 +02:00
Johannes Pfeifer 885fda0e20
OSR: allow using analytic gradient 2023-09-13 11:19:13 +02:00
Sébastien Villemot a57f81b3aa
Testsuite: move load_octave_packages.m to utils/ subdirectory 2023-09-12 12:39:26 +02:00
Johannes Pfeifer baf8243fac generate_trace_plots.m: allow for plotting traces of multiple chains
Closes #1904
2023-09-08 22:04:25 +02:00
Sébastien Villemot d601ca4a2e Merge branch 'var_decomp' into 'master'
Add variance decomposition for pruned state space

Closes #1836

See merge request Dynare/dynare!2163
2023-09-08 12:55:19 +00:00
Johannes Pfeifer 4e58e22bdd Variance decomposition with pruning: add unit test 2023-09-08 07:02:43 +02:00
Willi Mutschler a0b443b9f8
Cosmetical changes to headers and message strings 2023-09-07 09:36:27 +02:00
Willi Mutschler c3327e000c
method_of_moments: refactor matched moments block transformations 2023-09-07 09:36:27 +02:00
Johannes Pfeifer d60a19ce49 Finish implementation of truncated normal distribution
Closes https://git.dynare.org/Dynare/dynare/-/issues/1593
2023-09-06 12:46:41 +02:00
Sébastien Villemot 8888711266
Testsuite: remove workaround for glibc bug #19329
The bug is fixed in glibc 2.34, which is included in Debian “bookworm” 12 and
Ubuntu 22.04 LTS.
2023-08-30 11:38:01 +02:00
Normann Rion 710589eb5b Adds pruning in k_order_simul
See issue #1643 about beyond-third-order pruning
2023-07-20 06:58:35 +01:00
Stéphane Adjemian (Argos) bd0493d135
Add routine for dynamic contributions in semi-structural models. 2023-07-06 22:26:09 +02:00
Johannes Pfeifer 9b2c0fb94d Add brooks_gelman_plotrows to manual and testsuite 2023-07-06 09:32:19 -04:00
Normann Rion 23dbb2b4b9 Fixes local_state_space_iteration_3 and adds a test comparing the various pruning routines used in dynare up to order 3.
The considered pruning routines can be found in
   - `simult_.m`
   - `local_state_space_iteration_2` MEX
   - `local_state_space_iteration_3` MEX
   - `pruned_state_space_system.m`
2023-07-04 19:15:43 +02:00
Sébastien Villemot d5a3a8e16a
Various improvements to perfect foresight homotopy
– new option “endval_steady” to pf_setup command to recompute terminal
  steady state in the homotopy loop

– new options “homotopy_linearization_fallback” and
  “homotopy_marginal_linearization_fallback” to pf_solver and pfwee_solver
  commands, to get an approximate solution when homotopy fails to go to 100%

– new options “homotopy_initial_step_size”, “homotopy_min_step_size”,
  “homotopy_step_size_increase_success_count” and “homotopy_max_completion_share”
  to pf_solver and pfwee_solver commands to fine tune the homotopy behaviour

– removed option “homotopy_alt_starting_point” to pf_solver command, not really
  useful

– new options “steady_solve_algo”, “steady_tolf”, “steady_tolx”,
  “steady_maxit”, “steady_markowitz” to pf_solver and pfwee_solver commands, to
  control the computation of the terminal steady state (and remove the
  equivalent options which previously had different names in pfwee_solver command)
2023-06-21 15:58:23 +02:00