When an endogenous is declared with “var(log)”, say “y”:
– creates an auxiliary named “LOG_y”
– replaces “y(±l)” everywhere by “exp(LOG_y(±l))”
– adds a new auxiliary equation “y=exp(LOG_y)”
– adds a new definition “LOG_y=log(y)” in set_auxiliary_variables.m and
dynamic_set_auxiliary_series.m files
This option also works in conjunction with “deflator=…”, such as “var(log,
deflator=…)” (the “log” must appear befor “deflator”). There are no provisions
for combining “log” with “log_deflator”, because that would not make much sense
from an economic point of view (amounts to taking the log two times).
Ref. dynare#349
This is a more natural semantics.
Incidentally, this fixes a bug in the variable mapping (M_.mapping) where some
endogenous, appearing in a log() in a VAR or TCM, would not be mentioned (e.g.
in the var-expectations/7/example1.mod test, and many others).
The logic was flawed in several ways. In particular, the test files
pac/trend-component-{3,10,11}/example1.mod would return A0 and A0star matrices
where the (2,2) element was incorrectly zero.
The case of a diff aux var corresponding to a complex expression was not
correctly handled, and could lead to a value -1 being returned by these
methods.
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.
Incidentally, the auxiliary endogenous variable representing Z₁ and created for
PAC MCE models no longer necessarily appear as the first auxiliary variable (so
this is effectively a revert of 64f55e4a5e).
Consequently drop “occbin” option to “model”.
Incidentally, allow more values in equation tag names (previously some keywords
such as “alpha” were disallowed).
Ref. #68
As the name implies, this option allows contemporaneous variables on the RHS.
The A0 matrix for contemporaneous variables is added as a second (optional)
output to the generated var_ar.m file. Note that for reduced-form VAR, this
matrix will be the identity.
Also, the user is now allowed to write the VAR models in a more flexible form:
the LHS must still be a single variable, but the RHS can be an arbitrary
expression (as long as it is linear, obviously). Internally, the preprocessor
now uses derivation to compute the coefficients of the AR and A0. This change
applies to both reduced-form and structural VAR models.
Ref. dynare#1785
For the time being, the preprocessor will refuse that this option be used with
any command other than estimation.
By the way, remove occbin_likelihood and occbin_smoother options to estimation.
Ref. dynare#569
— rename the files with camel case
— encapsulate the functions with modules
— change the signature of function <MODFILE>_dynamic_set_series!, by removing
the output argument and appending the exclamation mark, since this function
modifies one of its arguments, and for symmetry with the static version
Ref. DynareJulia/Dynare.jl#1