the-model-file.rst
The model file
Conventions
A model file contains a list of commands and of blocks. Each command
and each element of a block is terminated by a semicolon (;). Blocks
are terminated by end;
.
If Dynare encounters an unknown expression at the beginning of a line or after a semicolon, it will parse the rest of that line as native MATLAB code, even if there are more statements separated by semicolons present. To prevent cryptic error messages, it is strongly recommended to always only put one statement/command into each line and start a new line after each semicolon. [1]
Lines of codes can be commented out line by line or as a block. Single-line
comments begin with //
and stop at the end of the line. Multiline comments
are introduced by /*
and terminated by */
.
Examples
// This is a single line comment
var x; // This is a comment about x
/* This is another inline comment about alpha */ alpha = 0.3;
/* This comment is spanning two lines. */
Note that these comment marks should not be used in native MATLAB code regions
where the % should be preferred instead to introduce a comment. In a
verbatim
block, see :ref:`verbatim`, this would result in a crash since
//
is not a valid MATLAB statement).
Most Dynare commands have arguments and several accept options, indicated in parentheses after the command keyword. Several options are separated by commas.
In the description of Dynare commands, the following conventions are observed:
- Optional arguments or options are indicated between square brackets: ‘[]’;
- Repeated arguments are indicated by ellipses: “...”;
- Mutually exclusive arguments are separated by vertical bars: ‘|’;
- INTEGER indicates an integer number;
- INTEGER_VECTOR indicates a vector of integer numbers separated by spaces, enclosed by square brackets;
- DOUBLE indicates a double precision number. The following syntaxes
are valid:
1.1e3
,1.1E3
,1.1d3
,1.1D3
. In some places, infinite ValuesInf
and-Inf
are also allowed; - NUMERICAL_VECTOR indicates a vector of numbers separated by spaces, enclosed by square brackets;
- EXPRESSION indicates a mathematical expression valid outside the model description (see :ref:`expr`);
- MODEL_EXPRESSION (sometimes MODEL_EXP) indicates a mathematical expression valid in the model description (see :ref:`expr` and :ref:`model-decl`);
- MACRO_EXPRESSION designates an expression of the macro processor (see :ref:`macro-exp`);
- VARIABLE_NAME (sometimes VAR_NAME) indicates a variable name starting with an alphabetical character and can’t contain: ‘()+-*/^=!;:@#.’ or accentuated characters;
- PARAMETER_NAME (sometimes PARAM_NAME) indicates a parameter name starting with an alphabetical character and can’t contain: ‘()+-*/^=!;:@#.’ or accentuated characters;
- LATEX_NAME (sometimes TEX_NAME) indicates a valid LaTeX expression in math mode (not including the dollar signs);
- FUNCTION_NAME indicates a valid MATLAB function name;
- FILENAME indicates a filename valid in the underlying operating system; it is necessary to put it between quotes when specifying the extension or if the filename contains a non-alphanumeric character;
- QUOTED_STRING indicates an arbitrary string enclosed between (single) quotes.
Variable declarations
While Dynare allows the user to choose their own variable names, there
are some restrictions to be kept in mind. First, variables and
parameters must not have the same name as Dynare commands or built-in
functions. In this respect, Dynare is not case-sensitive. For example,
do not use Ln
or Sigma_e
to name your variable. Not conforming
to this rule might yield hard-to-debug error messages or
crashes. Second, to minimize interference with MATLAB or Octave
functions that may be called by Dynare or user-defined steady state
files, it is recommended to avoid using the name of MATLAB
functions. In particular when working with steady state files, do not
use correctly-spelled greek names like alpha, because there are
MATLAB functions of the same name. Rather go for alppha
or
alph
. Lastly, please do not name a variable or parameter
i
. This may interfere with the imaginary number i and the index in
many loops. Rather, name investment invest
. Using inv
is also
not recommended as it already denotes the inverse operator. Commands
for declaring variables and parameters are described below.
On-the-fly Model Variable Declaration
Endogenous variables, exogenous variables, and parameters can also be declared inside the model block. You can do this in two different ways: either via the equation tag or directly in an equation.
To declare a variable on-the-fly in an equation tag, simply state the type of
variable to be declared (endogenous
, exogenous
, or
parameter
followed by an equal sign and the variable name in single
quotes. Hence, to declare a variable c
as endogenous in an equation tag,
you can type [endogenous='c']
.
To perform on-the-fly variable declaration in an equation, simply follow the
symbol name with a vertical line (|
, pipe character) and either an e
, an
x
, or a p
. For example, to declare a parameter named
alphaa
in the model block, you could write alphaa|p
directly in
an equation where it appears. Similarly, to declare an endogenous variable
c
in the model block you could write c|e
. Note that in-equation
on-the-fly variable declarations must be made on contemporaneous variables.
On-the-fly variable declarations do not have to appear in the first place where this variable is encountered.
Example
The following two snippets are equivalent:
model; [endogenous='k',name='law of motion of capital'] k(+1) = i|e + (1-delta|p)*k; y|e = k^alpha|p; ... end; delta = 0.025; alpha = 0.36;
var k, i, y; parameters delta, alpha; delta = 0.025; alpha = 0.36; ... model; [name='law of motion of capital'] k(1) = i|e + (1-delta|p)*k; y|e = k|e^alpha|p; ... end;
Expressions
Dynare distinguishes between two types of mathematical expressions: those that are used to describe the model, and those that are used outside the model block (e.g. for initializing parameters or variables, or as command options). In this manual, those two types of expressions are respectively denoted by MODEL_EXPRESSION and EXPRESSION.
Unlike MATLAB or Octave expressions, Dynare expressions are necessarily scalar ones: they cannot contain matrices or evaluate to matrices. [2]
Expressions can be constructed using integers (INTEGER), floating point numbers (DOUBLE), parameter names (PARAMETER_NAME), variable names (VARIABLE_NAME), operators and functions.
The following special constants are also accepted in some contexts:
Parameters and variables
Parameters and variables can be introduced in expressions by simply typing their names. The semantics of parameters and variables is quite different whether they are used inside or outside the model block.
Inside the model
Parameters used inside the model refer to the value given through
parameter initialization (see :ref:`param-init`) or homotopy_setup
when doing a simulation, or are the estimated variables when doing an
estimation.
Variables used in a MODEL_EXPRESSION denote current period values when
neither a lead or a lag is given. A lead or a lag can be given by
enclosing an integer between parenthesis just after the variable name:
a positive integer means a lead, a negative one means a lag. Leads or
lags of more than one period are allowed. For example, if c
is an
endogenous variable, then c(+1)
is the variable one period ahead,
and c(-2)
is the variable two periods before.
When specifying the leads and lags of endogenous variables, it is important to respect the following convention: in Dynare, the timing of a variable reflects when that variable is decided. A control variable — which by definition is decided in the current period — must have no lead. A predetermined variable — which by definition has been decided in a previous period — must have a lag. A consequence of this is that all stock variables must use the “stock at the end of the period” convention.
Leads and lags are primarily used for endogenous variables, but can be used for exogenous variables. They have no effect on parameters and are forbidden for local model variables (see Model declaration).
Outside the model
When used in an expression outside the model block, a parameter or a
variable simply refers to the last value given to that variable. More
precisely, for a parameter it refers to the value given in the
corresponding parameter initialization (see :ref:`param-init`); for an
endogenous or exogenous variable, it refers to the value given in the
most recent initval
or endval
block.
Operators
The following operators are allowed in both MODEL_EXPRESSION and EXPRESSION:
- Binary arithmetic operators:
+
,-
,*
,/
,^
- Unary arithmetic operators:
+
,-
- Binary comparison operators (which evaluate to either 0 or 1):
<
,>
,<=
,>=
,==
,!=
Note the binary comparison operators are differentiable everywhere except on a line of the 2-dimensional real plane. However for facilitating convergence of Newton-type methods, Dynare assumes that, at the points of non-differentiability, the partial derivatives of these operators with respect to both arguments is equal to 0 (since this is the value of the partial derivatives everywhere else).
The following special operators are accepted in MODEL_EXPRESSION (but not in EXPRESSION):
Functions
Built-in functions
The following standard functions are supported internally for both MODEL_EXPRESSION and EXPRESSION:
External functions
Any other user-defined (or built-in) MATLAB or Octave function may be used in both a MODEL_EXPRESSION and an EXPRESSION, provided that this function has a scalar argument as a return value.
To use an external function in a MODEL_EXPRESSION, one must declare
the function using the external_function
statement. This is not
required for external functions used in an EXPRESSION outside of a
model
block or steady_state_model
block.
A few words of warning in stochastic context
The use of the following functions and operators is strongly
discouraged in a stochastic context: max
, min
, abs
,
sign
, <
, >
, <=
, >=
, ==
, !=
.
The reason is that the local approximation used by stoch_simul
or
estimation
will by nature ignore the non-linearities introduced by
these functions if the steady state is away from the kink. And, if the
steady state is exactly at the kink, then the approximation will be
bogus because the derivative of these functions at the kink is bogus
(as explained in the respective documentations of these functions and
operators).
Note that extended_path
is not affected by this problem, because
it does not rely on a local approximation of the mode.
Parameter initialization
When using Dynare for computing simulations, it is necessary to calibrate the parameters of the model. This is done through parameter initialization.
The syntax is the following:
PARAMETER_NAME = EXPRESSION;
Here is an example of calibration:
parameters alpha, beta;
beta = 0.99;
alpha = 0.36;
A = 1-alpha*beta;
Internally, the parameter values are stored in M_.params
:
The parameter names are stored in M_.param_names
:
Model declaration
The model is declared inside a model
block:
Dynare has the ability to output the original list of model equations
to a LaTeX file, using the write_latex_original_model
command, the list of transformed model equations using the
write_latex_dynamic_model command
, and the list of static model
equations using the write_latex_static_model
command.
Auxiliary variables
The model which is solved internally by Dynare is not exactly the model declared by the user. In some cases, Dynare will introduce auxiliary endogenous variables—along with corresponding auxiliary equations—which will appear in the final output.
The main transformation concerns leads and lags. Dynare will perform a transformation of the model so that there is only one lead and one lag on endogenous variables and no leads/lags on exogenous variables.
This transformation is achieved by the creation of auxiliary variables
and corresponding equations. For example, if x(+2)
exists in the
model, Dynare will create one auxiliary variable AUX_ENDO_LEAD =
x(+1)
, and replace x(+2)
by AUX_ENDO_LEAD(+1)
.
A similar transformation is done for lags greater than 2 on endogenous
(auxiliary variables will have a name beginning with
AUX_ENDO_LAG
), and for exogenous with leads and lags (auxiliary
variables will have a name beginning with AUX_EXO_LEAD
or
AUX_EXO_LAG
respectively).
Another transformation is done for the EXPECTATION
operator. For
each occurrence of this operator, Dynare creates an auxiliary variable
defined by a new equation, and replaces the expectation operator by a
reference to the new auxiliary variable. For example, the expression
EXPECTATION(-1)(x(+1))
is replaced by AUX_EXPECT_LAG_1(-1)
,
and the new auxiliary variable is declared as AUX_EXPECT_LAG_1 =
x(+2)
.
Auxiliary variables are also introduced by the preprocessor for the
ramsey_model
and ramsey_policy
commands. In this case, they
are used to represent the Lagrange multipliers when first order
conditions of the Ramsey problem are computed. The new variables take
the form MULT_i
, where i represents the constraint with which
the multiplier is associated (counted from the order of declaration in
the model block).
The last type of auxiliary variables is introduced by the
differentiate_forward_vars
option of the model block. The new
variables take the form AUX_DIFF_FWRD_i
, and are equal to
x-x(-1)
for some endogenous variable x
.
Once created, all auxiliary variables are included in the set of endogenous variables. The output of decision rules (see below) is such that auxiliary variable names are replaced by the original variables they refer to.
The number of endogenous variables before the creation of auxiliary
variables is stored in M_.orig_endo_nbr
, and the number of
endogenous variables after the creation of auxiliary variables is
stored in M_.endo_nbr
.
See https://archives.dynare.org/DynareWiki/AuxiliaryVariables for more technical details on auxiliary variables.
Initial and terminal conditions
For most simulation exercises, it is necessary to provide initial (and possibly terminal) conditions. It is also necessary to provide initial guess values for non-linear solvers. This section describes the statements used for those purposes.
In many contexts (deterministic or stochastic), it is necessary to
compute the steady state of a non-linear model: initval
then
specifies numerical initial values for the non-linear solver. The
command resid
can be used to compute the equation residuals for
the given initial values.
Used in perfect foresight mode, the types of forward-looking models for which Dynare was designed require both initial and terminal conditions. Most often these initial and terminal conditions are static equilibria, but not necessarily.
One typical application is to consider an economy at the equilibrium
at time 0, trigger a shock in first period, and study the trajectory
of return to the initial equilibrium. To do that, one needs
initval
and shocks
(see :ref:`shocks-exo`).
Another one is to study how an economy, starting from arbitrary
initial conditions at time 0 converges towards equilibrium. In this
case models, the command histval
permits to specify different
historical initial values for variables with lags for the periods
before the beginning of the simulation. Due to the design of Dynare,
in this case initval
is used to specify the terminal conditions.
Shocks on exogenous variables
In a deterministic context, when one wants to study the transition of
one equilibrium position to another, it is equivalent to analyze the
consequences of a permanent shock and this in done in Dynare through
the proper use of initval
and endval
.
Another typical experiment is to study the effects of a temporary
shock after which the system goes back to the original equilibrium (if
the model is stable...). A temporary shock is a temporary change of
value of one or several exogenous variables in the model. Temporary
shocks are specified with the command shocks
.
In a stochastic framework, the exogenous variables take random values
in each period. In Dynare, these random values follow a normal
distribution with zero mean, but it belongs to the user to specify the
variability of these shocks. The non-zero elements of the matrix of
variance-covariance of the shocks can be entered with the shocks
command. Or, the entire matrix can be directly entered with
Sigma_e
(this use is however deprecated).
If the variance of an exogenous variable is set to zero, this variable will appear in the report on policy and transition functions, but isn’t used in the computation of moments and of Impulse Response Functions. Setting a variance to zero is an easy way of removing an exogenous shock.
Note that, by default, if there are several shocks
or mshocks
blocks in the same .mod
file, then they are cumulative: all the
shocks declared in all the blocks are considered; however, if a
shocks
or mshocks
block is declared with the overwrite
option, then it replaces all the previous shocks
and mshocks
blocks.
Other general declarations
Steady state
There are two ways of computing the steady state (i.e. the static equilibrium) of a model. The first way is to let Dynare compute the steady state using a nonlinear Newton-type solver; this should work for most models, and is relatively simple to use. The second way is to give more guidance to Dynare, using your knowledge of the model, by providing it with a method to compute the steady state, either using a steady_state_model block or writing matlab routine.
Finding the steady state with Dynare nonlinear solver
After computation, the steady state is available in the following variable:
Providing the steady state to Dynare
If you know how to compute the steady state for your model, you can
provide a MATLAB/Octave function doing the computation instead of
using steady
. Again, there are two options for doing that:
- The easiest way is to write a
steady_state_model
block, which is described below in more details. See alsofs2000.mod
in theexamples
directory for an example. The steady state file generated by Dynare will be called+FILENAME/steadystate.m.
- You can write the corresponding MATLAB function by hand. If your MOD-file is called
FILENAME.mod
, the steady state file must be calledFILENAME_steadystate.m
. SeeNK_baseline_steadystate.m
in the examples directory for an example. This option gives a bit more flexibility (loops and conditional structures can be used), at the expense of a heavier programming burden and a lesser efficiency.
Note that both files allow to update parameters in each call of the
function. This allows for example to calibrate a model to a labor
supply of 0.2 in steady state by setting the labor disutility
parameter to a corresponding value (see NK_baseline_steadystate.m
in the examples
directory). They can also be used in estimation
where some parameter may be a function of an estimated parameter and
needs to be updated for every parameter draw. For example, one might
want to set the capital utilization cost parameter as a function of
the discount rate to ensure that capacity utilization is 1 in steady
state. Treating both parameters as independent or not updating one as
a function of the other would lead to wrong results. But this also
means that care is required. Do not accidentally overwrite your
parameters with new values as it will lead to wrong results.
Replace some equations during steady state computations
When there is no steady state file, Dynare computes the steady state
by solving the static model, i.e. the model from the .mod
file
from which leads and lags have been removed.
In some specific cases, one may want to have more control over the way this static model is created. Dynare therefore offers the possibility to explicitly give the form of equations that should be in the static model.
More precisely, if an equation is prepended by a [static]
tag,
then it will appear in the static model used for steady state
computation, but that equation will not be used for other
computations. For every equation tagged in this way, you must tag
another equation with [dynamic]
: that equation will not be used
for steady state computation, but will be used for other computations.
This functionality can be useful on models with a unit root, where
there is an infinity of steady states. An equation (tagged
[dynamic]
) would give the law of motion of the nonstationary
variable (like a random walk). To pin down one specific steady state,
an equation tagged [static]
would affect a constant value to the
nonstationary variable. Another situation where the [static]
tag
can be useful is when one has only a partial closed form solution for
the steady state.
Example
This is a trivial example with two endogenous variables. The second equation takes a different form in the static model:
var c k;
varexo x;
...
model;
c + k - aa*x*k(-1)^alph - (1-delt)*k(-1);
[dynamic] c^(-gam) - (1+bet)^(-1)*(aa*alph*x(+1)*k^(alph-1) + 1 - delt)*c(+1)^(-gam);
[static] k = ((delt+bet)/(x*aa*alph))^(1/(alph-1));
end;
Getting information about the model
Deterministic simulation
When the framework is deterministic, Dynare can be used for models
with the assumption of perfect foresight. Typically, the system is
supposed to be in a state of equilibrium before a period ‘1’ when the
news of a contemporaneous or of a future shock is learned by the
agents in the model. The purpose of the simulation is to describe the
reaction in anticipation of, then in reaction to the shock, until the
system returns to the old or to a new state of equilibrium. In most
models, this return to equilibrium is only an asymptotic phenomenon,
which one must approximate by an horizon of simulation far enough in
the future. Another exercise for which Dynare is well suited is to
study the transition path to a new equilibrium following a permanent
shock. For deterministic simulations, the numerical problem consists
of solving a nonlinar system of simultaneous equations in n endogenous
variables in T periods. Dynare offers several algorithms for solving
this problem, which can be chosen via the stack_solve_algo
option. By default (stack_solve_algo=0
), Dynare uses a Newton-type
method to solve the simultaneous equation system. Because the
resulting Jacobian is in the order of n
by T
and hence will be
very large for long simulations with many variables, Dynare makes use
of the sparse matrix capacities of MATLAB/Octave. A slower but
potentially less memory consuming alternative (stack_solve_algo=6
)
is based on a Newton-type algorithm first proposed by Laffargue
(1990) and Boucekkine (1995), which uses relaxation
techniques. Thereby, the algorithm avoids ever storing the full
Jacobian. The details of the algorithm can be found in Juillard
(1996). The third type of algorithms makes use of block decomposition
techniques (divide-and-conquer methods) that exploit the structure of
the model. The principle is to identify recursive and simultaneous
blocks in the model structure and use this information to aid the
solution process. These solution algorithms can provide a significant
speed-up on large models.
Stochastic solution and simulation
In a stochastic context, Dynare computes one or several simulations corresponding to a random draw of the shocks.
The main algorithm for solving stochastic models relies on a Taylor
approximation, up to third order, of the expectation functions (see
Judd (1996), Collard and Juillard (2001a), Collard and Juillard
(2001b), and Schmitt-Grohé and Uríbe (2004)). The details of the
Dynare implementation of the first order solution are given in
Villemot (2011). Such a solution is computed using the
stoch_simul
command.
As an alternative, it is possible to compute a simulation to a
stochastic model using the extended path method presented by Fair
and Taylor (1983). This method is especially useful when there are
strong nonlinearities or binding constraints. Such a solution is
computed using the extended_path
command.
Computing the stochastic solution
The approximated solution of a model takes the form of a set of
decision rules or transition equations expressing the current value of
the endogenous variables of the model as function of the previous
state of the model and shocks observed at the beginning of the
period. The decision rules are stored in the structure oo_.dr
which is described below.
Typology and ordering of variables
Dynare distinguishes four types of endogenous variables:
Purely backward (or purely predetermined) variables
Those that appear only at current and past period in the model,
but not at future period (i.e. at t and t-1 but
not t+1). The number of such variables is equal to
M_.npred
.
Purely forward variables
Those that appear only at current and future period in the model,
but not at past period (i.e. at t and t+1 but not
t-1). The number of such variables is stored in
M_.nfwrd
.
Mixed variables
Those that appear at current, past and future period in the model
(i.e. at t, t+1 and t-1). The number of
such variables is stored in M_.nboth
.
Static variables
Those that appear only at current, not past and future period in
the model (i.e. only at t, not at t+1 or
t-1). The number of such variables is stored in
M_.nstatic
.
Note that all endogenous variables fall into one of these four categories, since after the creation of auxiliary variables (see :ref:`aux-variables`), all endogenous have at most one lead and one lag. We therefore have the following identity:
M_.npred + M_.both + M_.nfwrd + M_.nstatic = M_.endo_nbr
Internally, Dynare uses two orderings of the endogenous variables: the
order of declaration (which is reflected in M_.endo_names
), and an
order based on the four types described above, which we will call the
DR-order (“DR” stands for decision rules). Most of the time, the
declaration order is used, but for elements of the decision rules, the
DR-order is used.
The DR-order is the following: static variables appear first, then purely backward variables, then mixed variables, and finally purely forward variables. Inside each category, variables are arranged according to the declaration order.
In other words, the k-th variable in the DR-order corresponds to the endogenous
variable numbered oo_.dr.order_var(k)
in declaration
order. Conversely, k-th declared variable is numbered
oo_.dr.inv_order_var(k)
in DR-order.
Finally, the state variables of the model are the purely backward
variables and the mixed variables. They are ordered in DR-order when
they appear in decision rules elements. There are M_.nspred =
M_.npred + M_.nboth
such variables. Similarly, one has M_.nsfwrd =
M_.nfwrd + M_.nboth
, and M_.ndynamic = M_.nfwrd + M_.nboth +
M_.npred
.
First-order approximation
The approximation has the stylized form:
y_t = y^s + A y^h_{t-1} + B u_t
where y^s is the steady state value of y and y^h_t=y_t-y^s.
The coefficients of the decision rules are stored as follows:
-
y^s is stored in
oo_.dr.ys
. The vector rows correspond to all endogenous in the declaration order. -
A is stored in
oo_.dr.ghx
. The matrix rows correspond to all endogenous in DR-order. The matrix columns correspond to state variables in DR-order, as given byoo_.dr.state_var
. (N.B.: if theblock
option to themodel
block has been specified, then rows are in declaration order, and columns are ordered according tooo_.dr.state_var
which may differ from DR-order.) -
B is stored
oo_.dr.ghu
. The matrix rows correspond to all endogenous in DR-order. The matrix columns correspond to exogenous variables in declaration order. (N.B.: if theblock
option to themodel
block has been specified, then rows are in declaration order.)
Of course, the shown form of the approximation is only stylized, because it neglects the required different ordering in y^s and y^h_t. The precise form of the approximation that shows the way Dynare deals with differences between declaration and DR-order, is
y_t(\mathrm{oo\_.dr.order\_var}) = y^s(\mathrm{oo\_.dr.order\_var}) + A \cdot y_{t-1}(\mathrm{oo\_.dr.order\_var(k2)}) - y^s(\mathrm{oo\_.dr.order\_var(k2)}) + B\cdot u_t
where \mathrm{k2} selects the state variables, y_t and y^s are in declaration order and the coefficient matrices are in DR-order. Effectively, all variables on the right hand side are brought into DR order for computations and then assigned to y_t in declaration order.
Second-order approximation
The approximation has the form:
y_t = y^s + 0.5 \Delta^2 + A y^h_{t-1} + B u_t + 0.5 C (y^h_{t-1}\otimes y^h_{t-1}) + 0.5 D (u_t \otimes u_t) + E (y^h_{t-1} \otimes u_t)
where y^s is the steady state value of y, y^h_t=y_t-y^s, and \Delta^2 is the shift effect of the variance of future shocks. For the reordering required due to differences in declaration and DR order, see the first order approximation.
The coefficients of the decision rules are stored in the variables described for first order approximation, plus the following variables:
-
\Delta^2 is stored in
oo_.dr.ghs2
. The vector rows correspond to all endogenous in DR-order. -
C is stored in
oo_.dr.ghxx
. The matrix rows correspond to all endogenous in DR-order. The matrix columns correspond to the Kronecker product of the vector of state variables in DR-order. -
D is stored in
oo_.dr.ghuu
. The matrix rows correspond to all endogenous in DR-order. The matrix columns correspond to the Kronecker product of exogenous variables in declaration order. -
E is stored in
oo_.dr.ghxu
. The matrix rows correspond to all endogenous in DR-order. The matrix columns correspond to the Kronecker product of the vector of state variables (in DR-order) by the vector of exogenous variables (in declaration order).