... | ... | @@ -77,15 +77,22 @@ The substitution will only happen if there is no lead in the argument to the `di |
|
|
|
|
|
## Type 9: lag within `diff` operator (since Dynare 4.7)
|
|
|
|
|
|
This kind of aux var has `M_.aux_vars(i).type = 9` and accounts for applying the difference operator to a lag. If a `diff` operator is applied to a variable with lagged values (e.g. `diff(x(-3)`), and there also appears `diff` operators with the same arguments in the future (e.g. `diff(x)`), a diff auxiliary variable (of type 8) is created for the `diff` operator applied to the variable with lag equal to zero (e.g. `diff(x)`) and auxiliary variables (of type 9) are created for the following sequence `diff(x(-1)`, `diff(x(-2))`, and `diff(x(-3)`). The name of such auxiliary variables begins with `AUX_DIFF_LAG_`.
|
|
|
This kind of aux var has `M_.aux_vars(i).type = 9` and accounts for applying the difference operator to a lag. If a `diff` operator is applied to a variable with lagged values (e.g. `diff(x(-3)`), and if there is also a `diff` operator with the same arguments shifted in the future (e.g. `diff(x)`), then a diff auxiliary variable (of type 8) is created for the `diff` operator applied to the variable with lag equal to zero (e.g. `diff(x)`) and auxiliary variables (of type 9) are created for the following sequence `diff(x(-1)`, `diff(x(-2))`, and `diff(x(-3)`). The name of such auxiliary variables begins with `AUX_DIFF_LAG_`.
|
|
|
|
|
|
- `M_.aux_vars(i).orig_index` contains the index of the preceding auxiliary variable for diff lag or of the auxiliary variable for diff itself (types 8 or 9)
|
|
|
- `M_.aux_vars(i).orig_lead_lag` contains `0` (not needed because we know the lag is `1` different than the previous one.
|
|
|
- `M_.aux_vars(i).orig_index` contains the index of the preceding auxiliary variable for diff lag or of the auxiliary variable for diff itself (types 9 or 8)
|
|
|
- `M_.aux_vars(i).orig_lead_lag` contains `0` (not needed because we know the lag is equal to 1 compared to the previous aux variable in the sequence)
|
|
|
|
|
|
## Type 10: unary operations (since Dynare 4.7)
|
|
|
|
|
|
This kind of aux var has `M_.aux_vars(i).type = 10` and substitutes for certain unary operations in the context of employing `diff`-operators, namely: `exp`, `log`, `log10`, `cos`, `sin`, `tan`, `acos`, `asin`, `atan`, `cosh`, `sinh`, `tanh`, `acosh`, `asinh`, `atanh`, `sqrt`, `abs`, `sign`, and `erf`. The name of such an auxiliary variable begins with `AUX_UOP_`.
|
|
|
This kind of aux var has `M_.aux_vars(i).type = 10` is substituted for an expression consisting of a unary operator (namely `exp`, `log`, `log10`, `cos`, `sin`, `tan`, `acos`, `asin`, `atan`, `cosh`, `sinh`, `tanh`, `acosh`, `asinh`, `atanh`, `sqrt`, `cbrt`, `abs`, `sign` and `erf`). Such an auxiliary variable is typically created for an expression of the form `log(x)` in the context of a `var_model` or a `trend_component_model`. The name of such an auxiliary variable begins with `AUX_UOP_`.
|
|
|
|
|
|
If the `transform_unary_ops` option has been passed to `dynare`, then the substitution is done everywhere in the model. Otherwise, by default, it is only performed in the equations appearing in a `var_model` or a `trend_component_model`.
|
|
|
|
|
|
## Type 11: lead within `diff` operator (since Dynare 4.7)
|
|
|
|
|
|
This kind of aux var has `M_.aux_vars(i).type = 11` and accounts for applying the difference operator to a lead. Similarly to Type 9, it will create a sequence of auxiliary variables, but for leads. |
|
|
\ No newline at end of file |
|
|
This kind of aux var has `M_.aux_vars(i).type = 11` and accounts for applying the difference operator to a lead. Similarly to Type 9, it will create a sequence of auxiliary variables, but for leads.
|
|
|
|
|
|
Such aux vars only appear in the context of PAC models with model-consistent expectations (when constructing the expectation term).
|
|
|
|
|
|
- `M_.aux_vars(i).orig_index` contains the index of the preceding auxiliary variable for diff lead or of the auxiliary variable for diff itself (types 11 or 8)
|
|
|
- `M_.aux_vars(i).orig_lead_lag` contains `0` (not needed because we know the lead is equal to 1 compared to the previous aux var in the sequence) |