Johannes Pfeifer
0f333f29eb
kalman_update_algo_1.m: introduce error handling
...
Closes https://git.dynare.org/Dynare/dynare/-/issues/1854
2022-05-19 11:56:42 +02:00
Johannes Pfeifer
74dc4f81f0
perfect_foresight_solver.m: loop over dynamic file when mex cannot be used
...
Closes https://git.dynare.org/Dynare/dynare/-/issues/1850
2022-05-18 08:59:39 +02:00
Johannes Pfeifer
b037bc9438
GSA sampling from prior range: replace infinity by huge number to avoid NaN
2022-05-17 18:29:42 +02:00
Johannes Pfeifer
9f265c5b5b
stab_map_.m: remove redundant and commented out code to make file readable
2022-05-17 18:29:05 +02:00
Sébastien Villemot
05ab494d6c
Merge branch 'dyn_ramsey' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2029
2022-05-17 18:23:57 +02:00
Sébastien Villemot
1f2e22712f
Merge branch 'tolx' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2028
2022-05-17 18:23:37 +02:00
Johannes Pfeifer
26db005e61
evaluate_planner_objective.m: add warning if planner discount is not smaller than 1
2022-05-17 18:10:56 +02:00
Johannes Pfeifer
9b45886526
dyn_ramsey_static.m: remove unnecessary piece of code
2022-05-17 15:31:19 +02:00
Johannes Pfeifer
31ea784a5c
dynare_solve.m: honor tolx in fsolve
2022-05-17 15:27:21 +02:00
Sébastien Villemot
40871519fc
Merge branch 'mom_SE' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2024
2022-05-16 19:10:52 +02:00
Stéphane Adjemian (Ryûk)
c033a08cec
Remove third unit test in local_state_space_iteration_2.
2022-05-13 22:14:07 +02:00
Stéphane Adjemian (Ryûk)
2ff705f15c
Change second unit test for local_state_space_iteration_2...
...
To something closer to what we actually do when we estimate a model.
2022-05-13 22:12:09 +02:00
Stéphane Adjemian (Ryûk)
cd76bdff9e
Fix and update unit tests for local_state_space_iteration_2.
...
Add mat file with git lfs.
2022-05-13 12:13:46 +02:00
Stéphane Adjemian (Ryûk)
c17728da83
Make sure matlab routine is used in first unit test.
2022-05-12 13:02:41 +02:00
Stéphane Adjemian (Ryûk)
49727cf7a0
Remove %$ in unit tests.
2022-05-12 13:00:44 +02:00
Stéphane Adjemian (Ryûk)
68887b36e6
Cosmetic change.
2022-05-12 13:00:02 +02:00
Stéphane Adjemian (Ryûk)
8edc6538bf
Rewrite header doc.
2022-05-12 12:58:32 +02:00
Stéphane Adjemian (Ryûk)
c492ce7b73
Remove unused routines.
2022-05-12 10:33:48 +02:00
Stéphane Adjemian (Ryûk)
4e90a47521
Throw an error if some parameters are not initialised.
2022-05-12 10:33:48 +02:00
Johannes Pfeifer
0bc9a163b2
mom.standard_errors.m: provide more informative error message when hitting bounds during finite difference step
2022-05-12 09:51:21 +02:00
Sébastien Villemot
a2a90c7e37
Merge branch 'model_diag' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2023
2022-05-05 18:41:34 +02:00
Johannes Pfeifer
737524d182
model_diagnostics.m: add check for potential naming conflict
2022-05-04 13:05:27 +02:00
Sébastien Villemot
63a116fb28
New += and *= syntaxes in “endval(learnt_in=…)” blocks
2022-05-03 17:46:59 +02:00
Sébastien Villemot
0b32ad5b51
Merge branch 'ramsey_steady' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2022
2022-04-29 17:44:28 +02:00
Sébastien Villemot
b084c2e931
Perfect foresight with expectation errors: move computation of terminal steady states to the setup command
...
This is more logical, since those values are constraints from the point of view
of the solver.
Also, this allows to have maxit and tolf options for the steady state solver,
at the level of the setup command, without a clash with the same option names
for the deterministic solver at the level of the solver command.
2022-04-29 15:56:11 +02:00
Sébastien Villemot
418a8ebb5f
Drop steady_.m which is only a thin wrapper around evaluate_steady_state
...
As a consequence, move the sanity checks inside evaluate_steady_state, where
they make more sense.
2022-04-29 15:14:43 +02:00
Johannes Pfeifer
21004adf03
evaluate_steady_state.m: correctly account for presence of auxiliary variables potentially depending on Lagrange multipliers
...
Otherwise error message due to NaN may be thrown out due to them non having been set. Closes https://git.dynare.org/Dynare/preprocessor/-/issues/94
2022-04-28 21:49:05 +02:00
Sébastien Villemot
e58552d914
Merge branch 'occbin_error' into 'master'
...
Occbin: filter out problems in solving the baseline model
See merge request Dynare/dynare!2021
2022-04-28 13:04:53 +00:00
Johannes Pfeifer
6536e135cb
Occbin: filter out problems in solving the baseline model
2022-04-28 13:33:48 +02:00
Stéphane Adjemian (Charybdis)
8b197bf71c
Remove duplicate assignments for parameters.
2022-04-28 12:58:22 +02:00
Stéphane Adjemian (Charybdis)
1d22285043
Throw a warning if a parameter has no value.
2022-04-28 12:58:22 +02:00
Sébastien Villemot
a600336c92
New “add” and “multiply” keywords in “shocks(learnt_in=…)” block
2022-04-26 15:22:15 +02:00
Sébastien Villemot
7dda3c7985
Preprocessor update
...
— Reject exogenous deterministic variables in a few places where they were
erroneously accepted
– Use booleans for “exo_det” and “multiplicative” fields of M_.det_shocks
— Add checks on the value of the “learnt_in” option of “shocks” and “endval”
2022-04-26 14:52:31 +02:00
Sébastien Villemot
b6dc32621f
Merge branch 'simult' into 'master'
...
simult.m: fix saving of binary file
See merge request Dynare/dynare!2020
2022-04-25 12:52:22 +00:00
Johannes Pfeifer
6805cad636
simult.m: fix saving of binary file
2022-04-23 19:41:51 +02:00
Sébastien Villemot
8488674ce4
New shocks(learnt_in=…) and endval(learnt_in=…) blocks
...
For use with perfect_foresight_with_expectation_errors_setup.
2022-04-21 17:10:52 +02:00
Sébastien Villemot
c06be7fefd
Octave 7 fixes bug in mkdir which now creates parent directory
2022-04-20 10:36:56 +02:00
Stéphane Adjemian (Charybdis)
931a9ba336
Use residuals and jacobian matrix returned by fsolve routine.
2022-04-19 19:20:20 +02:00
Stéphane Adjemian (Charybdis)
4d646ba30b
Fix evaluation of the dynamic model.
...
Call the wrapper instead of the dynamic routine.
2022-04-19 19:15:21 +02:00
Sébastien Villemot
ce7540747b
dynare_solve: fix bug introduced in ef2bb4e669
...
The feval(f, x, args{:}) call would fail under Octave because the contents of
args{:} would be appended twice (hence too many input arguments error).
The same bug would materialize under MATLAB for errorcode>1.
2022-04-19 17:52:37 +02:00
Stéphane Adjemian (Charybdis)
63224ed45d
Bug fix (display of problematic equations).
2022-04-19 16:33:29 +02:00
Stéphane Adjemian (Charybdis)
b9f7733c6b
Fix cherrypick routine.
...
Was failing when model contain variable and parameter names ending with the name
of a built-in function.
Closes #1813
2022-04-17 10:14:15 +02:00
Sébastien Villemot
eb6a801bca
CI: bump to Octave 7.1.0
2022-04-15 14:33:02 +02:00
Sébastien Villemot
715aff891a
Octave 7 fixes bug related to generated files in +package folder
2022-04-15 14:33:02 +02:00
Sébastien Villemot
971a89fb73
Octave 7 now has ordqz (and ordeig was implemented in Octave 5)
2022-04-15 14:33:02 +02:00
Sébastien Villemot
b7c74f8e9a
Octave 7 now has jsondecode
2022-04-15 14:33:01 +02:00
Sébastien Villemot
ec5468c431
Octave 7 compatibility fix: suppress spurious warnings
...
In this version of Octave, “warning on” really enables all warnings (while this
was not the case in Octave 6, suprisingly; I think this used to be different
with even older Octave releases).
We therefore need to explicitly disable the Octave:array-as-logical warnings,
that is triggered by some internal Octave functions.
We also need to be careful to call “warning_config” instead of “warning on”
when restoring warnings to their default state.
2022-04-15 14:32:54 +02:00
Sébastien Villemot
a0e78957da
Octave 7 compatibility fix: “arguments” is a reserved keyword
...
This confuses the Octave 7 parser in the context of anonymous functions.
Simply rename the variable to “args”.
2022-04-15 14:32:54 +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
Sébastien Villemot
b70b864829
perfect_foresight_with_expectation_errors_setup: move terminal condition to last line of CSV file
2022-04-12 15:51:04 +02:00
Sébastien Villemot
a8a9051b31
New option “constant_simulation_length” to “perfect_foresight_with_simulation_errors_solver” command
2022-04-12 15:45:50 +02:00
Johannes Pfeifer
23c007e716
IVF_core.m: directly use solver option fields
2022-04-11 08:33:28 +02:00
Stéphane Adjemian (Ryûk)
ff9cf3814a
Remove useless copies of options_.
2022-04-10 22:17:45 +02:00
Stéphane Adjemian (Ryûk)
b09e91ff55
Add routine description in headers.
2022-04-10 21:22:51 +02:00
Stéphane Adjemian (Ryûk)
87ecfa9ed1
Allow nonlinear solver to fail when simulating a static model.
...
Print a message instead of throwing an error if the nonlinear solver fails in a
period, since we do not need previous or future values of the endogenous
variables. If the nonlinear solver fails in period t, the endogenous variables
are set to nan in period t.
2022-04-10 20:57:34 +02:00
Stéphane Adjemian (Charybdis)
f1aff2b370
Remove calls to dbstack in dynare_solve.
...
Adding three input parameters for maxit, tolf and tolx.
Closes #1841 .
2022-04-10 20:29:57 +02:00
Stéphane Adjemian (Ryûk)
01203f7e39
Stop deterministic simulation if nonlinear solver failure.
...
Only for purely backward/forward models. In the case of purely static models the
solution for the previous or following period is not required.
2022-04-10 10:55:40 +02:00
Stéphane Adjemian (Ryûk)
23a72d7aaa
Use dynare_solve to simulate purely forward deterministic models.
2022-04-10 09:39:28 +02:00
Stéphane Adjemian (Ryûk)
ef2bb4e669
Return and use errorcode from dynare_solve.
...
Note that the interpretation of the error code depends on the nonlinear solver.
2022-04-09 16:06:24 +02:00
Stéphane Adjemian (Ryûk)
fe7d05f46a
Remove unnecessary condition (Octave/fsolve).
...
Since we already have checked that the initial guess is not a solution.
2022-04-09 16:06:24 +02:00
Stéphane Adjemian (Ryûk)
33b1827ea5
Bug fix (mixed complementarity problems).
2022-04-09 16:06:24 +02:00
Stéphane Adjemian (Ryûk)
48c41e6b0d
Return the initial guess if nonlinear system is ill-behaved...
...
At the initial guess, and we were not able to find another guess (randomizing).
2022-04-09 16:06:24 +02:00
Stéphane Adjemian (Ryûk)
56863d6e2f
Exit if initial guess is a solution...
...
Without entering in the nonlinear solvers.
2022-04-09 16:06:24 +02:00
Sébastien Villemot
0779816457
Merge branch 'resid' into 'master'
...
resid: Fix display of name tags with Ramsey equations
See merge request Dynare/dynare!2017
2022-04-05 06:16:39 +00:00
Johannes Pfeifer
a5fe22bd1c
resid: Fix display of name tags with Ramsey equations
2022-04-04 22:50:16 +02:00
Johannes Pfeifer
c5557b5418
chol_SE.m: fix logical condition and assure symmetry instead of erroring out
2022-04-04 13:52:54 +02:00
Sébastien Villemot
b4ce69db3a
Remove options_.slowc field
...
There was no user interface, and the feature that it provides has lost
relevance over time.
Note that algorithms for block and/or bytecode still internally use some
equivalent of this parameter, but its initial value will no longer be
modifiable (which could lead to bugs, see commit
e49e7e906f
).
2022-03-31 17:39:43 +02:00
Sébastien Villemot
82070e4048
Merge branch 'mom_xls2' into 'master'
...
MoM: fix reading of XLS-files by assigning sheet info to base workspace
Closes #1840
See merge request Dynare/dynare!2014
2022-03-31 06:49:59 +00:00
Sébastien Villemot
3b4ef0df49
Add new “log” option to “var” statement
...
Ref. #349
2022-03-30 18:01:22 +02:00
Johannes Pfeifer
176baa2215
MoM: fix reading of XLS-files by assigning sheet info to base workspace
...
Closes https://git.dynare.org/Dynare/dynare/-/issues/1840
2022-03-30 09:59:36 +02:00
Johannes Pfeifer
35c30dc037
Occbin: use data instead of rawdata and gracefully exit if prefilter option is specified
...
Closes #1842
2022-03-29 12:16:48 +02:00
Stéphane Adjemian (Ryûk)
53324aad69
Return initial guess if trust_region fails.
2022-03-26 09:21:25 +01:00
Stéphane Adjemian (Ryûk)
4cccdd9074
Bug fix. Revert to previous Jacobian matrix if updated one is ill-behaved.
2022-03-25 19:42:40 +01:00
Stéphane Adjemian (Ryûk)
f2bf98ee76
Return the value of info as a third argument (block_trust_region).
2022-03-25 19:42:40 +01:00
Stéphane Adjemian (Ryûk)
aa8439d4cc
New implementation of the trust region algorithm.
...
Main difference is the presence of traps for NaN/Inf/Complex numbers in
residuals or the Jacobian matrix. Also added new unit tests.
2022-03-25 19:42:40 +01:00
Johannes Pfeifer
1ed765b8c4
perfect_foresight_solver_core.m: fix Fortran not
2022-03-25 14:23:11 +01:00
Sébastien Villemot
facab0f81b
Merge branch 'mom' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2008
2022-03-25 12:51:40 +01:00
Sébastien Villemot
e49e7e906f
Forbid changing the value of “slowc” if “block” or “bytecode” is used
...
The code is buggy and leads to wrong results, so forbid this combination.
2022-03-25 12:36:36 +01:00
Sébastien Villemot
014a3c3f2e
Merge branch 'sensitivity' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2009
2022-03-24 17:53:34 +01:00
Sébastien Villemot
9a4e08fe15
CI: bump to MATLAB R2022a
2022-03-24 17:44:51 +01:00
Sébastien Villemot
b31fe76dfd
Provisions for MATLAB R2022a
2022-03-24 17:43:40 +01:00
Johannes Pfeifer
f3bf8fb814
MOM: add missing debug option
2022-03-24 15:28:03 +01:00
Johannes Pfeifer
a1ebd20a88
dynare_sensitivity.m: provide warning if order is reset
2022-03-24 13:02:25 +01:00
Sébastien Villemot
4da9d1e718
Block (without bytecode): avoid silent failures in some corner cases
...
Either ensure that oo_.determinstic_simulation.status is set, or really error out.
2022-03-23 17:33:37 +01:00
Sébastien Villemot
dd1ec10ec8
Block (without bytecode): use dynatol.f as convergence criterion for perfect foresight
...
Was incorrectly using solve_tolf.
2022-03-23 17:25:32 +01:00
Sébastien Villemot
e5f4d96c71
Fix typo
2022-03-23 16:58:59 +01:00
Sébastien Villemot
bef8d80ba8
More conversions to logical values
2022-03-23 16:52:40 +01:00
Sébastien Villemot
d5472d2338
Tighten input sanity checks of various MEX files
...
Note that the unitary test in lyapunov_solver.m that checks sparse matrix input
had to be removed. Previously, this test was passing by chance (because the
sparse test matrices had actually no zero element, hence the internal double
float storage was the same as in the dense case). Now it consistently fails
with the additional checks in disclyap_fast MEX.
2022-03-18 22:49:46 +01:00
Sébastien Villemot
07978affa5
Block decomposition: simplify MATLAB implementation of stack_solve_algo=3 (BiCGStab)
...
This commit makes it closer to the implementation in bytecode. In practice,
this change fixes convergence problems on some models.
2022-03-16 15:00:09 +01:00
Sébastien Villemot
db5e04107f
solve_one_boundary.m: fix crash in verbose mode
2022-03-16 15:00:09 +01:00
Johannes Pfeifer
28536314c0
posterior moments: fix bugs that cause crashes
...
- Delete non-existing output argument
- prevent info from being overwritten
2022-03-14 14:50:49 +01:00
Stéphane Adjemian (Ryûk)
882091cc97
Return more info about nonlinear solver failures (solve1).
2022-03-03 22:30:38 +01:00
Stéphane Adjemian (Ryûk)
7072359241
Fix fifth output introduced in e815fb2
(exitflag was not updated).
2022-03-03 21:56:44 +01:00
Stéphane Adjemian (Ryûk)
afd8359dbf
Do not compute g twice in solve1.
...
When jacobian is evaluated numerically.
2022-03-03 20:26:06 +01:00
Stéphane Adjemian (Ryûk)
9be328aeda
Cosmetic changes.
2022-03-03 20:24:18 +01:00
Stéphane Adjemian (Ryûk)
f2193e8ec8
Add more checks on the initial evaluation.
2022-03-03 18:33:34 +01:00
Stéphane Adjemian (Ryûk)
3c85695b99
Use isinf() instead of isfinite() in solve1 routine.
2022-03-03 18:30:36 +01:00
Stéphane Adjemian (Ryûk)
e815fb2901
Display exitflag returned by fsolve.
...
When the Newton fails in the simulation of backward models.
2022-03-03 18:19:33 +01:00
Stéphane Adjemian (Ryûk)
e6592b3943
Display more info if Newton fails in backward model simulations.
2022-03-03 16:57:59 +01:00
Stéphane Adjemian (Ryûk)
7ee124bbba
Fix bug.
...
Return the paths for the endogenous only before the nonlinear solver crash.
2022-03-03 10:57:40 +01:00
Stéphane Adjemian (Charybdis)
90ae54a6ff
Translate to English.
2022-03-03 09:35:30 +01:00
Stéphane Adjemian (Charybdis)
9d1e07a2e4
Fix headers.
2022-03-03 09:35:30 +01:00
Sébastien Villemot
ae1e31b7e0
Restore the possibility of calling the “resid” function without argument
...
Can be useful when writing “z = resid;” in a .mod file (i.e. not using the
preprocessor syntax).
2022-03-01 16:40:51 +01:00
Sébastien Villemot
3d7299c1e4
New option “non_zero” to the “resid” command
...
When this option is given, the “resid” command only displays non-zero residuals
2022-03-01 14:26:16 +01:00
Sébastien Villemot
0147faad5f
Fix stack_solve_algo=1 without bytecode, on solve two boundaries simple/complete blocks
...
The result for the last simulation period was wrong.
2022-02-25 16:32:16 +01:00
Stéphane Adjemian (Charybdis)
c9825c803a
Fix description of the conditional_forecast command.
...
Closes #1844
2022-02-24 20:33:47 +01:00
Sébastien Villemot
4d39c6fab5
Merge branch 'error_message' into 'master'
...
get_error_message.m: condition on index being non-zero
See merge request Dynare/dynare!2003
2022-02-24 16:23:16 +00:00
Johannes Pfeifer
a60ce435bd
get_error_message.m: condition on index being non-zero
...
dsge_likelihood will expand the vector due to entry four of info containing the penalty, creating a 0 for entry 2
2022-02-22 12:22:51 +01:00
Sébastien Villemot
a4f4d4462c
Merge branch 'disp_dr' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2002
2022-02-21 16:19:36 +01:00
Johannes Pfeifer
d79895b66a
Display of decision rules: deal with overflow of fields
2022-02-20 11:00:34 +01:00
Sébastien Villemot
1a9abc247f
Merge branch 'mom' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2001
2022-02-18 14:22:53 +01:00
Stéphane Adjemian (Charybdis)
e7d11dd7b1
Remove aux variables from target definition (PAC).
2022-02-18 09:13:17 +01:00
Johannes Pfeifer
b5dc90b311
mom: add missing trust_region_initial_step_bound_factor option
2022-02-18 00:50:08 +01:00
Johannes Pfeifer
05519aaaa1
mom: add missing verbosity option
2022-02-18 00:48:39 +01:00
Sébastien Villemot
a376d8c9fe
Fix steady state computation with bytecode+block and solve_algo ⩽ 4 or ⩾ 9
...
– Temporary terms were not correctly passed between blocks
– solve_algo ⩾ 9 was incorrectly passed through bytecode own’s solver instead
of through dynare_solve
2022-02-17 17:28:37 +01:00
Sébastien Villemot
3734762af7
For stack_solve_algo={2,3} and solve_algo={7,8}, rather use a “crout” ILU decomposition for the preconditioner
...
In 3025a14ed9
, the call to the deprecated “luinc”
has been replaced by a call to “ilu”.
However, the type of “ilu” decomposition had not been specified. The default,
“nofill”, does not make use of the “droptol” option which was used with
“luinc”. Also, under Octave, it does not work when there is a zero on the
diagonal of the input matrix.
Rather use the “crout” type, which addresses these two issues.
2022-02-14 12:34:50 +01:00
Sébastien Villemot
fa7b331cf4
Fix crash in simulation of “Solve forward/backward complete” blocks with stack_solve_algo=4 (without bytecode)
2022-02-11 18:11:42 +01:00
Sébastien Villemot
bb793d87cc
Block decomposition: fix deterministic simulations for block of type “Solve backward”
...
The results were incorrect for those two kinds of block, when not using bytecode.
2022-02-09 14:07:33 +01:00
Sébastien Villemot
dd34554c4e
Block decomposition: fix computation of eigenvalues for blocks of “Solve backward complete” type
2022-02-09 14:07:33 +01:00
Sébastien Villemot
685598c6e2
Add interface to “static” and “incidence” options of “model_info”
...
These options were implemented and described in the reference manual, but their
interface was missing.
By the way, make various minor improvements to the description of “model_info”
in the reference manual. In particular, remove the single quotes around the two
aforementioned options (which are a remnant from an older interface).
2022-02-09 14:07:30 +01:00
Sébastien Villemot
39f47dc957
local_state_space_iteration_k MEX now uses the Fortran code (instead of the C++ code)
...
Closes : #1802
2022-02-04 11:49:46 +01:00
Johannes Pfeifer
4ccc7c7262
mom.objective_function.m: fix field naming
2022-02-03 15:12:46 +01:00
Sébastien Villemot
2cb6988de6
Merge branch 'jscale' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !1999
2022-02-03 09:25:16 +01:00
Sébastien Villemot
adb4007bda
Merge branch 'smm_lsqnonlin' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !1998
2022-02-03 09:24:37 +01:00
Johannes Pfeifer
217de5084c
check_posterior_sampler_options: make global variable an input
...
Does not properly work for scale_file-option as caller has variable not global
2022-02-02 16:20:12 +01:00
Johannes Pfeifer
57eda3886d
SMM: fix logic for check of vector output
2022-02-02 13:27:46 +01:00
Stéphane Adjemian (Charybdis)
1d916b1fe2
Bug fix.
...
[skip ci]
2022-01-27 11:07:09 +01:00
Stéphane Adjemian (Ryûk)
fca5b99a03
Fix bug (missing condition).
...
The cherrypick was failing if the selected equations were not about a PAC equation (e.g. a VAR expectation
model), because the code was assuming the existence of the pac field in M_.
2022-01-27 10:49:19 +01:00
Sébastien Villemot
df185cf19b
Merge branch 'mom_field' into 'master'
...
mom: fix error message if matched_moments-block is missing
See merge request Dynare/dynare!1997
2022-01-26 14:39:24 +00:00
Johannes Pfeifer
4ef4b929d5
mom: fix error message if matched_moments-block is missing
2022-01-25 16:26:12 +01:00
Sébastien Villemot
9c79b0d73f
Octave: better workaround for bug 46282
2022-01-25 11:32:08 +01:00
Stéphane Adjemian (Ryûk)
f5f47cd834
Add new option last_simulation_period to initval_file command.
...
Also adjust the periods in Simulated_time_series (output of the perfect
foresight solver in the workspace). Note that this dseries object contains the
observations for the initial condition (M_.orig_maximum_lag observations) and
for the terminal condition (M_.orig_maximum_lead observations).
See #1838 .
Fix testsuite (wrong file name)
2022-01-21 17:39:47 +01:00
Stéphane Adjemian (Charybdis)
38e1cd5d4e
Do not include auxiliaries in Simulated_time_series...
...
And add paths for the exogenous variables.
2022-01-21 16:50:42 +01:00
Stéphane Adjemian (Ryûk)
a08de9e661
Partial fix for #1837 .
2022-01-19 09:20:22 +01:00
Sébastien Villemot
1edb8ba7ba
Merge branch 'planner_check' into 'master'
...
evaluate_planner_objective.m: fix check for NaN moments
See merge request Dynare/dynare!1996
2022-01-18 16:45:06 +00:00
Johannes Pfeifer
b5d129de1f
evaluate_planner_objective.m: fix check for NaN moments
2022-01-18 16:12:20 +01:00
Stéphane Adjemian (Charybdis)
1fd4904ccc
Fix evaluate routine if PAC's growth option is constant.
2022-01-17 16:56:58 +01:00
Stéphane Adjemian (Charybdis)
e1d0ce28d2
Remove aux variables from evaluate routine.
...
Auxiliary variables were still present in the growth neutrality correction. This
commit remove the auxiliaries, so that the user doesn't need to update the
database with the auxiliary variable definitions.
Also adds integration test.
TODO Check that it works with log unary op
TODO Complete tests by checking that the written evaluate routine works
2022-01-14 20:45:46 +01:00
Johannes Pfeifer
3b59253416
occbin: fix bug if there is only a surprise shock in the first period
2022-01-14 08:47:37 +01:00
Johannes Pfeifer
958dcf7b48
online auxiliary filter: add option to set termination condition of loop
2022-01-13 18:42:55 +01:00
Sébastien Villemot
ca4601bd1c
dyntable: fix column width calculation in case of minus sign
...
By the same token, improve the logical expression for determining whether all
values are infinite (it was nevertheless giving the right result, because an
“all()” is implicit when an array of booleans is passed to an “if” statement).
2022-01-11 17:44:24 +01:00
Sébastien Villemot
6f83afbf42
Octave: fix some warning ids
...
Those warning ids were renamed in Octave 3.8.
2022-01-11 17:22:58 +01:00
Marco Ratto
9305cd1ef1
fixed header of occbin solver
2022-01-06 15:02:43 +01: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
8ac3f4b22b
fixed bugs in initialization of heteroskedastic shocks and first_obs>1 and nobs< full dimension of dataset
2022-01-06 14:59:33 +01:00
Marco Ratto
8130125fa7
reset nested waitbars when computing posterior smoother with occbin
2022-01-06 14:57:57 +01:00
Marco Ratto
bad52b292d
fixed index of variable names defined more than once
2022-01-06 14:51:56 +01:00
Stéphane Adjemian (Ryûk)
d18d728f7b
Fix definition of R2 in NLS routine.
2022-01-05 16:45:35 +01:00
Willi Mutschler
7f3bc60ce0
lsqnonlin only supported for method_of_moments
2022-01-04 14:33:05 +01:00
Stéphane Adjemian (Ryûk)
e1a63fbf81
Fix bug introduced in 25231f66
.
...
Set decompose equal to false if the expectation model is not a PAC.
2022-01-03 22:25:48 +01:00
Stéphane Adjemian (Ryûk)
25231f6634
Account for PAC components in evaluate routine.
...
The print_expectations routine was previously only considering the
aggregate expectation (for the target). Now it updates the
database (dseries) with each component of the PAC model. The growth
neutrality correction is included in the aggregate expectation but not
in the expectations of the components.
2022-01-03 17:28:57 +01:00
Sébastien Villemot
bdb21f9ad6
ver_less_than.m: add missing semicolons in unit tests
...
[skip ci]
2022-01-03 16:09:26 +01:00
Sébastien Villemot
86b09bccf9
dseries update
...
– load_m_file_data.m: pass structure instead of file
– removed utilities/misc/ordinal.m routine
2022-01-03 15:42:03 +01:00
Sébastien Villemot
1e5b7d4e04
Merge branch 'warning' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !1986
2022-01-03 15:22:39 +01:00
Sébastien Villemot
93883aad57
Merge branch 'version_utilities' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !1985
2022-01-03 15:22:18 +01:00
Johannes Pfeifer
8cf6fe0be4
perfect_foresight_setup.m: add line skip
2021-12-30 14:27:12 +01:00
Johannes Pfeifer
086e0895cb
initial_estimation_checks.m: fix warning display
2021-12-27 13:03:47 +01:00
Stéphane Adjemian (Charybdis)
1c953cca01
Moved CLI routines.
2021-12-21 16:22:30 +01:00
Stéphane Adjemian (Charybdis)
4b18aafa9b
Add CLI for evaluate_smoother.
2021-12-21 16:17:29 +01:00
Johannes Pfeifer
97b98d155e
Partially revert "Remove more utilities related to conversion of oo_ between Dynare versions"
...
This partially reverts commit 26597bf093
.
2021-12-21 12:44:49 +01:00
Sébastien Villemot
04ab1e5696
Merge branch 'steady_debug' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !1982
2021-12-20 12:08:17 +01:00
Stéphane Adjemian (Ryûk)
ba7a53b38b
Code factorization (NLS).
2021-12-19 17:14:25 +01:00
Johannes Pfeifer
b966e5eb7a
evaluate_steady_state.m: do not check auxiliary initial values if they haven't been set
2021-12-19 11:39:24 +01:00
Stéphane Adjemian (Ryûk)
60d8f44c4a
Fix estimation range.
2021-12-18 22:27:45 +01:00
Stéphane Adjemian (Ryûk)
2a796c8e34
Account for logged variables under diffs.
2021-12-18 19:58:55 +01:00
Stéphane Adjemian (Ryûk)
cc90bd4cf5
Fix typos in regular expressions.
2021-12-18 19:28:58 +01:00
Stéphane Adjemian (Ryûk)
8fa8ee8235
Bug fix (wrong dimension for exogenous variables).
...
Also removed the distinction between exogenous and endogenous variables when
replacing variables by columns in the data matrix.
2021-12-17 20:54:28 +01:00
Stéphane Adjemian (Ryûk)
4512000f0f
Display estimation results PAC/NLS.
2021-12-17 20:53:39 +01:00
Stéphane Adjemian (Ryûk)
8c8a2cf0fa
Add trap if SSR is not a real number.
2021-12-17 14:54:58 +01:00
Stéphane Adjemian (Ryûk)
1cf99b5227
Do not update the database if there is no aux. variables.
2021-12-17 14:21:10 +01:00
Stéphane Adjemian (Ryûk)
b297353b06
PAC decomposition between stationary and non-stationary components.
...
The taget in PAC equation can be decomposed into an arbitrary number of components (variables
in the VAR auxiliary model).
TODO Iterative OLS estimation (which is not the preferred estimation routine).
TODO Decomposition in the routine evaluating the forecasts for each component.
2021-12-17 12:17:13 +01:00
Sébastien Villemot
f8fc786459
Merge branch 'het_shocks' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !1980
2021-12-15 10:27:06 +01:00
Sébastien Villemot
600e468448
Merge branch 'cosmetics_header' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !1979
2021-12-15 10:26:52 +01:00
Stéphane Adjemian (Ryûk)
4dd3ee8546
Add CLI for some routines.
...
- steady,
- check,
- evaluate_likelihood,
- evaluate_posterior_kernel, and
- evaluate_prior.
*Example*
After running a mod file, on the Matlab's command line:
>> cli.check
EIGENVALUES:
Modulus Real Imaginary
0 0 0
1.389e-16 1.389e-16 0
0.6452 0.6452 0
0.9707 0.9707 0
1.038 1.038 0
1.271e+16 1.271e+16 0
2.33e+17 2.33e+17 0
There are 3 eigenvalue(s) larger than 1 in modulus
for 3 forward-looking variable(s)
The rank condition is verified.
2021-12-14 14:45:57 +01:00
Johannes Pfeifer
3dc398f590
dynare_estimation_1.m: improve comment on Hessian recomputation
2021-12-14 11:22:41 +01:00
Johannes Pfeifer
7303275bef
dsge_likelihood.m: update header
2021-12-14 11:22:41 +01:00
Johannes Pfeifer
fdb14b3af8
IVF: turn off near-singularity warning in estimation
2021-12-14 11:21:16 +01:00
Johannes Pfeifer
8a76c689ea
IVF: properly deal with error code
2021-12-14 11:21:16 +01:00
Johannes Pfeifer
1bfb9ffbb9
heteroskedastic shocks: take into account first_obs
2021-12-14 11:21:16 +01:00
Sébastien Villemot
301fe42ed8
Merge branch 'varendo' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !1978
2021-12-14 11:09:47 +01:00
Sébastien Villemot
6a41cbdb13
Merge branch 'minimal_state' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !1963
2021-12-14 11:09:28 +01:00
Sébastien Villemot
7770c99f1b
dseries: prevent horse-race condition when saving and loading mat file
2021-12-14 11:00:16 +01:00
Johannes Pfeifer
c60a1624d1
identification: separate error code and option
...
Solves issues with Monte Carlo sampling where error code affected option for later draws
2021-12-13 15:14:23 +01:00
Johannes Pfeifer
de90c5d246
Provide warning if moments_varendo is not set but conditional_variance_decomposition
2021-12-13 13:08:59 +01:00
Sébastien Villemot
4fac512bfd
Merge branch 'dsge_var' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !1973
2021-12-13 12:40:27 +01:00
Stéphane Adjemian (Ryûk)
f687b531fd
Bug fix (wrong indexing in present value evaluation).
2021-12-11 18:44:01 +01:00
Johannes Pfeifer
fc05ddd5fe
dsge_var_likelihood.m: remove unused output arguments
2021-12-10 12:01:40 +01:00
Johannes Pfeifer
5f732803d8
dsge_var: pass data moments as function inputs instead of via base workspace
...
going via base prevents parallel execution
2021-12-10 12:01:07 +01:00
Sébastien Villemot
f7f7c77411
Merge branch 'ramsey_debug' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !1977
2021-12-10 11:12:33 +01:00
Sébastien Villemot
ee5eec3224
Merge branch 'disp_th_moments' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !1975
2021-12-10 11:01:59 +01:00
Sébastien Villemot
6dd787569a
Merge branch 'SMM' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !1974
2021-12-10 11:01:37 +01:00
Johannes Pfeifer
741772d514
evaluate_steady_state.m: correctly condition debugging info on existence of objects from steady state file
2021-12-10 09:05:55 +01:00
Johannes Pfeifer
f5def11a23
disp_th_moments.m: honor noprint
2021-12-09 09:01:10 +01:00
Johannes Pfeifer
137ba73c4c
SMM: add forgotten error code
...
[skip CI]
2021-12-08 19:07:18 +01:00
Johannes Pfeifer
d5a2015ded
mom: gracefully exit if unobserved moments are matched.
2021-12-08 09:38:41 +01:00
Johannes Pfeifer
d039bcbfec
evaluate_planner_objective.m: initialize newly introduced options and fix naming
2021-12-07 13:56:01 +01:00
Johannes Pfeifer
c07508a917
occbin_write_regimes: distinguish between smoother and simulations
...
Closes : #1828
2021-12-07 12:41:34 +01:00
Sébastien Villemot
36705d505b
Merge branch 'make_ex' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !1968
2021-12-07 12:20:29 +01:00
Normann Rion
cf829fb28e
A few fixes for k-order welfare assesment in `evaluate_planner_objective`
...
As suggested in !1962
2021-12-07 12:19:30 +01:00
Johannes Pfeifer
ce9bb2f09d
make_ex_.m: gracefully exit if user attempts to set non-existent period 0
2021-12-06 15:04:30 +01:00
Johannes Pfeifer
7bc15927a9
realtime_shock_decomposition.m: gracefully exit if nobs-option is not set
2021-12-03 09:19:59 +01:00
Johannes Pfeifer
82689795e4
dyn_first_order_solver.m: add debugging information
2021-12-01 14:36:21 +01:00
Sébastien Villemot
06fd42c19b
Drop the dynare_simul_ MEX in favour of the new Fortran k_order_simul MEX
2021-11-26 17:37:53 +01:00
Sébastien Villemot
74d070c216
Merge branch 'model_diagnostics' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !1964
2021-11-26 17:37:06 +01:00
Sébastien Villemot
a3956996f7
Merge branch 'local_state_space_it' of git.dynare.org:normann/dynare
...
Ref. !1962
2021-11-26 17:35:30 +01:00
Johannes Pfeifer
58343c3988
model_diagnostics.m: check for consistent number of equations for Ramsey case before checking for steady state
2021-11-25 16:04:14 +01:00
Johannes Pfeifer
459d6ded6e
get_minimal_state_representation.m: set undefined output argument
2021-11-24 18:59:48 +01:00
NormannR
6b566d37c7
Add k-order conditional and unconditional welfare evaluation in evaluate_planner_objective
2021-11-24 17:30:02 +01:00
Stéphane Adjemian (Ryûk)
f4a7a5430c
Re-implement PAC equations.
...
This commit only introduce new elements in the Dynare language (adding the
possibility to decompose the target into stationary and non stationary
components) and insure that all the former codes (ie without decomposition of
the target) are still working as expected.
2021-11-24 16:40:35 +01:00
Sébastien Villemot
91aa1f940f
Forbid the “block” option with “ramsey_model”/“ramsey_policy”
...
The current implementation needs the Jacobian of the full model, which is not
provided by the block-decomposed routines.
Closes : #1823
2021-11-23 17:40:02 +01:00
Sébastien Villemot
4b76d76175
evaluate_static_model.m: fix the block without bytecode case
...
The routine would not put elements at the right place in the residuals
vector (it would use variable indices instead of equation indices).
Also change the routine so that it computes a residual on evaluated
equations (instead of systematically returning zero for those).
Finally, simplify resid.m by calling this routine instead of embedding a
similar code.
Ref. #1823
2021-11-23 17:40:02 +01:00
Johannes Pfeifer
0aadc88602
dynare_solve.m: allow turning off display of messages
2021-11-23 12:41:35 +01:00
Johannes Pfeifer
4aaea53cd6
osr1.m: fix display of compatible optimizers
2021-11-23 12:41:04 +01:00
Stéphane Adjemian (Ryûk)
c38d58b56f
Remove debugging display (growth neutrality correction).
...
(cherry picked from commit 238b66dfe0fd0bcb56becaf1ed96be800d90ba40)
2021-11-17 15:10:09 +01:00
Stéphane Adjemian (Ryûk)
0c9eb182c4
Cosmetic change.
...
This patch provide a mathematically equivalent approach to update the growth
neutrality correction.
(cherry picked from commit 980a890487cd983eba027bdec63c8a777fd793f7)
2021-11-17 15:08:29 +01:00
Stéphane Adjemian (Ryûk)
d3ecfd5de7
Fix bug (growth neutrality correction).
...
Non zero mean exogenous variables in non optimizing part where not accounted for
due to a wrong call to `isfield` function. It is not possible to test
simultaneously the existence of a field and a subfield.
(cherry picked from commit 5a7c0fd2dda6c0ccc554994524bbefb95c29e722)
2021-11-17 15:08:12 +01:00
Stéphane Adjemian (Ryûk)
125ba21f29
Move definition of γ (share of optimizing agents) up.
...
(cherry picked from commit 405110a9e2e7dbcd41d0aa406986e016aa3a0dff)
2021-11-17 15:07:57 +01:00
Stéphane Adjemian (Ryûk)
39df328319
Fix bug in PAC/MCE.
...
Wrong ordering of the reduced form parameters in PAC/MCE auxiliary variable.
(cherry picked from commit e333e851776e4f6afeb9ab1b9536c375e91a4eba)
2021-11-17 15:04:27 +01:00
Sébastien Villemot
1280566bec
CI: bump to Octave 6.4.0
2021-11-09 18:12:36 +01:00
Sébastien Villemot
1f44c78170
Merge branch 'ramsey' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !1959
2021-11-09 11:02:00 +01:00
Johannes Pfeifer
1174cad1f8
evaluate_static_model.m: provide jacobian output with bytecode
...
Set to NaN for block
2021-11-08 14:31:24 +01:00
Johannes Pfeifer
7cffd34b66
Ramsey: do not check static model if steady state file is present
...
Check will typically crash due to initialization with 0
2021-11-08 14:31:12 +01:00
Sébastien Villemot
f9e3132e4e
Merge branch 'dyn_ramsey_static' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !1957
2021-11-08 12:23:35 +01:00
Johannes Pfeifer
ce899af24d
evaluate_static_model.m: provide promised output argument
2021-11-05 12:27:12 +01:00
Johannes Pfeifer
9a32720ac0
evaluate_steady_state.m: allow debugging of Ramsey equations
2021-11-05 12:22:43 +01:00
Johannes Pfeifer
b1e72d531d
dyn_ramsey_static.m: only read first entry of error code
...
May crash otherwise
2021-11-05 08:59:47 +01:00
Johannes Pfeifer
e173ad938b
evaluate_planner_objective.m: gracefully exit if decision rules are missing
2021-11-02 18:19:43 +01:00
Sébastien Villemot
3f40404bc0
Merge branch 'header' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !1954
2021-10-28 10:43:32 +02:00
Sébastien Villemot
c67fd57237
Merge branch 'mode_check' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !1953
2021-10-28 10:42:55 +02:00
Johannes Pfeifer
f09b048c8f
inverse_gamma_specification.m: correct header
...
[skip CI]
2021-10-27 10:13:04 +02:00
Stéphane Adjemian (Charybdis)
5e0c4272ce
Fix wrong logic in test introduced in ceb67c42c
.
2021-10-26 10:24:19 +02:00
Stéphane Adjemian (Charybdis)
ceb67c42c7
Add more explicit error message.
...
pac.print does not work in PAC/MCE equations.
2021-10-25 19:23:51 +02:00
Sébastien Villemot
23fdec40f1
Merge branch 'purely_backward' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !1951
2021-10-25 18:27:58 +02:00
Johannes Pfeifer
17a58ccec6
stochastic_solvers.m: fix bug introduced in 57bbec1f
...
Rely on lead_lag_incidence instead of kstate to identify states
2021-10-25 18:24:54 +02:00
Johannes Pfeifer
c72d7e0ffd
mode_check.m: have debug mode provide explicit message instead of just the code
2021-10-25 16:54:34 +02:00
Johannes Pfeifer
8e063f0c33
evaluate_steady_state.m: fix missed transition to cell array
2021-10-25 16:44:12 +02:00
Stéphane Adjemian (Charybdis)
a5ccd0ae90
Acknowldge time_shift option in print_expectations.
...
Lagged information set was missing in the evaluation routine.
2021-10-24 19:32:46 +02:00
Stéphane Adjemian (Charybdis)
7f0ba33d5a
Fix doc headers (missing output).
2021-10-24 19:32:46 +02:00
Sébastien Villemot
356999768c
Merge branch 'planner_output' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !1949
2021-10-22 17:38:28 +02:00
Johannes Pfeifer
048e059b68
evaluate_planner_objective.m: add warning if NaN are encountered
2021-10-21 11:42:43 +02:00
Stéphane Adjemian (Ryûk)
9acac86bd8
Fix cherrypick for PAC equations in case of rule of thumb agents.
...
The correction for growth neutrality should be substituted in the optimal part
of the PAC equations.
(cherry picked from commit 12694ff9347b2191b4e0f6a32cb038956cb38f53)
2021-10-21 10:22:33 +02:00
Stéphane Adjemian (Ryûk)
f778e3c1ce
Fix growth neutrality correction in PAC equations.
...
- Force long run levels of the exogenous variables to be zero or g (the BGP growth rate of the LHS endogenous variable).
- Fix the correction of the correction for the share λ (aak γ).
- Provisions for the case where the long run level of the exogenous variable is
different from 0 or g (see tmp1 and ll which should be added to the growth
neutrality correction as a constant).
(cherry picked from commit a4423d734e1df1d4ee09c7225d7fd610e0d94cd1)
2021-10-21 10:19:23 +02:00
Stéphane Adjemian (Ryûk)
96c24b3052
Add rehash command so that Matlab acknowledge the created routines.
...
[skip ci]
2021-10-21 09:59:37 +02:00
Johannes Pfeifer
e8fd1f53db
evaluate_planner_objective.m: suppress output
...
[skip CI]
2021-10-21 09:44:49 +02:00
Sébastien Villemot
368ff7f8fe
Merge branch 'Zhong' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !1946
2021-10-20 15:54:40 +02:00
Sébastien Villemot
e66a1a63f8
local_state_space_iteration_2 MEX: enable parallelization by default
2021-10-20 15:33:04 +02:00
NormannR
1ad2680682
Fixes the evaluate_planner_objective routine Deals properly with the output provided by disp_th_moments
2021-10-18 17:08:28 +02:00
Johannes Pfeifer
226ed712bd
Documentation: add missing author
2021-10-17 15:11:52 +02:00
Johannes Pfeifer
c1483b4c61
Restore backward-compatibility when using load_mh_file
...
estim_params_ needs to be saved following 6e06acc7
2021-10-13 18:01:15 +02:00
Sébastien Villemot
f9a550651d
Merge branch 'k_order_fix' into 'master'
...
k_order_simulation bug: fixes simulations and adds/corrects integration test
Closes #1819
See merge request Dynare/dynare!1940
2021-10-12 15:34:29 +00:00