Commit Graph

124 Commits (master)

Author SHA1 Message Date
Stéphane Adjemian (Argos) 9f9f4a99ba
Throw an error if composite PAC target ∧ trend_component aux. model. 2024-01-29 15:23:03 +01:00
Stéphane Adjemian (Ryûk) 735bd66d4d
Remove unused output arguments. 2023-12-18 07:48:27 +01:00
Sébastien Villemot 1d5a442fe5
Bump minimal required version of Octave to 7.1.0
Incidentally, this means that the JSONlab submodule is no longer needed, so it
is removed in the present commit.

Closes: #1907
2023-11-22 17:46:13 +01:00
Johannes Pfeifer b3ce518433 Further naming consistency improvements 2023-10-25 11:22:50 +02:00
Stéphane Adjemian (Argos) 5e869669a0
Set verbose to false by default. 2023-07-06 22:26:07 +02:00
Stéphane Adjemian (Charybdis) 3aeb1ff7e3
Fix pac.estimate.iterate_ols.
Was crashing if the auxiliary model contains a constant.

See https://forum.dynare.org/t/iterative-ols-for-pac-equation/21379.
2022-11-24 16:29:49 +01: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 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 9c79b0d73f
Octave: better workaround for bug 46282 2022-01-25 11:32:08 +01:00
Stéphane Adjemian (Ryûk) ba7a53b38b
Code factorization (NLS). 2021-12-19 17:14:25 +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
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
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
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
Sébastien Villemot f7149d60cc
NLS estimation: workaround for Octave random failure to read the generated ssr_*.m file 2021-09-23 16:21:25 +02:00
Sébastien Villemot b60607a5b3
Fix spurious warning at startup under Octave about +pac/+bgp/{get,set}.m
This is a workaround for Octave bug 46849. It complements commit
4c0b2e8c4e.

The workaround consists in moving the two problematic files to a subfolder
which is not in the path at startup. They will be added to the path later, at a
time when the Octave:shadowed-function warning has already been disabled by
warning_config.m.

Closes: #1817
2021-09-21 15:19:06 +02:00
Stéphane Adjemian (Ryûk) 13c6cf86ce
Cosmetic change (code factorization). 2021-09-15 13:45:39 +02:00
Stéphane Adjemian (Ryûk) 32b8d6c72a
Remove unnecessary condition. 2021-09-15 13:45:39 +02:00
Stéphane Adjemian (Ryûk) 60c8ed1948
Fix bug, pac.bgp.set should also work with exogenous variables. 2021-09-15 13:45:39 +02:00
Stéphane Adjemian (Charybdis) f1bf12c601
Apply patch from d440b7082 for (VAR based) expectations in PAC.
Fix the computation of h1 and h0 if the auxiliary model (VAR) has a constant.
2021-09-07 18:39:52 +02:00
Stéphane Adjemian (Ryûk) 4cf1a358ee
Fix growth neutrality correction in PAC/MCE equation. 2021-09-01 11:27:42 +02:00
Stéphane Adjemian (Ryûk) cd2ed823b6
Fix constant in VAR and PAC expectations...
When the VAR auxiliary model has a constant.
2021-07-21 18:02:11 +02:00
Stéphane Adjemian (Ryûk) 2b4572affd
Allow arbitrary nonzero mean exogenous variables in PAC equations.
Previously any nonzero mean exogenous variable had to be centered on
the growth rate (first difference) of the (PAC's LHS) endogenous
variable.
2021-07-11 17:06:53 +02:00
Stéphane Adjemian (Ryûk) d9298ca03a
Bug fix, wrong definition of the growth neutrality correction...
In PAC equations with optimizing and rule of thumb agents (division
by lambda was missing). Also add comments.
2021-07-11 17:06:53 +02:00
Sébastien Villemot 766fff88f6
Use secure URL for link to GNU licenses 2021-06-09 17:35:05 +02:00
Stéphane Adjemian (Charybdis) 3a823c488f
Fix PAC equations with lags on exogenous variables. 2021-04-02 15:52:30 +02:00
Sébastien Villemot 47477e152a
Bump minimal Octave version to 6.2.0 2021-03-12 16:21:57 +01:00
Sébastien Villemot 901d8355e3
PAC iterative OLS: compatibility fix for Octave < 6 2021-02-04 16:01:30 +01:00
Sébastien Villemot 8e9085eea4
PAC NLS estimation: Octave compatibility fix
In regular expressions, the end-of-word operator (\>) does not behave the same
under Octave and under MATLAB. See:
https://savannah.gnu.org/bugs/index.php?59992

In this case, we can simply drop the \> operator, since there is no risk of
matching a partial variable name (since there is already “(-1)” at the end of
the pattern).

By the way, remove a useless parenthesis grouping in the regexp.
2021-02-02 17:02:04 +01:00
Sébastien Villemot e26a5e2805
NLS: compatibility fix for Octave and MATLAB < R2014b 2021-01-15 17:42:00 +01:00
Stéphane Adjemian (Charybdis) a40a940d51
Same as 8aa86a22 in Iterative OLS. 2020-01-06 11:03:58 +01:00
Stéphane Adjemian (Charybdis) 8aa86a2244
Save the list of parameter names in pac estimation results (NLS). 2020-01-06 11:03:26 +01:00
Stéphane Adjemian (Charybdis) d740af10f3 PAC/nls save lhs and fitted variables. 2019-11-25 17:29:45 +01:00
Stéphane Adjemian (Charybdis) fce51c6cc4 Added R² to PAC NLS estimator. 2019-10-28 16:35:45 +01:00
Stéphane Adjemian (Charybdis) 6a959c4629 Put estimated residuals in a dseries object. 2019-10-28 16:34:56 +01:00
Dóra Kocsis 3648ccb8ff Adjust result output for NLS and Iterative OLS. 2019-10-10 10:10:23 +02:00
Sébastien Villemot 3434ec2f9b
NLS estimation of PAC: fmincon now available under Octave 2019-10-09 12:32:26 +02:00
DoraK 41c66583ac Add linear combination support for growth neutrality in Iiterative OLS. 2019-10-08 23:18:40 +02:00
DoraK 8f6647b557 fix typo 2019-10-08 23:15:10 +02:00
Sébastien Villemot 8e1528c1cb
Temporary fix for growth parameter in PAC models
The preprocessor has been modified to allow linear combinations in the growth
parameter (see Dynare/preprocessor@a0f74f5c16 and
Dynare/preprocessor@d873414728).

This commit restores the previous functionality (i.e. it fixes the simple case
where only one parameter/variable is provided for the growth parameter).

The code still needs to be adapted to really handle linear combinations.
2019-09-26 17:35:31 +02:00
Stéphane Adjemian (Charybdis) e3f1ea7e3c Added upper bound to error correction parameter.
Available only for lsqnonlin, fmincon, annealing, and particleswarm algorithms.
2019-07-24 11:21:52 +02:00
Stéphane Adjemian (Charybdis) 9be7568c94 Bug fix in growth neutrality correction.
An index was used instead of a parameter value when modifying the
correction (for handling models with non optimizing agents and/or models with
exogenous variables).
2019-05-17 12:27:15 +02:00