Auxiliary variables were still present in the growth neutrality correction. This
commit remove the auxiliaries, so that the user doesn't need to update the
database with the auxiliary variable definitions.
Also adds integration test.
TODO Check that it works with log unary op
TODO Complete tests by checking that the written evaluate routine works
The print_expectations routine was previously only considering the
aggregate expectation (for the target). Now it updates the
database (dseries) with each component of the PAC model. The growth
neutrality correction is included in the aggregate expectation but not
in the expectations of the 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.
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.
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.
Extracts equations from a mod file and produce .inc files (equations, lists of
parameters, endogenous variables and exogenous variables) that can be included
in a mod file that will be used to simulate the model.
If an innovation has a tag `(used='estimationonly')` it will be excluded from
the generated files (ie list of shocks and equations).
It is not possible to pre-allocate a cell array here, but
Array = {};
for i=1:10
Array(i) = {'a'}
end
is faster by a factor 10 than
Array = {};
for i=1:10
Array = [Array, 'a']
end
The routine takes a dseries object as unique argument and return an updated
object with the expectation term.
If the mod file is named `example.mod` and if the (VAR/PAC) expectation model is
named `toto`, then after
var_expectation.print('toto');
the expectation term can be evaluated:
ts = example.var_expectations.evaluate_varexp(ts);
where ts is a dseries object containing all the time series appearign in the
auxiliary (var or trend_component).
Each new routine pac.print() and var_expectation.print(), creates two files
that can be included (using the macro language) in a mod file. The first
file, {pac,var}expectationmodename-parameters.inc saved under
{M_.fname}/model/{pac,var}expectationmodel, contains the declaration of the
parameters created for the expanded (var or pac) expectation model, with
calibrated values. The second file, {pac,var}expectationmodename-parameters.inc
saved in the same subfolder, contains the expanded version of the (pac or var)
expectation term as a linear combination of the variables in the companion
representation of the expectatino model.