Commit Graph

1453 Commits (edede274f27e1fcd4d43037e0cebae105c37adbd)

Author SHA1 Message Date
Stéphane Adjemian (Charybdis) edede274f2
Make the detection of the target in PAC equation more robust.
In a PAC equation, the error correction term must be written as:

β×(yₜ₋₁-xₜ₋₁)

where x is the endogenous variable determined by the equation and y
the target for x. The ordering matters, if not respected the
preprocessor wll not identify the error correction term (hence the
target) and will throw an error. The target must be an endogenous
variable or the log of an endogenous variable. For a more general
target, ie an expression, one can create an auxiliary variable.

We impose the ordering, target comes first in the error correction
term, so that the stability condition is always β>0 (this constraint
can be enforced when estimating the PAC equation).
2020-07-24 17:36:31 +02:00
Stéphane Adjemian (Charybdis) 7f50b02910
Added test where the PAC equation doesn't have lags on the endogenous variable.
This example is currently failing.
2020-07-22 12:25:05 +02:00
Stéphane Adjemian (Charybdis) 897e2fc63b
Added test with two PAC equations in the same mod file. 2020-07-22 12:21:23 +02:00
Stéphane Adjemian (Charybdis) 046960c4a8
Merge remote-tracking branch community/master into enterprise 2020-04-03 11:33:46 +02:00
Johannes Pfeifer b8b05300c1 missing_DiffuseKalmanSmootherH1_Z.m: fix bug with variable dimension 2020-04-02 19:22:55 +02:00
Willi Mutschler 64a2a4388a
🐛 📖 Fixes TaRB with student t proposal distribution 2020-04-01 14:46:22 +02:00
Sébastien Villemot 43ed7b2b69
Merge remote-tracking branch 'community/master' into enterprise 2020-03-27 16:28:41 +01:00
Johannes Pfeifer 16cbfa7f29 noprint: add integration test 2020-03-08 09:01:00 +01:00
Sébastien Villemot 3ec1d15107
Fix interaction of “predetermined_variables” with “histval” (preprocessor#47)
Also add a corresponding regression test case.
2020-03-02 17:10:58 +01:00
Stéphane Adjemian c1541bebbf Merge branch 'Ramsey_estimation' into 'master'
testsuite: add integration test for estimation with Ramsey

See merge request Dynare/dynare!1719
2020-03-02 08:30:13 +00:00
Johannes Pfeifer 068a3e4bde testsuite: add integration test for estimation with Ramsey
[skip ci]
2020-03-02 09:17:36 +01:00
Stéphane Adjemian (Charybdis) 2083246a35
Add initial condition for mh_tune_jscale.
Closes #1717.
2020-02-29 13:25:24 +01:00
Johannes Pfeifer f89c1b58d8 Add integration test for steady state parameter updating 2020-02-25 14:48:29 +01:00
Johannes Pfeifer 3cf622cdc1 Output M_ in stoch_simul.m and discretionary_policy.m
Fixes https://git.dynare.org/Dynare/dynare/issues/1711 together with https://git.dynare.org/Dynare/preprocessor/-/merge_requests/15
2020-02-24 14:14:41 +01:00
Willi Mutschler f4dc2ee743
🐛 Fix wrong third-order computation in pruned state space system
Related to #1706

 Add unit test for pruned state space up to order 3


//


Changed tolerance in new test
2020-02-16 22:55:16 +01:00
Houtan Bastani 71def361fb
macro processor: add test of tuple index in @#for loop
[skip ci]
2020-02-14 17:29:41 +01:00
Sébastien Villemot 633f1ad85a
Testsuite: change the seed for some Octave test
Under Octave, the default seed in fs2000ns_uncorr_ME.mod leads to a generated
dataset that makes fs2000ns_corr_ME.mod and fs2000ns_corr_ME_missing.mod
fail (due to a large difference between univariate and multivariate diffuse
filters).
2020-02-13 18:12:10 +01:00
Sébastien Villemot 3b60e26e63
Testsuite: properly clean generated datafiles under kalman/likelihood_from_dynare/ 2020-02-12 18:02:08 +01:00
Johannes Pfeifer 30bfa16211 Fixes related to estimation under discretion 2020-02-06 13:30:00 +01:00
Sébastien Villemot a8e54d791a
Testsuite: set the random seed for unitary tests, for reproducibility 2020-02-04 18:19:35 +01:00
Sébastien Villemot 177c5c359f
Implement estimation under discretionary optimal policy
Also add a test case.

For the time being, estimating parameters that appear in the discount factor is
not supported.

Ref. #1173
2020-02-03 18:29:45 +01:00
Johannes Pfeifer 6cf5e6495a fs2000_simul.mod: make sure we use the estimated parameter vector
Makes the simulation converge without turning to homotopy
2020-01-31 13:22:47 +01:00
Stéphane Adjemian (Odysseus) d5e2b0f9f8 Updated integration test with new interface for aggregate routine. 2020-01-29 18:28:35 +01:00
Johannes Pfeifer 9e82432f87 Gali_discretion.mod: filter out NaN in planner_objective
Related to https://git.dynare.org/Dynare/dynare/issues/1699
2020-01-29 17:48:16 +01:00
Sébastien Villemot 7f02fe5a78
Testsuite: increase numerical tolerance for sw_minimal.mod test
Needed for some runners, e.g. lupi
2020-01-27 23:16:41 +01:00
Stéphane Adjemian (Charybdis) 82f642fbca
Added missing case in integration tests for particle filters.
There was not test for the conditional particle filter (CPF).
2020-01-27 22:57:41 +01:00
Sébastien Villemot fc27fad46d
Preprocessor: Do not simplify constant equations which have a tag attached
In particular, in the case of an 'mcp' tag, this could lead to a convergence
failure.

Also modify the lmmpc/rbcii.mod test so that it fails if convergence is not
obtained, in order to detect such regressions earlier.

Closes: #1697

This preprocessor update also includes the following changes:
— removal of license.txt, now merged in back in the main Dynare one
– various code simplifications and modernizations in the macro processor
— minor code simplification in parsing of the --+ options: … +-- line
2020-01-27 16:12:25 +01:00
Sébastien Villemot 01d5d734c6
CI: skip two further tests under MATLAB R2009b, that apparently trigger a MATLAB bug 2020-01-24 16:40:55 +01:00
Sébastien Villemot 3b9cc0e9f7
Testsuite: use whitespace-separated syntax for options in .mod file
Follows from d3e90a8dbf.
2020-01-24 16:01:17 +01:00
Willi Mutschler 3d51ee9e23
Added unit tests for minimal state space system 2020-01-24 14:20:05 +01:00
Willi Mutschler aa0f278edc
📃 Update license 2020-01-24 12:45:15 +01:00
Willi Mutschler 5525a7c515
🏇 Better minimal state space handling and unit tests 2020-01-24 12:45:08 +01:00
Willi Mutschler c4f7c416fa
🐛 Fix #1694 by robust rank tolerance and histc 2020-01-24 12:44:26 +01:00
Sébastien Villemot 66a5113500
Preprocessor: fix derivation order for “identification” without “stoch_simul”
Also add a regression test.

Closes: preprocessor#40
2020-01-20 17:28:05 +01:00
Sébastien Villemot e371b1a94b
New option “filtered_theoretical_moments_grid”, that supersedes “hp_ngrid”
The old option is left for backward-compatibility purposes, but it has the same
effect as the new one.

Closes: #1093
2020-01-20 16:23:10 +01:00
Sébastien Villemot a753c18d61
Testsuite: add various missing files to source tarball 2020-01-16 16:54:47 +01:00
Sébastien Villemot 3ee9ada8d3
Octave compatibility fix: skip unit test for load_m_file_data_legacy.m
The failure is impossible to reproduce outside the runners. Skip the test, for
lack of a better solution.
2020-01-14 14:58:38 +01:00
Sébastien Villemot 9bac6a0d32
Octave compatibility fix: skip some tests under Octave 5.1, due to a bug in ordeig 2020-01-14 11:49:41 +01:00
Sébastien Villemot c5f50a34e2
MATLAB compatibility fix: skip identification/kim/kim2.mod test under R2009b
MATLAB crashes, most likely due to an internal bug.
2020-01-14 11:45:03 +01:00
Sébastien Villemot 7c2338034f
Testsuite: drop useless version check (we require at least MATLAB R2009b/7.9) 2020-01-14 11:26:06 +01:00
Sébastien Villemot fd13063a5c
Octave compatibility fix: “fig” format is unsupported 2020-01-13 18:33:47 +01:00
Sébastien Villemot bde2f1977c
MATLAB compatibility fix: skip mode_compute=3 test under R2009b
In this version, fminunc fails due to Inf value.
2020-01-13 18:30:28 +01:00
Sébastien Villemot d9b9f78392 Merge branch 'particle_check' into 'master'
Particle filters: provide error if trends or prefiltering is used

Closes #1690

See merge request Dynare/dynare!1695
2020-01-13 11:02:29 +00:00
Johannes Pfeifer 23cac089f1 fs2000_ns_common.inc: set order of approximation explicitly to 1 2020-01-12 17:13:24 +01:00
Sébastien Villemot 7e770f69e7
Remove workaround for errors in MEX files
Because at some point throwing exceptions from MEX files (with mexErrMsgTxt())
was not working under Windows 64-bit, we had designed a workaround to avoid
using exceptions.

Most MEX files were returning an error code as their first (or sometimes last)
argument, and that code would have to be checked from the MATLAB code.

Since this workaround is no longer needed, this commit removes it. As a
consequence, the interface of many MEX files is modified.

For some background, see https://www.dynare.org/pipermail/dev/2010-September/000895.html
2020-01-10 18:33:11 +01:00
Houtan Bastani bf102030cb
support saving exogenous variables in `dynasave`, `dynasave`; fix bugs in `dynasave`; add test
- `dynasave`: if a variable being saved was named `n` or `s`, the `eval` statements would break the code
- `dynasave`: use the `-struct` option to `save` to avoid `eval` statements
- `dynasave` and `dynatype`: do everything in 1 loop instead of 2
- `dynasave` and `dynatype`: use `strcmp` instead of `strfind`

- preprocessor update contains:
  - Partial reversion of global indentation of macro processor header files introduced in e2d5a83592634f0604d8c86409748cd2ec5906d2
  - Symbol List check pass: allow caller to specify the valid types of variables in a Symbol List
  - Allow `dynasave` and `dynatype` to support exogenous variables in their var_list

issue #1691
2020-01-06 12:45:44 +01:00
Willi Mutschler 45e9771eb8
Fixed bug regarding non-stationary variables in pruned moments 2019-12-20 12:30:53 +01:00
Willi Mutschler 8b9b49f8d7
Finished identification order=1|2|3
Note that I still need to do a code clean up (provide some licenses for functions from other people) and to double check order=3. There is also much room for speed and memory improvement, but the code works fine for now. I will also provide more information to the merge request soon about the detailed changes for future reference.
2019-12-20 12:28:55 +01:00
Sébastien Villemot d40b775260
Preprocessor: new “with_epilogue” option and related fixes
Ref. !1688
2019-12-20 11:57:34 +01:00
Sébastien Villemot c04c111d97
Merge branch 'rattoma/dynare-epilogue'
Ref. !1688
2019-12-20 11:51:41 +01:00