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.