From ada0a05f4993a2db45168daa20e6ac416b594791 Mon Sep 17 00:00:00 2001 From: sebastien Date: Wed, 16 Jul 2008 10:47:39 +0000 Subject: [PATCH] v4 doc: * updates to the manual: added an empty entry for every new command, removed old commands * fixed a typo in bvar_a_la_sims.tex * added a warning in the Makefile about package docbook-xsl git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1957 ac1d8469-bf42-47a9-8791-bf33cf982152 --- doc/Makefile | 1 + doc/bvar-a-la-sims.tex | 2 +- doc/manual.xml | 563 ++++++++++++++++++++++------------------- 3 files changed, 309 insertions(+), 257 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index 0f90f3ee5..4064ec32e 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -11,6 +11,7 @@ bvar-a-la-sims.pdf: bvar-a-la-sims.tex pdflatex bvar-a-la-sims manual-html/index.html: manual.xml dynare_html.xsl + # Make sure that you have installed the docbook-xsl package, otherwise xsltproc will take a very long time xsltproc -stringparam base.dir ./manual-html/ dynare_html.xsl manual.xml manual.pdf: manual.xml diff --git a/doc/bvar-a-la-sims.tex b/doc/bvar-a-la-sims.tex index 088acc156..decbef20b 100644 --- a/doc/bvar-a-la-sims.tex +++ b/doc/bvar-a-la-sims.tex @@ -479,7 +479,7 @@ The command will actually compute the marginal density for several models: first The syntax for computing forecasts is: \medskip -\texttt{bvar\_density(}\textit{options\_list}\texttt{) }\textit{max\_number\_of\_lags}\texttt{;} +\texttt{bvar\_forecast(}\textit{options\_list}\texttt{) }\textit{max\_number\_of\_lags}\texttt{;} \medskip The options are those describe above, plus a few ones: diff --git a/doc/manual.xml b/doc/manual.xml index 537ff0dc3..7eee4ac3b 100644 --- a/doc/manual.xml +++ b/doc/manual.xml @@ -29,7 +29,7 @@ A copy of the license can be found at: http://www.gnu.org/licenses/fdl.txt -Dynare +dynare var varexo varexo_det @@ -53,14 +53,10 @@ A copy of the license can be found at: dynasave dynatype unit_root_vars -olr -olr_inst optim_weights osr osr_params -@define forecast -@if...@elseif...@else...@end Preface @@ -111,14 +107,14 @@ Currently the development team of Dynare is composed of S. Adjemian, M. Juillard December 30, 2005 added details about parameter transformation in and in -added conditional compilation commands and +added conditional compilation commands and if_elseif_else_end enhanced output section of command added exogenous deterministic shocks in stochastic models. See , , , added a forecast command for calibrated models. See . October 14, 2005 -added syntax for computing optimal policy. See , , , , . +added syntax for computing optimal policy. See olr, olr_inst, , , . added syntax for estimating correlation between two shocks or two measurment errors in , and @@ -275,9 +271,9 @@ you can put them in a file called .octaverc in your home di Some words of warning -You should carefully watch the content of you Matlab® or Octave path. You can display its content by simply typing path in the command window. +You should be very careful about the content of you Matlab® or Octave path. You can display its content by simply typing path in the command window. -The path should normally contain system directories of Matlab® or Octave, and the matlab subdirectory of your Dynare installation. It should not contain any other Dynare-related directory, from another Dynare version of from the version you are using. However, note that Dynare will automatically add one (and only one) of the mex/2007a, mex/2007b, and mex/octave subdirectories, depending on your installation. +The path should normally contain system directories of Matlab® or Octave, and the matlab subdirectory of your Dynare installation. It should not contain any other Dynare-related directory, from another Dynare version of from the version you are using. However, note that Dynare will automatically add one (and only one) of the mex/2007a, mex/2007b, and mex/octave subdirectories, depending on your installation. You have to be aware that adding other directories to your path can potentially create problems, if some of your M-files have the same names than Dynare files. Your files would then override Dynare files, and make Dynare unusable. @@ -286,31 +282,11 @@ you can put them in a file called .octaverc in your home di -Commands - -Dynare commands are either single instructions or a block of instructions. Each single instructions or block elements are terminated by ;. Block of instructions are terminated by end;. - +Dynare invocation - -Most Dynare commands have arguments and several accept options, indicated in parentheses after the command keyword. - - -In the description of Dynare commands, the following conventions are observed: - -optional arguments or options are indicated between square brackets [] -repreated arguments are indicated by ellipses ... -INTEGER indicates an integer number -DOUBLE indicates a double precision number. The following syntaxes are valid: 1.1e3, 1.1E3, 1.1d3, 1.1D3. -EXPRESSION indicates a mathematical expression valid in the underlying language (Matlab® or GNU Octave) -VARIABLE_NAME indicates a variable name starting with an alphabetical character and can't contain ()+-*/^=!;:@#. or accentuated characters -PARAMETER_NAME indicates a parameter name starting with an alphabetical charcater and can't contain ()+-*/^=!;:@#. or accentuated characters -FILENAME indicates a file name valid under your operating system (Windows®, GNU/Linux, ...) - - +You invoke Dynare by typing the dynare at the Matlab® or Octave prompt. -Executing Dynare - - + dynare @@ -323,9 +299,12 @@ In the description of Dynare commands, the following conventions are observed: dynare - + FILENAME[.mod] + noclearall + savemacro + debug @@ -367,57 +346,44 @@ dynare ramst or -dynare ramst.mod +dynare ramst.mod savemacro - + -General declarations +Model file commands + +Dynare commands are either single instructions or a block of instructions. Each single instructions or block elements are terminated by ;. Block of instructions are terminated by end;. + -General declarations of variables and parameters are made with the following commands: + +Most Dynare commands have arguments and several accept options, indicated in parentheses after the command keyword. + + +In the description of Dynare commands, the following conventions are observed: + +optional arguments or options are indicated between square brackets [] +repreated arguments are indicated by ellipses ... +INTEGER indicates an integer number +DOUBLE indicates a double precision number. The following syntaxes are valid: 1.1e3, 1.1E3, 1.1d3, 1.1D3. +EXPRESSION indicates a mathematical expression valid in the underlying language (Matlab® or GNU Octave) +VARIABLE_NAME indicates a variable name starting with an alphabetical character and can't contain ()+-*/^=!;:@#. or accentuated characters +PARAMETER_NAME indicates a parameter name starting with an alphabetical charcater and can't contain ()+-*/^=!;:@#. or accentuated characters +FILENAME indicates a file name valid under your operating system (Windows®, GNU/Linux, ...) + + + +Variable declarations + +Declarations of variables and parameters are made with the following commands: - (deprecated) - - - periods - - - - periods - specifies the number of simulation periods - - - - - periods - INTEGER; - - - - -Description - -This command is now deprecated (but will still work for older model files). It is not necessary when no simulation is performed and is replaced by an option PERIODS in SIMUL and STOCH_SIMUL. - - -Set 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. - - - -Example - -periods 100; - - - - var @@ -587,6 +553,84 @@ bet = sqrt(2); +Other general declarations + + + + (deprecated) + + + + + + + dsample + + + + dsample + reduces the number of periods considered in following output commands + + + + + + periods + + + + periods + specifies the number of simulation periods + + + + + periods + INTEGER; + + + + +Description + +This command is now deprecated (but will still work for older model files). It is not necessary when no simulation is performed and is replaced by an option PERIODS in SIMUL and STOCH_SIMUL. + + +Set 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. + + + +Example + +periods 100; + + + + + + + cutoff + + + + cutoff + declares the cutoff for fast deterministic simulations + + + + + + markowitz + + + + markowitz + declares the markowitz criterion for fast deterministic simulations + + + + + Model declaration The model is declared inside a block. @@ -649,7 +693,7 @@ bet = sqrt(2); The equations of the model are written in a block delimited by model; and end;. -There must be as many equations as there are endogenous variables in the model, except when used to compute the unconstrained optimal policy with olr. The lead and lag of the variables are written in parenthesis immediately after the variable name. Leads or lags of more than one period are allowed. All the functions available in Matlab, Scilab or Gauss, respectively, are recognized. Each equation must be terminated by a semicolon (;). +There must be as many equations as there are endogenous variables in the model, except when used to compute the unconstrained optimal policy with planner_objective. The lead and lag of the variables are written in parenthesis immediately after the variable name. Leads or lags of more than one period are allowed. All the functions available in Matlab, Scilab or Gauss, respectively, are recognized. Each equation must be terminated by a semicolon (;). When the equations are written in homogenous form, it is possible to omit the "= 0" part and write only the left hand side of the equation. @@ -711,6 +755,7 @@ For models with lags on more than one period, the command + @@ -771,6 +816,17 @@ steady; + + + initval_file + + + + initval_file + use an external file for specifying initial values (for steady-state computation or for simulations) + + + endval @@ -921,7 +977,8 @@ If the variance of an exogenous variable is set to zero, this variable will appe - + + (deprecated) @@ -1087,6 +1144,17 @@ forecast; + + + mshocks + + + + mshocks + specifies multiplicative shocks on deterministic or stochastic exogenous variables + + + Sigma_e @@ -1156,6 +1224,7 @@ Dynare has special commands for the computation of the static equilibrium of the + @@ -1226,6 +1295,17 @@ See and . + + + homotopy_setup + + + + homotopy_setup + instructs to use homotopy methods + + + check @@ -1573,6 +1653,8 @@ Note that in order to avoid stochastic singularity, you must have at least as ma + + @@ -2120,6 +2202,28 @@ oo_.posterior_hpdsup.measurement_errors_corr.gdp_conso + + + prior_analysis + + + + prior_analysis + Prior distribution analysis + + + + + + posterior_analysis + + + + posterior_analysis + Posterior distribution analysis + + + unit_root_vars @@ -2160,105 +2264,17 @@ oo_.posterior_hpdsup.measurement_errors_corr.gdp_conso Optimal policy -Dynare has tools to compute optimal policies for quadratic objectives. You can either solve for optimal policy under commitment with or for optimal simple rule with . +Dynare has tools to compute optimal policies for quadratic objectives. You can either solve for optimal policy under commitment with planner_objective or for optimal simple rule with . - - + + - - - olr - - - - olr - computes optimal policy under commitment - - - - - olr - (OPTION,) - VARIABLE_NAME - VARIABLE_NAME - ; - - - -OPTIONS - -olr_beta=VALUE sets the value of the discount factor for the intertemporal optimization problem -All options for - - - -Description - -olr computes optimal policies under commitment (Ramsey plans) for linear--quadratic problems of the form - -
-maxu E0Σt=0βt(y'tW11yt+2y'tW12ut+u'tW22ut) - -s.t. - - A1Et(yt+1)+A2yt+A3yt-1+But+Cet=0 - -
-with - -y: endogenous variables -u: policiy instrument -e: exogenous stochastic shocks -β: discount factor - -The policy instruments must be listed with . - -The quadratic objectives must be listed with . - -Multipliers are automatically added to the model. Note, however, that the representation isn't minimal and that, in the solution, some multipliers could be sustituted off. - - -Forward-looking endogenous variables don't need to be present in the dynamics of the economy. - - -Dynare automatically builds the corresponding linear rational expectation model and solves it as with . - -
-
- - - - olr_inst - - - - olr_inst - declares instruments for optimal policy under commitment - - - - - olr_inst - VARIABLE_NAME - VARIABLE_NAME - ; - - - - -Description - -olr_inst declares instruments for optimal policy computed by . - - - - optim_weights @@ -2303,7 +2319,7 @@ Dynare automatically builds the corresponding linear rational expectation model Description -optim_weights secifies the nonzero elements of the quadratic weight matrices for the objectives in and +optim_weights secifies the nonzero elements of the quadratic weight matrices for the objectives in @@ -2389,8 +2405,45 @@ This problem is solved using a numerical optimizer.
+ + + planner_objective + + + + planner_objective + declares the policy maker objective, for use with + + + + + + ramsey_policy + + + + ramsey_policy + computes the first order approximation of the policy that maximizes the policy maker objective function (see ) submitted to the constraints provided by the equilibrium path of the economy + + + +Sensitivity analysis + + + + dynare_sensitivity + + + + dynare_sensitivity + interface to the global sensitivity analysis (GSA) toolbox developed by the Joint Research Center of the European Commission + + + + + Displaying and saving results Dynare has comments to plot the results of a simulation and to save the results. @@ -2501,121 +2554,119 @@ In Matlab, variables saved with the dynasave command can be r
-Conditional compilation - -Dynare has the following commands to choose which part of the *.mod file is executed. This is useful to maintain several versions of a model in the same *.mod file. +Macro-processing language +It is possible to use "macro" commands in the *.mod file for doing the following tasks: source file inclusion, replicating blocks of equations through loops, conditional inclusion of code... + +Technically, this macro language is totally independent of the basic Dynare language, and is processed by a separate component of the Dynare pre-processor. The macro processor transforms a *.mod file with macros into a *.mod file without macros (doing expansions/inclusions), and then feeds it to the Dynare parser. + - + + + + + + + @#include + + + + @#include + includes another file + + + - @define + @#define - @define - defines a macro + @#define + defines a macro-variable - - - - @define - - VARIABLE_NAME - - - INTEGER - - ; - - -Description - -@define defines a macro with name VARIABLE_NAME and value INTEGER. This macro can be used later in the *.mod file only in @if or @elseif statements. The macros can't be used to replace arbitrary part of codes like in C, for example. - - - -Example - - - - @define version 1; - - - - - - + - @if ... @elseif ... @else ... @end + @#if ... @#else ... @#endif - @if ... @elseif ... @else ... @end - defines conditional compilation of the *.mod file + @#if ... @#else ... @#endif + conditional inclusion of some part of the *.mod file + - - - @if - - VARIABLE_NAME - - - LOGICAL_OPERATOR - - - INTEGER - - ; - ... - - - -Description -LOGICAL_OPERATOR are - -== equal -!= not equal -< lesser than -> greater than -<= lesser or equal than ->= greater or equal than - - + + + @#for ... @#endfor + - -These commands let the user define which part of the *.mod file should be handled by Dynare - - + + @#for ... @#endfor + loop for replications of portions of the *.mod file + + -Example - - - - @define version 1; - parameters alph bet; - alph = 0.3; - @if version == 1; - bet = 0.9; - @elseif version == 2; - bet = 0.95; - @else; - bet = 0.98; - @end; - - - - + + + @#echo + + + @#echo + asks the preprocessor to display some message on standard output + + + + + + @#error + + + + @#error + asks the preprocessor to display some error message on standard output and to abort + + +Misc commands + + + + + + + + + bvar_density + + + + bvar_density + computes the marginal density of an estimated BVAR model, using Minnesota priors + + + + + + bvar_forecast + + + + bvar_forecast + computes in-sample or out-sample forecasts for an estimated BVAR model, using Minnesota priors + + + + + Examples