more small changes, still testing the CI

parent 034434a4
......@@ -554,20 +554,19 @@ this node given the ``dseries`` contained in ``ds``.
end
In the evaluation of the observed variable (``X`` in this local function, ``Y``
in the main routine), what's important to us is lines 313-342. In particular,
our OLS routine handles an observable variable declared as an endogenous or
exogenous variable, with or without a unary operator applied to it. Given the
case it falls in (``VariableNode`` or ``UnaryOpNode``), the LHS (``node``) is
evaluated using the ``dseries`` (``ds``) and the corresponding ``dseries``
vector is returned.
in the main routine), what's important to us is lines 313-342 as we know it's
either a ``VariableNode`` or a ``UnaryOpNode``. Regardless of the type of node
it is, it's evaluated using the ``dseries`` (``ds``) and the corresponding
``dseries`` vector is returned. In our case, the interest rate ``r`` is
evaluated on line 317 by looking up its value in ``ds``.
Though our work for ``Y`` was easy, the work to compute the matrix of
regressors and the vector of constants, will take a bit more work.
Though our work for ``Y`` was easy, computing the matrix of regressors and the
vector of constants will be a bit more involved.
Back in the main function, before we can create the matrix of regressors ``X``,
we decompose the RHS (``arg2``) of the equation into additive terms, storing
them in a cell array called ``terms``. We do this by calling the locally
defined function ``decomposeAdditiveTerms``:
defined function:
.. code-block:: MATLAB
:linenos: inline
......@@ -602,8 +601,7 @@ As you can see, ``decomposeAdditiveTerms`` is a recursive, tree-traversal
function that breaks down terms separated by ``+`` or ``-``, storing them in
the return value, ``terms``. Each cell in the return value is comprised of a
pair of elements: the root node of the sub-tree representing the additive node
and the sign in preceding this node. That sign will be used in the construction
of the matrix, setting the sign of the data accordingly.
and the sign preceding this node (``1`` or ``-1``).
Given the equation we want to estimate (shown here from
``Smets_Wouters_2007.mod`` as a reminder),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment