diff --git a/doc/manual.xml b/doc/manual.xml index 908a5205b..1e7a7b70f 100644 --- a/doc/manual.xml +++ b/doc/manual.xml @@ -297,11 +297,20 @@ This user-supplied file contains the model and the processing instructions, as d dynare begins by launching the preprocessor on the .mod file. By default (unless option has been given to ), the preprocessor creates three intermediary files: - - FILENAME.m: contains variable declarations, and computing tasks - FILENAME_dynamic.m: contains the dynamic model equations - FILENAME_static.m: contains the long run static model equations - + + + FILENAME.m + Contains variable declarations, and computing tasks + + + FILENAME_dynamic.m + Contains the dynamic model equations + + + FILENAME_static.m + Contains the long run static model equations + + These files may be looked at to understand errors reported at the simulation stage. dynare will then run the computing tasks by executing FILENAME.m. @@ -309,11 +318,20 @@ These files may be looked at to understand errors reported at the simulation sta Options - - : by default, dynare will issue a clear all command to Matlab or Octave, thereby deleting all workspace variables; this options instructs dynare not to clear the workspace - : instructs dynare to save the intermediary file which is obtained after macro-processing (see ); the saved output will go in FILENAME-macroexp.mod - : instructs the preprocessor to write some debugging information about the scanning and parsing of the .mod file - + + + + By default, dynare will issue a clear all command to Matlab or Octave, thereby deleting all workspace variables; this options instructs dynare not to clear the workspace + + + + Instructs dynare to save the intermediary file which is obtained after macro-processing (see ); the saved output will go in FILENAME-macroexp.mod + + + + Instructs the preprocessor to write some debugging information about the scanning and parsing of the .mod file + + @@ -398,7 +416,7 @@ In the description of Dynare commands, the following conventions are observed: This required command declares the endogenous variables in the model. See for the syntax of VARIABLE_NAME. -var commands can appear sereval time in the file and Dynare will concatenate them. +var commands can appear several times in the file and Dynare will concatenate them. Example @@ -438,7 +456,7 @@ This optional command declares the exogenous variables in the model. See Exogenous variables are required if the user wants to be able to apply shocks to her model. -varexo commands can appear sereval time in the file and Dynare will concatenate them. +varexo commands can appear several times in the file and Dynare will concatenate them. Example @@ -477,7 +495,7 @@ This optional command declares exogenous deterministic variables in a stochastic 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 will compute the rational expectation solution adding future information to the state space (nothing is shown in the output of ) and will compute a simulation conditional on initial conditions and future information. -varexo_det commands can appear sereval time in the file and Dynare will concatenate them. +varexo_det commands can appear several times in the file and Dynare will concatenate them. Example @@ -517,7 +535,7 @@ This optional command declares parameters used in the model, in variable initial The parameters must subsequently be assigned values, see . -parameters commands can appear sereval time in the file and Dynare will concatenate them. +parameters commands can appear several times in the file and Dynare will concatenate them. Example @@ -818,6 +836,13 @@ steady; initval_file use an external file for specifying initial values (for steady-state computation or for simulations) + + + + initval_file( = FILENAME); + + + @@ -951,7 +976,7 @@ In a deterministic context, when one wants to study the transition of one equili 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 . -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 command. Or, the entire matrix can be direclty entered with . Note that, starting with version 2.5.2, the direct specification of the internal matrix Sigma_e_, prone to errors, is discouraged. +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 command. Or, the entire matrix can be direclty entered with (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. @@ -974,74 +999,36 @@ If the variance of an exogenous variable is set to zero, this variable will appe - shocks - (OPTION,); - - - DETERMINISTIC SHOCK STATEMENT - - - STOCHASTIC SHOCK STATEMENT - - - - - DETERMINISTIC SHOCK STATEMENT - - - STOCHASTIC SHOCK STATEMENT - - - end; + shocks; + + + + DETERMINISTIC SHOCK STATEMENT + + + STOCHASTIC SHOCK STATEMENT + + + + end; + - var VARIABLE_NAME; - periods PERIOD STATEMENT; - values EXPRESSION; + var VARIABLE_NAME; + periods INTEGER:INTEGER + , INTEGER:INTEGER; + values EXPRESSION , EXPRESSION; - - INTEGER - : INTEGER - INTEGER - : INTEGER - ; - - - - - VARIANCE STATEMENT - - - COVARIANCE STATEMENT - - - STANDARD ERROR STATEMENT - - - - - - var VARIABLE_NAME = EXPRESSION; - - - - - var VARIABLE_NAME , VARIABLE_NAME = EXPRESSION; - - - - - var VARIABLE_NAME; stderr EXPRESSION; - + + + + var VARIABLE_NAME; stderr EXPRESSION; + var VARIABLE_NAME = EXPRESSION; + var VARIABLE_NAME, VARIABLE_NAME = EXPRESSION; + corr VARIABLE_NAME, VARIABLE_NAME = EXPRESSION; + -Options - - - shocks_file = FILENAME: reads sequence of deterministic shocks from FILENAME. It can be either a *.m or a *.mat file. The file must create vectors with the same names as the deterministic exogenous variables. - - - Description In deterministic context @@ -1049,8 +1036,7 @@ If the variance of an exogenous variable is set to zero, this variable will appe For deterministic simulations, the shocks block specifies temporary changes in the value of an exogenous variables. For permanent shocks, use an block. - - When specifying shocks on several periods, the values EXPRESSION must return either a scalar value common to all periods with a shock or a column vector with as many elements as there are periods in the periods statement just before it. +When specifying shocks on several periods, the values EXPRESSION must return either a scalar value common to all periods with a shock or a column vector with as many elements as there are periods in the periods statement just before it. Example @@ -1075,23 +1061,21 @@ end; In stochastic context -For stochastic simulations (available only in the Matlab or Scilab versions), the shocks block specifies the non zero elements of the covariance matrix of the shocks. +For stochastic simulations, the shocks block specifies the non zero elements of the covariance matrix of the shocks. Example shocks; var e = 0.000081; -var e,u = phi*0.009*0.009; -var u = 0.000081; -var v; stderr 0.009; +var u; stderr 0.009; +corr e, u = 0.8; +var v, w = 2; end; See also - -Sigma_e - +Sigma_e @@ -1134,6 +1118,40 @@ forecast; mshocks specifies multiplicative shocks on deterministic or stochastic exogenous variables + + + + mshocks; + + + + DETERMINISTIC SHOCK STATEMENT + + + STOCHASTIC SHOCK STATEMENT + + + + end; + + + var VARIABLE_NAME; + periods INTEGER:INTEGER + , INTEGER:INTEGER; + values EXPRESSION , EXPRESSION; + + + + + var VARIABLE_NAME; stderr EXPRESSION; + var VARIABLE_NAME = EXPRESSION; + var VARIABLE_NAME, VARIABLE_NAME = EXPRESSION; + corr VARIABLE_NAME, VARIABLE_NAME = EXPRESSION; + + + + + @@ -1149,41 +1167,20 @@ forecast; Sigma_e - - = [MATRIX ELEMENT - ,MATRIX ELEMENT - ;MATRIX ELEMENT]; - - - - - - INTEGER - - - DOUBLE - - - (EXPRESSION) - - - + = [ EXPRESSION , EXPRESSION + ; EXPRESSION , EXPRESSION ]; - - WARNING: the matrix elements are actually written beween square brackets ([]). Here, the initial [ and final ] don't have the meaning of "optional element" as elsewhere. - + + The matrix elements are actually written between square brackets ([]). Here, the initial [ and final ] don't have the meaning of optional element as elsewhere. + Description -The matrix of variance-covariance of the shocks can be directly specified as a upper (or lower) triangular matrix. Dynare builds the corresponding symmetrix matrix. Each row of the triangular matrix, except the last one, must be terminated by a semi-colon ';'. For a given element, an EXPRESSION using predefined parameters is allowed but must be placed between parentheses. THE ORDER OF THE COVARIANCES IN THE MATRIX IS THE SAME AS THE ONE USED IN THE VAREXO DECLARATION. +The matrix of variance-covariance of the shocks can be directly specified as a upper (or lower) triangular matrix. Dynare builds the corresponding symmetrix matrix. Each row of the triangular matrix, except the last one, must be terminated by a semi-colon ;. For a given element, an arbitrary EXPRESSION is allowed (instead of a simple constant), but in that case you need to enclose the expression in parentheses. The order of the covariances in the matrix is the same as the one used in the declaration. - -In previous versions, it was possible to directly set Dynare's internal covariance matrix Sigma_e_. This is still possible for compatibility with older .mod files, but STRONGLY DISCOURAGED as too prone to error. When setting Sigma_e_ directly, the order of the exogenous shocks is the ALPHABETICAL order of their names. - - Example @@ -1215,6 +1212,14 @@ where the variance of u is 0.81, the variance of edsample reduces the number of periods considered in subsequent output commands + + + + dsample + INTEGER + INTEGER; + + @@ -1240,7 +1245,7 @@ where the variance of u is 0.81, the variance of eperiods in and . -Sets the number of periods in the simulation. The periods are numbered from 1 to INTEGER. In perfect foresight simulations, it is assumed that all future events are perfectly known at the beginning of period 1. +Sets the number of periods in the simulation. The periods are numbered from 1 to INTEGER. In perfect foresight simulations, it is assumed that all future events are perfectly known at the beginning of period 1. @@ -1273,31 +1278,39 @@ Dynare has special commands for the computation of the static equilibrium of the steady - copmutes the steady state of a model + computes the steady state of a model steady - - (solve_algo = - - 0 - 1 - 2 - ) - - ; + (OPTION, OPTION); Options - -solve_algo = 0: uses Matlab Optimization Toolbox FSOLVE -solve_algo = 1: uses Dynare's own nonlinear equation solver -solve_algo = 2: splits the model into recursive blocks and solves each block in turn. (Thanks to Manfred Gilli for showing me Matlab's function DMPERM) (this is the default since Dynare version 3.046). - - + + + = INTEGER + Determines the non-linear solver to use. Possible values for the option are: + + 0: uses Matlab Optimization Toolbox FSOLVE + 1: uses Dynare's own nonlinear equation solver + 2: splits the model into recursive blocks and solves each block in turn. This is the default. + 3: Chris Sims' solver + 4: similar to value 2, except that it deals differently with nearly singular Jacobian + + + + + = INTEGER + ... + + + = INTEGER + ... + + Description @@ -1312,14 +1325,14 @@ Computes the equilibrium value of the endogenous variables for the value of the For complicated models, finding good numerical initial values for the endogenous variables is the trickiest part of finding the equilibrium of that model. Often, it is better to start with a smaller model and add new variables one by one. -If you know how to compute the steady state for your model, you can provide a Matlab function doing the computation instead of using steady. The function should be called with the name of the .mod file followed by _steadystate. See fs2000a_steadystate.m in examples/fs2000 directory. +If you know how to compute the steady state for your model, you can provide a Matlab function doing the computation instead of using steady. The function should be called with the name of the .mod file followed by _steadystate. See fs2000a_steadystate.m in examples/fs2000 directory. Output variables - The steeady state is available in oo_.steady_state. Endogenous variables are ordered in order of declaration used in var command as in M_.endo_names. + The steady state is available in oo_.steady_state. Endogenous variables are ordered in order of declaration used in command as in M_.endo_names.