By default, the preprocessor substitutes logs and diffs by auxiliary variables
only in equations of auxiliary models (VAR, PAC). Hence they are not
substituted in the equation defining the target, since it is outside the
auxiliary model.
The fix consists in doing the substitution in that equation as well, when we
parse the linear combination within that equation.
Ref. dynare#1837
The existing check (in AbstractEstimatedParamsStatement::commonCheckPass()) was
only working inside a given estimated_params block, but not across blocks.
This option provides the same behaviour as before the change in
60ef6bbdbd.
It is typically useful when doing several estimations in the same .mod file.
The purpose of this statement is to specify the options that apply to the whole
model, when there are several “model” blocks, so as to restore the symmetry
between those blocks (since otherwise one “model” block would typically bear
the options, while the other ones would typically have no option).
It still remains possible to specify the options on one “model” block, or even
spread accross several ones.
Closes: #19
In a model with [static]/[dynamic] equations, if the user was using include_eqs
with a list of equations that does *not* contain equations marked
[static]/[dynamic], then the call to ModelTree::includeExcludeEquations(…,
static_equations=true) would have an empty list of equation tags (as stored
in tag_eqns).
The right behaviour in this case is to exclude all static equations. However,
the code would exclude none, and this would disrupt the equilibrium between
[static] and [dynamic] equations (since all [dynamic] equations were excluded
by the other call to the same method).
The fix consists in removing the shortcut that returns from the method if
tag_eqns is empty.
Everything was already in place (since ages!), except that the parser interface
was missing.
Also fix the derivation formula for atanh, which was incorrect.
Incidentally, this also fixes a detrending bug in the Occbin engine (since the
latter internally generates a [static] equation).
Ref. dynare#1827
By the way, perform a small code simplification.
There is no reason to keep this distinction.
Additionally, since the data structure is now symmetric with the MCE case,
unify this “h” parameter vector with the “α” parameter vector.
By the way, refactor the MCE case by merging two routines related to the Z₁ aux. var.
This restores the symmetry with the backward case, now that the latter also has
an aux. var. for the pac_expectation operator. Also store the aux. var. IDs in a
structure common to the backward and MCE cases.