[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2 Variable declarations

Declarations of variables and parameters are made with the following commands:

Command: var VARIABLE_NAME [$LATEX_NAME$]…;
Command: var (deflator = MODEL_EXPRESSION) VARIABLE_NAME [$LATEX_NAME$]…;

Description

This required command declares the endogenous variables in the model. See section Conventions, for the syntax of VARIABLE_NAME and MODEL_EXPRESSION. Optionally it is possible to give a LaTeX name to the variable or, if it is nonstationary, provide information regarding its deflator.

var commands can appear several times in the file and Dynare will concatenate them.

Options

If the model is nonstationary and is to be written as such in the model block, Dynare will need the trend deflator for the appropriate endogenous variables in order to stationarize the model. The trend deflator must be provided alongside the variables that follow this trend.

deflator = MODEL_EXPRESSION

The expression used to detrend an endogenous variable. All trend variables, endogenous variables and parameters referenced in MODEL_EXPRESSION must already have been declared by the trend_var, var and parameters commands.

Example

 
var c gnp q1 q2;
var(deflator=A) i b;
Command: varexo VARIABLE_NAME [$LATEX_NAME$]…;

Description

This optional command declares the exogenous variables in the model. See section Conventions, for the syntax of VARIABLE_NAME. Optionally it is possible to give a LaTeX name to the variable.

Exogenous variables are required if the user wants to be able to apply shocks to her model.

varexo commands can appear several times in the file and Dynare will concatenate them.

Example

 
varexo m gov;
Command: varexo_det VARIABLE_NAME [$LATEX_NAME$]…;

Description

This optional command declares exogenous deterministic variables in a stochastic model. See Conventions, for the syntax of VARIABLE_NAME. Optionally it is possible to give a LaTeX name to the variable.

It is possible to mix deterministic and stochastic shocks to build models where agents know from the start of the simulation about future exogenous changes. In that case stoch_simul will compute the rational expectation solution adding future information to the state space (nothing is shown in the output of stoch_simul) and forecast will compute a simulation conditional on initial conditions and future information.

varexo_det commands can appear several times in the file and Dynare will concatenate them.

Example

 
varexo m gov;
varexo_det tau;

Command: parameters PARAMETER_NAME [$LATEX_NAME$]…;

Description

This command declares parameters used in the model, in variable initialization or in shocks declarations. See Conventions, for the syntax of PARAMETER_NAME. Optionally it is possible to give a LaTeX name to the parameter.

The parameters must subsequently be assigned values (see section Parameter initialization).

parameters commands can appear several times in the file and Dynare will concatenate them.

Example

 
parameters alpha, bet;
Command: change_type (var | varexo | varexo_det | parameters) VARIABLE_NAME | PARAMETER_NAME…;

Description

Changes the types of the specified variables/parameters to another type: endogenous, exogenous, exogenous deterministic or parameter.

It is important to understand that this command has a global effect on the ‘.mod’ file: the type change is effective after, but also before, the change_type command. This command is typically used when flipping some variables for steady state calibration: typically a separate model file is used for calibration, which includes the list of variable declarations with the macro-processor, and flips some variable.

Example

 
var y, w;
parameters alpha, bet;
…
change_type(var) alpha, bet;
change_type(parameters) y, w;

Here, in the whole model file, alpha and beta will be endogenous and y and w will be parameters.

Command: predetermined_variables VARIABLE_NAME…;

Description

In Dynare, the default convention is that the timing of a variable reflects when this variable is decided. The typical example is for capital stock: since the capital stock used at current period is actually decided at the previous period, then the capital stock entering the production function is k(-1), and the law of motion of capital must be written:

 
k = i + (1-delta)*k(-1)

Put another way, for stock variables, the default in Dynare is to use a “stock at the end of the period” concept, instead of a “stock at the beginning of the period” convention.

The predetermined_variables is used to change that convention. The endogenous variables declared as predetermined variables are supposed to be decided one period ahead of all other endogenous variables. For stock variables, they are supposed to follow a “stock at the beginning of the period” convention.

Example

The following two program snippets are strictly equivalent.

Using default Dynare timing convention:

 
var y, k, i;
…
model;
y = k(-1)^alpha;
k = i + (1-delta)*k(-1);
…
end;

Using the alternative timing convention:

 
var y, k, i;
predetermined_variables k;
…
model;
y = k^alpha;
k(+1) = i + (1-delta)*k;
…
end;
Command: trend_var (growth_factor = MODEL_EXPRESSION) VARIABLE_NAME [$LATEX_NAME$]…;

Description

This optional command declares the trend variables in the model. See section Conventions, for the syntax of MODEL_EXPRESSION and VARIABLE_NAME. Optionally it is possible to give a LaTeX name to the variable.

Trend variables are required if the user wants to be able to write a nonstationary model in the model block. The trend_var command must appear before the var command that references the trend variable.

trend_var commands can appear several times in the file and Dynare will concatenate them.

If the model is nonstationary and is to be written as such in the model block, Dynare will need the growth factor of every trend variable in order to stationarize the model. The growth factor must be provided within the declaration of the trend variable, using the growth_factor keyword. All endogenous variables and parameters referenced in MODEL_EXPRESSION must already have been declared by the var and parameters commands.

Example

 
trend_var (growth_factor=gA) A;

[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated on June 18, 2012 using texi2html 1.82.