Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 4.3
  • 4.4
  • 4.5
  • 4.6
  • 5.x
  • 6.x
  • asm
  • aux_func
  • clang+openmp
  • dates-and-dseries-improvements
  • declare_vars_in_model_block
  • dmm
  • dragonfly
  • dynare_minreal
  • eigen
  • error_msg_undeclared_model_vars
  • estim_params
  • exo_steady_state
  • gpm-optimal-policy
  • julia
  • madysson
  • master
  • mex-GetPowerDeriv
  • penalty
  • separateM_
  • slice
  • sphinx-doc-experimental
  • static_aux_vars
  • time-varying-information-set
  • various_fixes
  • 3.062
  • 3.063
  • 4.0.0
  • 4.0.1
  • 4.0.2
  • 4.0.3
  • 4.0.4
  • 4.1-alpha1
  • 4.1-alpha2
  • 4.1.0
  • 4.1.1
  • 4.1.2
  • 4.1.3
  • 4.2.0
  • 4.2.1
  • 4.2.2
  • 4.2.3
  • 4.2.4
  • 4.2.5
  • 4.3.0
  • 4.3.1
  • 4.3.2
  • 4.3.3
  • 4.4-beta1
  • 4.4.0
  • 4.4.1
  • 4.4.2
  • 4.4.3
  • 4.5.0
  • 4.5.1
  • 4.5.2
  • 4.5.3
  • 4.5.4
  • 4.5.5
  • 4.5.6
  • 4.5.7
  • 4.6-beta1
  • 4.6.0
  • 4.6.0-rc1
  • 4.6.0-rc2
  • 4.6.1
  • 4.6.2
  • 4.6.3
  • 4.6.4
  • 4.7-beta1
  • 4.7-beta2
  • 4.7-beta3
  • 5.0
  • 5.0-rc1
  • 5.1
  • 5.2
  • 5.3
  • 5.4
  • 5.5
  • 6-beta1
  • 6-beta2
  • 6.0
  • 6.1
  • 6.2
  • 6.3
  • 6.4
91 results

Target

Select target project
  • giovanma/dynare
  • giorgiomas/dynare
  • Vermandel/dynare
  • Dynare/dynare
  • normann/dynare
  • MichelJuillard/dynare
  • wmutschl/dynare
  • FerhatMihoubi/dynare
  • sebastien/dynare
  • lnsongxf/dynare
  • rattoma/dynare
  • CIMERS/dynare
  • FredericKarame/dynare
  • SumuduK/dynare
  • MinjeJeon/dynare
  • camilomrch/dynare
  • DoraK/dynare
  • avtishin/dynare
  • selma/dynare
  • claudio_olguin/dynare
  • jeffjiang07/dynare
  • EthanSystem/dynare
  • stepan-a/dynare
  • wjgatt/dynare
  • JohannesPfeifer/dynare
  • gboehl/dynare
  • ebenetce/dynare
  • chskcau/dynare-doc-fixes
28 results
Select Git revision
  • 4.3
  • 4.4
  • 4.5
  • aux_func
  • dates-and-dseries-improvements
  • declare_vars_in_model_block
  • dmm
  • dynamic-striated
  • eigen
  • error_msg_undeclared_model_vars
  • estim_params
  • exceptions
  • exo_steady_state
  • filter_initial_state
  • gpm-optimal-policy
  • julia
  • master
  • merge-initvalfile-fix
  • mex-GetPowerDeriv
  • new_ep
  • occbin
  • penalty
  • remove-@dates
  • remove-@dseries
  • remove-utilities-tests
  • rmExtraExo
  • separateM_
  • slice
  • sphinx-doc-experimental
  • static_aux_vars
  • temporary_terms
  • vec_str
  • 3.062
  • 3.063
  • 4.0.0
  • 4.0.1
  • 4.0.2
  • 4.0.3
  • 4.0.4
  • 4.1-alpha1
  • 4.1-alpha2
  • 4.1.0
  • 4.1.1
  • 4.1.2
  • 4.1.3
  • 4.2.0
  • 4.2.1
  • 4.2.2
  • 4.2.3
  • 4.2.4
  • 4.2.5
  • 4.3.0
  • 4.3.1
  • 4.3.2
  • 4.3.3
  • 4.4-beta1
  • 4.4.0
  • 4.4.1
  • 4.4.2
  • 4.4.3
  • 4.5.0
  • 4.5.1
  • 4.5.2
  • 4.5.3
  • 4.5.4
  • 4.5.5
  • 4.5.6
67 results
Show changes
Showing
with 1055 additions and 12385 deletions
...@@ -79,7 +79,7 @@ p.footer { ...@@ -79,7 +79,7 @@ p.footer {
</ul> </ul>
</div> </div>
<h2>AIM Solver Subsystem<a name="1"></a></h2> <h2>AIM Solver Subsystem<a name="1"></a></h2>
<p>The AIM subsystem in the AIM subdirectory of the main Dynare matlab directory contains Matlab functions necessary for using <p>The AIM subsystem in the AIM subdirectory of the main Dynare matlab directory contains MATLAB functions necessary for using
Gary Anderson's AIM 1st order solver as an alternative to Dynare's default mjdgges solver (see <a href="http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html">http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html</a> ). Gary Anderson's AIM 1st order solver as an alternative to Dynare's default mjdgges solver (see <a href="http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html">http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html</a> ).
</p> </p>
<p>It cosists of:</p> <p>It cosists of:</p>
...@@ -92,7 +92,7 @@ p.footer { ...@@ -92,7 +92,7 @@ p.footer {
</div> </div>
<div> <div>
<ul> <ul>
<li>A subset of Matlab routines from Gary Anderson's own AIM package needed to compute and solve system passed on and returned <li>A subset of MATLAB routines from Gary Anderson's own AIM package needed to compute and solve system passed on and returned
by dynAIMsolver1 whose names start with SP.. of which <b>SPAmalg.m</b> is the main driver: by dynAIMsolver1 whose names start with SP.. of which <b>SPAmalg.m</b> is the main driver:
</li> </li>
</ul> </ul>
...@@ -215,7 +215,7 @@ p.footer { ...@@ -215,7 +215,7 @@ p.footer {
can produce ~ one order closer results to the Dynare solutiion can produce ~ one order closer results to the Dynare solutiion
then when if plain jacobia_ is passed, then when if plain jacobia_ is passed,
i.e. diff &lt; e-14 for aa and diff &lt; *e-13 for jacobia_ if Q' is used.</pre><p>GP July 2008</p> i.e. diff &lt; e-14 for aa and diff &lt; *e-13 for jacobia_ if Q' is used.</pre><p>GP July 2008</p>
<p>part of DYNARE, copyright Dynare Team (1996-2008) Gnu Public License.</p> <p>part of Dynare, copyright Dynare Team (1996-2008) Gnu Public License.</p>
<p class="footer"><br> <p class="footer"><br>
Published with MATLAB&reg; 7.1<br></p> Published with MATLAB&reg; 7.1<br></p>
</div> </div>
...@@ -225,7 +225,7 @@ p.footer { ...@@ -225,7 +225,7 @@ p.footer {
%% AIM Solver Subsystem %% AIM Solver Subsystem
% The AIM subsystem in the AIM subdirectory of the main Dynare matlab % The AIM subsystem in the AIM subdirectory of the main Dynare matlab
% directory contains Matlab functions necessary for using % directory contains MATLAB functions necessary for using
% Gary Anderson's AIM 1st order solver as an alternative to Dynare's default mjdgges solver (see http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html ). % Gary Anderson's AIM 1st order solver as an alternative to Dynare's default mjdgges solver (see http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html ).
% %
% It cosists of: % It cosists of:
...@@ -236,7 +236,7 @@ p.footer { ...@@ -236,7 +236,7 @@ p.footer {
% gu=dr.hgu from the AIM outputs. ("1" in the title is for 1st order % gu=dr.hgu from the AIM outputs. ("1" in the title is for 1st order
% solver). % solver).
% %
% * A subset of Matlab routines from Gary Anderson's own AIM package needed to compute % * A subset of MATLAB routines from Gary Anderson's own AIM package needed to compute
% and solve system passed on and returned by dynAIMsolver1 whose names start with SP.. % and solve system passed on and returned by dynAIMsolver1 whose names start with SP..
% of which *SPAmalg.m* is the main driver: % of which *SPAmalg.m* is the main driver:
% %
...@@ -394,7 +394,7 @@ p.footer { ...@@ -394,7 +394,7 @@ p.footer {
% %
% GP July 2008 % GP July 2008
% %
% part of DYNARE, copyright Dynare Team (1996-2008) % part of Dynare, copyright Dynare Team (1996-2008)
% Gnu Public License. % Gnu Public License.
##### SOURCE END ##### ##### SOURCE END #####
......
...@@ -111,7 +111,7 @@ demia/Economics/Dynare%20DSGE/V4/doc/AIM/Dynare%20AIM%20use%20Doc.html#11= ...@@ -111,7 +111,7 @@ demia/Economics/Dynare%20DSGE/V4/doc/AIM/Dynare%20AIM%20use%20Doc.html#11=
<H2>AIM Solver Subsystem<A name=3D1></A></H2> <H2>AIM Solver Subsystem<A name=3D1></A></H2>
<P>The AIM subsystem in the AIM subdirectory of the main Dynare matlab = <P>The AIM subsystem in the AIM subdirectory of the main Dynare matlab =
directory=20 directory=20
contains Matlab functions necessary for using Gary Anderson's AIM 1st = contains MATLAB functions necessary for using Gary Anderson's AIM 1st =
order=20 order=20
solver as an alternative to Dynare's default mjdgges solver (see <A=20 solver as an alternative to Dynare's default mjdgges solver (see <A=20
href=3D"http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html">http:/= href=3D"http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html">http:/=
...@@ -129,7 +129,7 @@ AIM outputs.=20 ...@@ -129,7 +129,7 @@ AIM outputs.=20
("1" in the title is for 1st order solver). </LI></UL></DIV> ("1" in the title is for 1st order solver). </LI></UL></DIV>
<DIV> <DIV>
<UL> <UL>
<LI>A subset of Matlab routines from Gary Anderson's own AIM package = <LI>A subset of MATLAB routines from Gary Anderson's own AIM package =
needed to=20 needed to=20
compute and solve system passed on and returned by dynAIMsolver1 whose = compute and solve system passed on and returned by dynAIMsolver1 whose =
names=20 names=20
...@@ -328,7 +328,7 @@ forward looking models, passing into dynAIMsolver aa =3D{Q'|1}*jacobia_ ...@@ -328,7 +328,7 @@ forward looking models, passing into dynAIMsolver aa =3D{Q'|1}*jacobia_
i.e. diff &lt; e-14 for aa and diff &lt; *e-13 for jacobia_ if Q' = i.e. diff &lt; e-14 for aa and diff &lt; *e-13 for jacobia_ if Q' =
is used.</PRE> is used.</PRE>
<P>GP July 2008</P> <P>GP July 2008</P>
<P>part of DYNARE, copyright Dynare Team (1996-2008) Gnu Public = <P>part of Dynare, copyright Dynare Team (1996-2008) Gnu Public =
License.</P> License.</P>
<P class=3Dfooter><BR>Published with MATLAB=C2=AE 7.1<BR></P></DIV><!--=0A= <P class=3Dfooter><BR>Published with MATLAB=C2=AE 7.1<BR></P></DIV><!--=0A=
##### SOURCE BEGIN #####=0A= ##### SOURCE BEGIN #####=0A=
...@@ -336,7 +336,7 @@ License.</P> ...@@ -336,7 +336,7 @@ License.</P>
%% AIM Solver Subsystem %% AIM Solver Subsystem
% The AIM subsystem in the AIM subdirectory of the main Dynare matlab % The AIM subsystem in the AIM subdirectory of the main Dynare matlab
% directory contains Matlab functions necessary for using % directory contains MATLAB functions necessary for using
% Gary Anderson's AIM 1st order solver as an alternative to Dynare's = % Gary Anderson's AIM 1st order solver as an alternative to Dynare's =
default mjdgges solver (see = default mjdgges solver (see =
http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html ).=20 http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html ).=20
...@@ -351,7 +351,7 @@ subsystem.=20 ...@@ -351,7 +351,7 @@ subsystem.=20
% gu=3Ddr.hgu from the AIM outputs. ("1" in the title is for 1st order % gu=3Ddr.hgu from the AIM outputs. ("1" in the title is for 1st order
% solver). % solver).
% %
% * A subset of Matlab routines from Gary Anderson's own AIM package = % * A subset of MATLAB routines from Gary Anderson's own AIM package =
needed to compute needed to compute
% and solve system passed on and returned by dynAIMsolver1 whose names = % and solve system passed on and returned by dynAIMsolver1 whose names =
start with SP..=20 start with SP..=20
...@@ -544,7 +544,7 @@ used. =20 ...@@ -544,7 +544,7 @@ used. =20
% %
% GP July 2008 =20 % GP July 2008 =20
% %
% part of DYNARE, copyright Dynare Team (1996-2008) % part of Dynare, copyright Dynare Team (1996-2008)
% Gnu Public License. % Gnu Public License.
=0A= =0A=
##### SOURCE END #####=0A= ##### SOURCE END #####=0A=
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
\subsection*{AIM Solver Subsystem} \subsection*{AIM Solver Subsystem}
\begin{par} \begin{par}
The AIM subsystem in the AIM subdirectory of the main Dynare matlab directory contains Matlab functions necessary for using Gary Anderson's AIM 1st order solver as an alternative to Dynare's default mjdgges solver (see \begin{verbatim}http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html\end{verbatim} ). The AIM subsystem in the AIM subdirectory of the main Dynare matlab directory contains MATLAB functions necessary for using Gary Anderson's AIM 1st order solver as an alternative to Dynare's default mjdgges solver (see \begin{verbatim}http://www.federalreserve.gov/Pubs/oss/oss4/aimindex.html\end{verbatim} ).
\end{par} \vspace{1em} \end{par} \vspace{1em}
\begin{par} \begin{par}
It cosists of: It cosists of:
...@@ -41,7 +41,7 @@ It cosists of: ...@@ -41,7 +41,7 @@ It cosists of:
\end{itemize} \end{itemize}
\begin{itemize} \begin{itemize}
\setlength{\itemsep}{-1ex} \setlength{\itemsep}{-1ex}
\item A subset of Matlab routines from Gary Anderson's own AIM package needed to compute and solve system passed on and returned by dynAIMsolver1 whose names start with SP.. of which \textbf{SPAmalg.m} is the main driver: \item A subset of MATLAB routines from Gary Anderson's own AIM package needed to compute and solve system passed on and returned by dynAIMsolver1 whose names start with SP.. of which \textbf{SPAmalg.m} is the main driver:
\end{itemize} \end{itemize}
\begin{itemize} \begin{itemize}
\setlength{\itemsep}{-1ex} \setlength{\itemsep}{-1ex}
...@@ -235,7 +235,7 @@ Dynare use: ...@@ -235,7 +235,7 @@ Dynare use:
GP July 2008 GP July 2008
\end{par} \vspace{1em} \end{par} \vspace{1em}
\begin{par} \begin{par}
part of DYNARE, copyright Dynare Team (1996-2008) Gnu Public License. part of Dynare, copyright Dynare Team (1996-2008) Gnu Public License.
\end{par} \vspace{1em} \end{par} \vspace{1em}
......
SUBDIRS = preprocessor macroprocessor userguide parallel internals gsa dseries-and-reporting
info_TEXINFOS = dynare.texi
if HAVE_TEXI2HTML
if HAVE_LATEX2HTML
html-local: dynare.html
dynare.html: dynare.texi
rm -rf dynare.html
mkdir -p dynare.html
cd dynare.html && $(TEXI2HTML) --l2h --split section --prefix index ../dynare.texi
endif
endif
PDF_TARGETS =
if HAVE_PDFLATEX
PDF_TARGETS += guide.pdf bvar-a-la-sims.pdf
if HAVE_BIBTEX
PDF_TARGETS += dr.pdf
endif
endif
pdf-local: $(PDF_TARGETS)
EXTRA_DIST = guide.tex guide.bbl bibmad.sty bvar-a-la-sims.tex dr.tex dr.bib dynare.plots
guide.pdf: guide.tex guide.bbl bibmad.sty
$(PDFLATEX) guide
$(PDFLATEX) guide
bvar-a-la-sims.pdf: bvar-a-la-sims.tex
$(PDFLATEX) bvar-a-la-sims
$(PDFLATEX) bvar-a-la-sims
dr.pdf: dr.tex
$(PDFLATEX) dr
$(BIBTEX) dr
$(PDFLATEX) dr
$(PDFLATEX) dr
clean-local:
# Do not delete guide.bbl which is not autogenerated
rm -f *~ *.pdf *.log *.aux *.out *.blg dr.bbl
\message{harvard bibliography,}
\def\@hiteml[#1]#2#3#4{\item[]\if@filesw%
{ \def\protect##1{\string ##1\space}\immediate%
\write\@auxout{\string\harvardcite{#4}{#2}{#1}{#3}}}\fi%
\protect\hspace*{-\labelwidth}\protect\hspace*{-\labelsep}\ignorespaces}
\def\@hitem#1#2#3{\item[]\if@filesw%
{ \def\protect##1{\string ##1\space}\immediate%
\write\@auxout{\string\harvardcite{#3}{#1}{#1}{#2}}}\fi%
\protect\hspace*{-\labelwidth}\protect\hspace*{-\labelsep}\ignorespaces}
\def\harvarditem{\@ifnextchar [{\@hiteml}{\@hitem}}
\def\harvardcite#1#2#3#4{
\global\@namedef{bhf@#1}{#2}
\global\@namedef{bha@#1}{#3}
\global\@namedef{bhy@#1}{#4}\global\@namedef{b@#1}{\csname bhf@#1\endcsname}
}
\def\citeasnoun{\@ifnextchar [{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}}
\def\cite{\@ifnextchar [{\@tempswatrue\@citexasnoun}
{\@tempswafalse\@citexasnoun[]}
}
\def\citeyear{\@ifnextchar [{\@tempswatrue\@citexyear}
{\@tempswafalse\@citexyear[]}
}
\def\citename{\@ifnextchar [{\@tempswatrue\@citexname}
{\@tempswafalse\@citexname[]}
}
% \def\@enamedef#1{\expandafter\edef\csname #1\endcsname}
% Previous line should be replaced by the following to prevent
% problems with the NFSS. Solution by Bernd Raichle.
\def\@enamedef#1{\expandafter\def\csname #1\expandafter\endcsname\expandafter}
\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
\def\@citea{}\@cite{\@for\@citeb:=#2\do
{\@citea\def\@citea{\@hisep\penalty\@m\ }\@ifundefined
{b@\@citeb}{{\bf ?}\@warning
{Citation `\@citeb' on page \thepage \space undefined}}%
{{\csname b@\@citeb\endcsname\@hysep\csname bhy@\@citeb\endcsname}%
\global\@enamedef{b@\@citeb}{\csname bha@\@citeb\endcsname}}%
}}{#1}}
\def\@citexasnoun[#1]#2{%
\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
\@citeasnoun{{\@ifundefined%
{b@#2}%
{[{\bf ?}\@warning{Citation `#2' on page \thepage \space undefined}}%
{{\csname b@#2\endcsname\ [\csname bhy@#2\endcsname}%
\global\@namedef{b@#2}{\csname bha@#2\endcsname}}%
}}{#1}}
\def\@citexname[#1]#2{%
\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
\@citename{{\@ifundefined%
{b@#2}%
{{\bf ?}\@warning{Citation `#2' on page \thepage \space undefined}}%
{{\csname bhf@#2\endcsname}}%
}}{#1}}
\def\@citexyear[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
\def\@citeayear{}\@cite{\@for\@citebyear:=#2\do
{\@citeayear\def\@citeayear{\@hisep\penalty\@m\ }\@ifundefined
{b@\@citebyear}{{\bf ?}\@warning
{Citation `\@citebyear' on page \thepage \space undefined}}%
{{\csname bhy@\@citebyear\endcsname}%
}%
}}{#1}}
\gdef\hysep@agsm{\ }\gdef\hisep@agsm{,}%
\gdef\hysep@dcu{, }\gdef\hisep@dcu{;}%
\let\@hysep\hysep@agsm \let\@hisep\hisep@agsm
\def\citationstyle#1{%
\global\@namedef{@hysep}{\csname hysep@#1\endcsname}%
\global\@namedef{@hisep}{\csname hisep@#1\endcsname}}
%DEFAULT DEFINITIONS
\def\@cite#1#2{({#1\if@tempswa , #2\fi})}
\def\@citeasnoun#1#2{{#1\if@tempswa , #2\fi]}}
\def\@citename#1#2{{#1\if@tempswa \ (#2)\fi}}
% CHANGE \end{document} - to handle double definitions
\def\enddocument{\@checkend{document}\clearpage\begingroup
\if@filesw \immediate\closeout\@mainaux
\def\global\@namedef##1##2{}\def\newlabel{\@testdef r}%
\def\bibcite{\@testdef b}%
\def\harvardcite{\@testbibh}\@tempswafalse \makeatletter\input \jobname.aux
\if@tempswa \@warning{Label(s) may have changed. Rerun to get
cross-references right}\fi\fi\endgroup\deadcycles\z@\@@end}
\def\@testbibh #1#2#3{
\def\@tempa{#2}\expandafter
\ifx \csname bhf@#1\endcsname \@tempa
\def\@tempa{#3}\expandafter
\ifx \csname bha@#1\endcsname \@tempa
\else \@tempswatrue
\fi
\else
\@tempswatrue
\fi
}
%
\ No newline at end of file
...@@ -11,29 +11,29 @@ ...@@ -11,29 +11,29 @@
\begin{document} \begin{document}
\title{BVAR models ``\`a la Sims'' in Dynare\thanks{Copyright \copyright~2007--2011 S\'ebastien \title{BVAR models ``\`a la Sims'' in Dynare\thanks{Copyright \copyright~2007--2015 S\'ebastien
Villemot. Permission is granted to copy, distribute and/or modify Villemot; \copyright~2016--2017 S\'ebastien
Villemot and Johannes Pfeifer. Permission is granted to copy, distribute and/or modify
this document under the terms of the GNU Free Documentation this document under the terms of the GNU Free Documentation
License, Version 1.3 or any later version published by the Free License, Version 1.3 or any later version published by the Free
Software Foundation; with no Invariant Sections, no Front-Cover Software Foundation; with no Invariant Sections, no Front-Cover
Texts, and no Back-Cover Texts. A copy of the license can be found Texts, and no Back-Cover Texts. A copy of the license can be found
at: \url{http://www.gnu.org/licenses/fdl.txt} at: \url{https://www.gnu.org/licenses/fdl.txt}
\newline \newline
\indent Many thanks to Christopher Sims for providing his BVAR \indent Many thanks to Christopher Sims for providing his BVAR
MATLAB\textregistered~routines, to St\'ephane Adjemian and Michel Juillard MATLAB\textsuperscript{\textregistered}~routines, to St\'ephane Adjemian and Michel Juillard
for their helpful support, and to Marek Jaroci\'nski for reporting a bug. for their helpful support, and to Marek Jaroci\'nski for reporting a bug.
}} }}
\author{S\'ebastien Villemot\thanks{Paris School of Economics and \author{S\'ebastien Villemot\thanks{Paris School of Economics and
CEPREMAP. E-mail: CEPREMAP.} \and Johannes Pfeifer\thanks{University of the Bundeswehr Munich. E-mail: \href{mailto:johannes.pfeifer@unibw.de}{\texttt{johannes.pfeifer@unibw.de}}.}}
\href{mailto:sebastien@dynare.org}{\texttt{sebastien@dynare.org}}.}} \date{First version: September 2007 \hspace{1cm} This version: May 2017}
\date{First version: September 2007 \hspace{1cm} This version: August 2012}
\maketitle \maketitle
\begin{abstract} \begin{abstract}
Dynare incorporates routines for Bayesian VAR models estimation, using a Dynare incorporates routines for Bayesian VAR models estimation, using a
flavor of the so-called ``Minnesota priors,''. These routines can be used flavor of the so-called ``Minnesota priors.'' These routines can be used
alone or in parallel with a DSGE estimation. This document describes their alone or in parallel with a DSGE estimation. This document describes their
implementation and usage. implementation and usage.
\end{abstract} \end{abstract}
...@@ -435,10 +435,11 @@ p(Y^+ | X^+) & = & \frac{\int (2\pi)^{-\frac{T^+\cdot ny}{2}} f(\Phi,\Sigma | \d ...@@ -435,10 +435,11 @@ p(Y^+ | X^+) & = & \frac{\int (2\pi)^{-\frac{T^+\cdot ny}{2}} f(\Phi,\Sigma | \d
\section{Dynare commands} \section{Dynare commands}
\label{dynare-commands} \label{dynare-commands}
Dynare incorporates two commands related to BVAR models \`a la Sims: Dynare incorporates three commands related to BVAR models \`a la Sims:
\begin{itemize} \begin{itemize}
\item \texttt{bvar\_density} for computing marginal density, \item \texttt{bvar\_density} for computing marginal density,
\item \texttt{bvar\_forecast} for forecasting (and RMSE computation). \item \texttt{bvar\_forecast} for forecasting (and RMSE computation),
\item \texttt{bvar\_irf} for computing Impulse Response Functions.
\end{itemize} \end{itemize}
\subsection{Common options} \subsection{Common options}
...@@ -499,16 +500,18 @@ The syntax for computing the marginal density is: ...@@ -499,16 +500,18 @@ The syntax for computing the marginal density is:
The options are those described above. The options are those described above.
The command will actually compute the marginal density for several models: first for the model with one lag, then with two lags, and so on up to \textit{max\_number\_of\_lags} lags. The command will actually compute the marginal density for several models: first for the model with one lag, then with two lags, and so on up to \textit{max\_number\_of\_lags} lags. Results will be stored in a \textit{max\_number\_of\_lags} by 1 vector \texttt{oo\_.bvar.log\_marginal\_data\_density}. The command will also store the prior and posterior information into \textit{max\_number\_of\_lags} by 1 cell arrays \texttt{oo\_.bvar.prior} and \texttt{oo\_.bvar.posterior}.
\subsection{Forecasting} \subsection{Forecasting}
The syntax for computing (out-of-sample) forecasts is: The syntax for computing (out-of-sample) forecasts is:
\medskip \medskip
\texttt{bvar\_forecast(}\textit{options\_list}\texttt{) }\textit{max\_number\_of\_lags}\texttt{;} \texttt{bvar\_forecast(}\textit{options\_list}\texttt{) }\textit{number\_of\_lags}\texttt{;}
\medskip \medskip
In contrast to the \texttt{bvar\_density}, you need to specify the actual lag length used, not the maximum lag length. Typically, the actual lag length should be based on the results from the \texttt{bvar\_density} command.
The options are those describe above, plus a few ones: The options are those describe above, plus a few ones:
\begin{itemize} \begin{itemize}
\item \texttt{forecast}: the number of periods over which to compute forecasts after the end of the sample (no default) \item \texttt{forecast}: the number of periods over which to compute forecasts after the end of the sample (no default)
...@@ -539,6 +542,42 @@ Most results are stored for future use: ...@@ -539,6 +542,42 @@ Most results are stored for future use:
\item if RMSE has been computed, results are in \texttt{oo\_.bvar.forecast.rmse}. \item if RMSE has been computed, results are in \texttt{oo\_.bvar.forecast.rmse}.
\end{itemize} \end{itemize}
\subsection{Impulse Response Functions}
The syntax for computing impulse response functions is:
\medskip
\texttt{bvar\_irf(}\textit{number\_of\_lags},\textit{identification\_scheme}\texttt{);}
\medskip
The \textit{identification\_scheme} option has two potential values
\begin{itemize}
\item \texttt{'Cholesky'}: uses a lower triangular factorization of the covariance matrix (default),
\item \texttt{'SquareRoot'}: uses the Matrix square root of the covariance matrix (\verb+sqrtm+ matlab's routine).
\end{itemize}
Keep in mind that the first factorization of the covariance matrix is sensible to the ordering of the variables (as declared in the mod file with \verb+var+). This is not the case of the second factorization, but its structural interpretation is, at best, unclear (the Matrix square root of a covariance matrix, $\Sigma$, is the unique symmetric matrix $A$ such that $\Sigma = AA$).\newline
If you want to change the length of the IRFs plotted by the command, you can put\\
\medskip
\texttt{options\_.irf=40;}\\
\medskip
before the \texttt{bvar\_irf}-command. Similarly, to change the coverage of the highest posterior density intervals to e.g. 60\% you can put the command\\
\medskip
\texttt{options\_.bvar.conf\_sig=0.6;}\\
\medskip
there.\newline
The mean, median, variance, and confidence intervals for IRFs are saved in \texttt{oo\_.bvar.irf}
\section{Examples} \section{Examples}
This section presents two short examples of BVAR estimations. These examples and the associated datafile (\texttt{bvar\_sample.m}) can be found in the \texttt{tests/bvar\_a\_la\_sims} directory of the Dynare v4 subversion tree. This section presents two short examples of BVAR estimations. These examples and the associated datafile (\texttt{bvar\_sample.m}) can be found in the \texttt{tests/bvar\_a\_la\_sims} directory of the Dynare v4 subversion tree.
...@@ -555,6 +594,8 @@ bvar_density(datafile = bvar_sample, first_obs = 20, bvar_prior_flat, ...@@ -555,6 +594,8 @@ bvar_density(datafile = bvar_sample, first_obs = 20, bvar_prior_flat,
bvar_prior_train = 10) 8; bvar_prior_train = 10) 8;
bvar_forecast(forecast = 10, bvar_replic = 10000, nobs = 200) 8; bvar_forecast(forecast = 10, bvar_replic = 10000, nobs = 200) 8;
bvar_irf(8,'Cholesky');
\end{verbatim} \end{verbatim}
Note that you must declare twice the variables used in the estimation: first with a \texttt{var} statement, then with a \texttt{varobs} statement. This is necessary to have a syntactically correct \texttt{mod} file. Note that you must declare twice the variables used in the estimation: first with a \texttt{var} statement, then with a \texttt{varobs} statement. This is necessary to have a syntactically correct \texttt{mod} file.
......
% Encoding: UTF-8
@techreport{adjemian/al:2011, @TechReport{adjemian/al:2011,
author = {Adjemian, St\'ephane and Bastani, Houtan and Juillard, Michel and Mihoubi, Ferhat and Perendia, George and Ratto, Marco and Villemot, S\'ebastien}, author = {Adjemian, St\'ephane and Bastani, Houtan and Juillard, Michel and Karam\'e, Fr\'ederic and Maih, Junior and Mihoubi, Ferhat and Mutschler, Willi and Perendia, George and Pfeifer, Johannes and Ratto, Marco and Villemot, S\'ebastien},
title = {Dynare: Reference Manual, Version 4},
institution = {CEPREMAP}, institution = {CEPREMAP},
title = {Dynare: Reference Manual Version 4},
year = {2011}, year = {2011},
number = {1},
type = {Dynare Working Papers}, type = {Dynare Working Papers},
number = {1}
} }
@Article{blanchard/kahn:1980,
@article{blanchard/kahn:1980,
author = {Blanchard, Olivier Jean and Kahn, Charles M.}, author = {Blanchard, Olivier Jean and Kahn, Charles M.},
title = {The Solution of Linear Difference Models under Rational Expectations},
journal = {Econometrica}, journal = {Econometrica},
year = 1980, title = {The Solution of Linear Difference Models under Rational Expectations},
volume = {48}, year = {1980},
month = {7},
number = {5}, number = {5},
pages = {1305-11}, pages = {1305-11},
month = {July}, volume = {48},
keywords = { Macromodels Yield curve Persistence},
abstract = {Many have questioned the empirical relevance of the Calvo-Yun model. This paper adds a term structure to three widely studied macroeconomic models (Calvo-Yun, hybrid and Svensson). We back out from observations on the yield curve the underlying macroeconomic model that most closely matches the level, slope and curvature of the yield curve. With each model we trace the response of the yield curve to macroeconomic shocks. We assess the fit of each model against the observed behaviour of interest rates and find limited support for the Calvo-Yun model in terms of fit with the observed yield curve, we find some support for the hybrid model but the Svensson model performs best.}, abstract = {Many have questioned the empirical relevance of the Calvo-Yun model. This paper adds a term structure to three widely studied macroeconomic models (Calvo-Yun, hybrid and Svensson). We back out from observations on the yield curve the underlying macroeconomic model that most closely matches the level, slope and curvature of the yield curve. With each model we trace the response of the yield curve to macroeconomic shocks. We assess the fit of each model against the observed behaviour of interest rates and find limited support for the Calvo-Yun model in terms of fit with the observed yield curve, we find some support for the hybrid model but the Svensson model performs best.},
url = {http://ideas.repec.org/a/ecm/emetrp/v48y1980i5p1305-11.html} doi = {10.2307/1912186},
keywords = {Macromodels Yield curve Persistence},
} }
@Article{klein:2000,
@article{klein:2000,
author = {Klein, Paul}, author = {Klein, Paul},
title = {Using the generalized Schur form to solve a multivariate linear rational expectations model},
journal = {Journal of Economic Dynamics and Control}, journal = {Journal of Economic Dynamics and Control},
year = 2000, title = {Using the generalized {Schur} form to solve a multivariate linear rational expectations model},
volume = {24}, year = {2000},
month = {September},
number = {10}, number = {10},
pages = {1405-1423}, pages = {1405-1423},
month = {September}, volume = {24},
keywords = {}, doi = {10.1016/s0165-1889(99)00045-7},
abstract = {},
url = {http://ideas.repec.org/a/eee/dyncon/v24y2000i10p1405-1423.html}
} }
@Article{schmitt-grohe/uribe:2004,
@article{schmitt-grohe/uribe:2004,
author = {Schmitt-Groh\'{e}, Stephanie and Ur\'{i}be, Martin}, author = {Schmitt-Groh\'{e}, Stephanie and Ur\'{i}be, Martin},
title = {Solving dynamic general equilibrium models using a second-order approximation to the policy function},
journal = {Journal of Economic Dynamics and Control}, journal = {Journal of Economic Dynamics and Control},
year = 2004, title = {Solving dynamic general equilibrium models using a second-order approximation to the policy function},
volume = {28}, year = {2004},
month = {January},
number = {4}, number = {4},
pages = {755-775}, pages = {755-775},
month = {January}, volume = {28},
keywords = {}, doi = {10.1016/s0165-1889(03)00043-5},
url = {http://ideas.repec.org/a/eee/dyncon/v28y2004i4p755-775.html}
} }
@Article{sims:2001,
@article{sims:2001,
author = {Sims, Christopher A}, author = {Sims, Christopher A},
title = {Solving Linear Rational Expectations Models},
journal = {Computational Economics}, journal = {Computational Economics},
year = 2002, title = {Solving Linear Rational Expectations Models},
volume = {20}, year = {2002},
month = {October},
number = {1-2}, number = {1-2},
pages = {1-20}, pages = {1-20},
month = {October}, volume = {20},
keywords = {}, doi = {10.1023/A:1020517101123},
abstract = {},
url = {http://ideas.repec.org/a/kap/compec/v20y2002i1-2p1-20.html}
} }
@InCollection{uhlig:1999,
@incollection{uhlig:1999,
author = {Uhlig, Harald}, author = {Uhlig, Harald},
title = {A toolkit for analysing nonlinear dynamic stochastic models easily}, booktitle = {Computational Methods for the Study of Dynamic Economies},
booktitle = {Computational Methods for the Study of Dynamic Economics},
publisher = {Oxford University Press}, publisher = {Oxford University Press},
address = {Oxford},
title = {A toolkit for analysing nonlinear dynamic stochastic models easily},
year = {1999}, year = {1999},
editor = {Marimon, Ramon and Scott, Androw}, editor = {Marimon, Ramon and Scott, Andrew},
pages = {30-61} pages = {30-61},
} }
@techreport{kamenik:2003, @techreport{kamenik:2004,
author = {Kamenik, Ondra}, author = {Kamenik, Ondra},
title = {Solution of Specialized Sylvester Equation}, title = {Solution of Specialized Sylvester Equation},
institution = {Manuscript}, institution = {Manuscript},
year = {2003} year = {2004}
} }
@Article{collard/juillard:2001:compecon,
@article{collard/juillard:2001:compecon,
author = {Collard, Fabrice and Juillard, Michel}, author = {Collard, Fabrice and Juillard, Michel},
title = {A Higher-Order Taylor Expansion Approach to Simulation of Stochastic Forward-Looking Models with an Application to a Nonlinear Phillips Curve Model},
journal = {Computational Economics}, journal = {Computational Economics},
title = {A Higher-Order {Taylor} Expansion Approach to Simulation of Stochastic Forward-Looking Models with an Application to a Nonlinear {Phillips} Curve Model},
year = {2001}, year = {2001},
volume = {17}, month = {6},
number = {2-3}, number = {2-3},
pages = {125-39}, pages = {125-139},
month = {June}, volume = {17},
keywords = {}, doi = {10.1023/A:1011624124377},
url = {http://ideas.repec.org/a/kap/compec/v17y2001i2-3p125-39.html}
} }
@Book{golub/van-loan:1996,
@book{golub/van-loan:1996,
author = {Golub, Gene H. and Van Loan, Charles F.}, author = {Golub, Gene H. and Van Loan, Charles F.},
title = {Matrix Computations},
publisher = {The John Hopkins University Press}, publisher = {The John Hopkins University Press},
year = {1996}, title = {Matrix Computations},
edition = {third} year = {2013},
address = {Baltimore},
edition = {4},
} }
@Comment{jabref-meta: databaseType:bibtex;}
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
\usepackage{amssymb} \usepackage{amssymb}
\usepackage{amsmath} \usepackage{amsmath}
\usepackage{hyperref} \usepackage{hyperref}
\hypersetup{breaklinks=true,pagecolor=white,colorlinks=true,linkcolor=blue,citecolor=blue,urlcolor=blue} \hypersetup{breaklinks=true,colorlinks=true,linkcolor=blue,citecolor=blue,urlcolor=blue}
\usepackage{natbib} \usepackage{natbib}
\usepackage{fullpage} \usepackage{fullpage}
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
License, Version 1.3 or any later version published by the Free License, Version 1.3 or any later version published by the Free
Software Foundation; with no Invariant Sections, no Front-Cover Software Foundation; with no Invariant Sections, no Front-Cover
Texts, and no Back-Cover Texts. A copy of the license can be found Texts, and no Back-Cover Texts. A copy of the license can be found
at: \url{http://www.gnu.org/licenses/fdl.txt} at: \url{https://www.gnu.org/licenses/fdl.txt}
\newline \newline
The author acknowledges funding through the Seventh Framework Programme The author acknowledges funding through the Seventh Framework Programme
for Research (FP7) of the European Commission's Socio-economic Sciences and for Research (FP7) of the European Commission's Socio-economic Sciences and
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
computing the first order approximated solution of a nonlinear rational computing the first order approximated solution of a nonlinear rational
expectations model. The core of the algorithm is a generalized Schur expectations model. The core of the algorithm is a generalized Schur
decomposition (also known as the QZ decomposition), as advocated by several decomposition (also known as the QZ decomposition), as advocated by several
authors in the litterature. The contribution of the present paper is to focus authors in the literature. The contribution of the present paper is to focus
on implementation details that make the algorithm more generic and more on implementation details that make the algorithm more generic and more
efficient, especially for large models. efficient, especially for large models.
...@@ -62,12 +62,8 @@ detail the algorithm implemented in Dynare for computing the first order ...@@ -62,12 +62,8 @@ detail the algorithm implemented in Dynare for computing the first order
approximated solution of nonlinear rational expectations models.\footnote{This approximated solution of nonlinear rational expectations models.\footnote{This
algorithm is available using the \texttt{stoch\_simul} command of Dynare. The algorithm is available using the \texttt{stoch\_simul} command of Dynare. The
original implementation of this algorithm was done by Michel Juillard, using original implementation of this algorithm was done by Michel Juillard, using
MATLAB, and is available in the \texttt{matlab/dr1.m} file which is MATLAB, and is available in the \texttt{matlab/dyn\_first\_order\_solver.m} file which is
distributed with Dynare. Another implementation was done by the author, in distributed with Dynare.}
C++, in the \texttt{DecisionRules} class, in the
\texttt{mex/sources/estimation} directory of the source tree. The notations
used in the present paper are closer to the C++ implementation than to the
MATLAB implementation.}
This algorithm is based on a generalized Schur decomposition---also known as This algorithm is based on a generalized Schur decomposition---also known as
the QZ decomposition---and is therefore essentially a variation on the the QZ decomposition---and is therefore essentially a variation on the
...@@ -653,7 +649,7 @@ equation is: ...@@ -653,7 +649,7 @@ equation is:
\end{equation*} \end{equation*}
In the general case, this equation is a specialized Sylvester equation, which In the general case, this equation is a specialized Sylvester equation, which
can be solved using the algorithm proposed by can be solved using the algorithm proposed by
\citet{kamenik:2003}\footnote{This paper is distributed with Dynare, in the \citet{kamenik:2004}\footnote{This paper is distributed with Dynare, in the
\texttt{sylvester.pdf} file under the documentation directory.}. \texttt{sylvester.pdf} file under the documentation directory.}.
\bibliographystyle{elsarticle-harv} \bibliographystyle{elsarticle-harv}
......
if HAVE_PDFLATEX
if HAVE_BEAMER
pdf-local: dseriesReporting.pdf
endif
endif
SRC = dseriesReporting.tex
EXTRA_DIST = $(SRC)
dseriesReporting.pdf: $(SRC)
$(PDFLATEX) dseriesReporting
$(PDFLATEX) dseriesReporting
clean-local:
rm -f dseriesReporting.pdf *.toc *.aux *.log *.nav *.snm *.vrb *.out *~
\documentclass[10pt]{beamer} \documentclass[10pt]{beamer}
\usepackage[utf8]{inputenc}
\usepackage{color} \usepackage{tikz, hyperref, alltt}
\usepackage{amsmath}
\usepackage{epsf}
\usepackage{graphicx}
\usepackage{wasysym}
\usepackage{tikz}
\usetikzlibrary{positioning,shapes,shadows,arrows} \usetikzlibrary{positioning,shapes,shadows,arrows}
\tikzstyle{abstract}=[rectangle, rounded corners, draw=black, anchor=north, fill=blue!10, text centered, minimum height={height("Gp")+2pt}, minimum width=3cm, font=\footnotesize]
\definecolor{links}{HTML}{0000CC} \definecolor{links}{HTML}{0000CC}
\hypersetup{colorlinks,linkcolor=,urlcolor=links} \hypersetup{colorlinks,linkcolor=,urlcolor=links}
\mode<handout> \mode<handout>
{ {
\usepackage{pgfpages} \usepackage{pgfpages}
...@@ -24,24 +20,23 @@ ...@@ -24,24 +20,23 @@
\usetheme{CambridgeUS} \usetheme{CambridgeUS}
} }
\title{Dynare Time Series \& Reporting}
\author{Houtan Bastani}
\institute{CEPREMAP}
\date{13 June 2014}
\AtBeginSection[] \AtBeginSection[]
{ {
\begin{frame} \begin{frame}
\frametitle{Outline} \frametitle{Outline}
\tableofcontents[currentsection] \tableofcontents[currentsection, hideothersubsections]
\end{frame} \end{frame}
} }
\setbeamerfont{frametitle}{family=\rmfamily,series=\bfseries,size={\fontsize{10}{10}}} \setbeamerfont{frametitle}{family=\rmfamily,series=\bfseries,size={\fontsize{10}{10}}}
\setbeamertemplate{frametitle continuation}[from second] \setbeamertemplate{frametitle continuation}[from second]
\tikzstyle{abstract}=[rectangle, rounded corners, draw=black, anchor=north, fill=blue!10, text centered, minimum height={height("Gp")+2pt}, minimum width=3cm, font=\footnotesize] \title{Dynare Time Series \& Reporting}
\author[Houtan Bastani]{Houtan Bastani\newline\href{mailto:houtan@dynare.org}{houtan@dynare.org}}
\institute{CEPREMAP}
\date{11 June 2015}
\newcommand{\myitem}{\item[$\bullet$]}
\begin{document} \begin{document}
...@@ -54,11 +49,8 @@ ...@@ -54,11 +49,8 @@
\tableofcontents \tableofcontents
\end{frame} \end{frame}
% %
% DSERIES % DATES
% %
\section{Time Series} \section{Time Series}
...@@ -66,10 +58,96 @@ ...@@ -66,10 +58,96 @@
\begin{frame}[fragile,t] \begin{frame}[fragile,t]
\frametitle{Overview} \frametitle{Overview}
\begin{itemize} \begin{itemize}
\item Provide support for time series in Dynare \myitem Provide support for time series (\texttt{dseries})
\item Introduced in Dynare 4.4 \begin{itemize}
\item Currently only used for reporting. \myitem Based on an implementation for handling dates (\texttt{dates})
\item Use will increase with time (\textit{e.g.,} to be included in new estimation code) \end{itemize}
\myitem Beta version in Dynare 4.4. Mature version ready in Dynare 4.5
\myitem Currently only used for reporting, though use will increase with time
(\textit{e.g.,} to be included in new estimation code)
\myitem Compatible with all setups that are supported by Dynare
\begin{itemize}
\myitem Windows, Mac OS X, Linux
\myitem MATLAB 7.5 (R2007b) or later, Octave
\end{itemize}
\myitem Must run \texttt{dynare} or \texttt{dynare\_config} at least once in the current MATLAB/Octave session before use
\myitem More complete information is included in the Dynare manual
\end{itemize}
\end{frame}
\subsection{A Programming Note}
\begin{frame}[fragile,t]
\frametitle{A Programming Note (1/3)}
\begin{itemize}
\myitem Time series and dates (and reporting) are implemented as MATLAB/Octave classes
\myitem Inplace modification of instantiated objects not supported. Let me explain \dots
\begin{itemize}
\myitem A class is a template for defining objects, defining their member
variables and methods.
\begin{itemize}
\myitem \textit{e.g.,} The \texttt{dates} class defines 2 member
variables--\texttt{freq} and \texttt{time}--and many
methods (analogous to functions)
\end{itemize}
\myitem An object is an instance of a specific class. For exemplary
purposes, imagine an object \texttt{X}, which is an instantiation of the
class ``Integer''. The object has value \texttt{1}:
\begin{verbatim}
>> X
X =
1
\end{verbatim}
\myitem You can call any method defined for the integer class on integer
object \texttt{X}. Imagine such a method is called
\texttt{multiplyByTwo()}.
\myitem In most object-oriented
languages, writing \texttt{X.multiplyByTwo();} will change the value
contained in \texttt{X} to \texttt{2}
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}[fragile,t]
\frametitle{A Programming Note (2/3)}
\begin{itemize}
\item[] \begin{itemize}
\myitem But! For MATLAB/Octave's implementation of classes this is not the
case as it does not support inplace modification
\begin{verbatim}
>> X.multiplyByTwo()
ans =
2
>> X
X =
1
\end{verbatim}
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}[fragile,t]
\frametitle{A Programming Note (3/3)}
\begin{itemize}
\item[] \begin{itemize}
\myitem To get the desired change, you must overwrite \texttt{X}
\begin{verbatim}
>> X = X.multiplyByTwo()
X =
2
\end{verbatim}
\myitem Keep this in mind when using Dynare dates, time series, and reporting
\end{itemize}
\end{itemize} \end{itemize}
\end{frame} \end{frame}
...@@ -78,10 +156,10 @@ ...@@ -78,10 +156,10 @@
\begin{frame}[fragile,t] \begin{frame}[fragile,t]
\frametitle{Syntax} \frametitle{Syntax}
\begin{itemize} \begin{itemize}
\item Two components of a time series: \myitem Two components of a time series:
\begin{itemize} \begin{itemize}
\item A time component. In Dynare: \texttt{dates} \myitem A time component. In Dynare: \texttt{dates}
\item A data component mapped to time. In Dynare: \texttt{dseries} \myitem A data component mapped to time. In Dynare: \texttt{dseries}
\end{itemize} \end{itemize}
\end{itemize} \end{itemize}
\end{frame} \end{frame}
...@@ -90,84 +168,455 @@ ...@@ -90,84 +168,455 @@
\begin{frame}[fragile,t] \begin{frame}[fragile,t]
\frametitle{\texttt{dates} Syntax} \frametitle{\texttt{dates} Syntax}
\begin{itemize} \begin{itemize}
\item The \texttt{dates} command creates an object that represents at least one date at a given frequency \myitem The \texttt{dates} command creates an object that represents zero or more dates at a given frequency
\myitem A \texttt{dates} object contains 3 members (fields):
\begin{itemize}
\myitem{\textbf{\texttt{freq}}}: 1, `y' (Annual); 4, `q' (Quarterly); 12, `m' (Monthly); 52, `w' (Weekly)
\myitem{\textbf{\texttt{time}}}: A \texttt{<<No of dates>>$\times$2} matrix; the 1\textsuperscript{st} col is the year and the 2\textsuperscript{nd} col is the period
\end{itemize}
\myitem \texttt{dates} members cannot be modified. Thus, this is not allowed
\begin{alltt}
>> dd.freq = 12;
\end{alltt}
\end{itemize}
\end{frame}
\begin{frame}[fragile,t]
\frametitle{Creating a new \texttt{dates} object in MATLAB/Octave}
\begin{itemize} \begin{itemize}
\item Yearly: \texttt{`Y', `y', 1} \myitem{A single date}
\item Quarterly: \texttt{`Q', `q', 4} \begin{alltt}
\item Monthly: \texttt{`M', `m', 12} >> t = dates(`1999y');
\item Weekly: \texttt{`W', `w', 52} \end{alltt}
\myitem{Multiple dates}
\begin{alltt}
>> t = dates(`1999q1', `2020q2', `-190q3');
\end{alltt}
Notice that noncontiguous and negative dates are possible
\myitem Can also create \texttt{dates} programatically
\begin{alltt}
>> t = dates(4, [1990; 1990; 1978], [1; 2; 3])
t = <dates: 1990Q1, 1990Q2, 1978Q3>
\end{alltt}
\myitem Can specify an empty \texttt{dates}\dots
\begin{alltt}
>> qq = dates(`Q');
>> qq = dates(4);
\end{alltt}
\myitem \dots and use it to instantiate new \texttt{dates}
\begin{alltt}
>> t = qq(1990, 1);
t = <dates: 1990Q1>
\end{alltt}
\begin{alltt}
>> t = qq([1990; 1990; 1978], [1; 2; 3])
t = <dates: 1990Q1, 1990Q2, 1978Q3>
\end{alltt}
\end{itemize} \end{itemize}
\item It has two slightly different syntaxes \end{frame}
\begin{frame}[fragile,t]
\frametitle{Creating a new \texttt{dates} object in a \texttt{.mod} file}
\begin{itemize} \begin{itemize}
\item One for inclusion in \texttt{.m} files \myitem The preprocessor allows for syntax simplification when
\item One for inclusion in \texttt{.mod} files (simplified, taking advantage of the preprocessor) \texttt{dates} are in \texttt{.mod} files
\myitem{A single date} \texttt{t = 1999y;}
\begin{alltt}
\(\Rightarrow\) t = dates(`1999y');
\end{alltt}
\myitem{Multiple dates} \texttt{t = [1999q1 2020q2 1960q3];}
\begin{alltt}
\(\Rightarrow\) t = [dates(`1999q1') dates(`2020q2') dates(`1960q3')];
\end{alltt}
\myitem NB: This can cause problems when dates are included in strings. \textit{e.g.,}
\begin{alltt}
disp(`In 1999q1, ...')
\end{alltt}
would be transformed into
\begin{alltt}
disp(`In dates(`1999q1'), ...')
\end{alltt}
\myitem To fix this, simply prefix any date that you don't want transformed by the preprocessor with a `\texttt{\$}': \texttt{disp(`In \$1999q1, ...')}
\begin{alltt}
\(\Rightarrow\) disp(`In 1999q1, ...')
\end{alltt}
\end{itemize} \end{itemize}
\item Minimal restrictions on dates. Can be \end{frame}
\begin{frame}[fragile,t]
\frametitle{Collections and Ranges of \texttt{dates} in a \texttt{.mod} file}
\begin{itemize} \begin{itemize}
\item Negative \myitem A collection of \texttt{dates}
\item Empty \begin{alltt}
\item Noncontiguous a = 1990Q1; b = 1957Q1; c = -52Q1;
d = [a b c];
\(\Rightarrow\) d = <dates: 1990Q1, 1957Q1, -52Q1>
\end{alltt}
\myitem A Range of \texttt{dates}
\begin{alltt}
a = 1990Q3:1991Q2
\(\Rightarrow\) a = <dates: 1990Q3, 1990Q4, 1991Q1, 1991Q2>
\end{alltt}
\myitem A set of regularly-spaced \texttt{dates}
\begin{alltt}
a = 1990Q3:2:1991Q2
\(\Rightarrow\) a = <dates: 1990Q3, 1991Q1, 1991Q3>
\end{alltt}
\end{itemize} \end{itemize}
\end{frame}
\begin{frame}[fragile,t]
\frametitle{Comparing \texttt{dates}}
\begin{itemize}
\myitem The following comparison operators are supported: $==$, $\backsim=$, $<$, $\leq$, $>$, and $\geq$
\myitem Compared objects must have the same frequency
\myitem Compared objects must have the same number of elements (except for singletons)
\myitem Returns the result of an element-wise comparison
\myitem Let \texttt{a=[1999W1 2020W3]}, \texttt{b=1999W1}, and \texttt{c=[1888w1 2020w3]}. Then
\begin{alltt}
>> a == b >> a > b >> c < a
ans = ans = ans =
1 0 1
0 1 0
\end{alltt}
\end{itemize} \end{itemize}
\end{frame} \end{frame}
\begin{frame}[fragile,t] \begin{frame}[fragile,t]
\frametitle{Creating a new \texttt{dates} object} \frametitle{Arithmetic Operations on \texttt{dates}}
\begin{itemize} \begin{itemize}
\item A single date: \myitem The unary \texttt{+} and \texttt{-} operators
\begin{alltt}
>> a = dates(`1999q4');
>> +a \(\Rightarrow\) ans = 2000q1
>> -a \(\Rightarrow\) ans = 1999q3
>> ++-+a \(\Rightarrow\) ans = 2000q2
\end{alltt}
\myitem The binary \texttt{+} and \texttt{-} operators
\begin{itemize} \begin{itemize}
\item In a \texttt{.m} file: \texttt{t = dates(`1999y');} \myitem Objects must have the same frequency
\item In a \texttt{.mod} file: \texttt{t = 1999y;} \myitem Objects must have the same number of elements (except for singletons)
\myitem \texttt{1999q4 + 2} $\Rightarrow$ \texttt{ans = 2000q2}
\myitem \texttt{1999w4 + 2} $\Rightarrow$ \texttt{ans = 1999w6}
\myitem \texttt{1999m4 - 2} $\Rightarrow$ \texttt{ans = 1999m2}
\myitem \texttt{1999m4 - 1999m2} $\Rightarrow$ \texttt{ans = 2}
\myitem \texttt{1999m4 + 1999m2} $\Rightarrow$ \texttt{ans = <dates: 1999M4, 1999M2>}
\end{itemize} \end{itemize}
\item A date range: \myitem The binary \texttt{*} operator
\begin{alltt}
>> a*3
ans = <dates: 1999Q4, 1999Q4, 1999Q4>
\end{alltt}
\end{itemize}
\end{frame}
\begin{frame}[fragile,t]
\frametitle{Set Operations on \texttt{dates}}
\begin{itemize} \begin{itemize}
\item In a \texttt{.m} file: \texttt{t = dates(`1999y'):dates(`2020y');} \myitem Let \texttt{a = [1990Q1:1991Q1 1990Q1]; b = [1990Q3:1991Q3];}
\item In a \texttt{.mod} file: \texttt{t = 1999y:2020y;} \myitem \texttt{intersect}: returns the intersection of the arguments
\begin{alltt}
>> intersect(a, b)
ans = <dates: 1990Q3, 1990Q4, 1991Q1>
\end{alltt}
\myitem \texttt{setdiff}: returns dates present in first arg but not in second
\begin{alltt}
>> setdiff(a, b)
ans = <dates: 1990Q1, 1990Q2>
\end{alltt}
\myitem \texttt{union}: returns the union of two sets (repititions removed)
\begin{alltt}
union(a, b)
ans = <dates: 1990Q1, 1990Q2, ..., 1991Q2, 1991Q3>
\end{alltt}
\myitem \texttt{unique()}: removes repititions from set (keeps last unique value)
\begin{alltt}
>> a.unique()
ans = <dates: 1990Q2, 1990Q3, 1990Q4, 1991Q1, 1990Q1>
\end{alltt}
\end{itemize} \end{itemize}
\end{frame}
\begin{frame}[fragile,t]
\frametitle{Misc \texttt{dates} operations}
\begin{itemize}
\myitem Can index a \texttt{dates} object
\begin{alltt}
>> a = dates(`2000y'):dates(`2009y');
>> a(1)
ans = <dates: 2000Y>
>> a(1:3)
ans = <dates: 2000Y, 2001Y, 2002Y>
>> a([1,4,5])
ans = <dates: 2000Y, 2003Y, 2004Y>
\end{alltt}
\myitem{\textbf{\texttt{pop()}}}: Remove last element
\begin{alltt}
>> a.pop()
ans = <dates: 2000Y, 2001Y, ..., 2007Y, 2008Y>
\end{alltt}
\myitem{\textbf{\texttt{char()}}}: Return string representation
\begin{alltt}
>> a(1).char()
ans = 2000Y
\end{alltt}
\myitem More in the Dynare manual
\end{itemize} \end{itemize}
\end{frame} \end{frame}
%
% DSERIES
%
\subsubsection{\texttt{dseries} Syntax}
\begin{frame}[fragile,t] \begin{frame}[fragile,t]
\frametitle{Modifying \texttt{dates}} \frametitle{\texttt{dseries} Syntax}
\begin{itemize} \begin{itemize}
\item \texttt{append}: appends a date to the date \myitem A \texttt{dseries} is composed of zero or more individual time series
\myitem All time series in a \texttt{dseries} must have the same frequency
\myitem A \texttt{dseries} runs from the earliest date to the latest date,
with \texttt{NaN}'s inserted to pad the shorter series
\myitem A \texttt{dseries} object contains 4 members:
\begin{itemize} \begin{itemize}
\item \texttt{t.append(dates(`2021y'));} \myitem{\textbf{\texttt{data}}}: The data points
\myitem{\textbf{\texttt{dates}}}: The \texttt{dates} of the sample
\myitem{\textbf{\texttt{name}}}: Names of the variables
\myitem{\textbf{\texttt{tex}}}: \LaTeX\ names of the variables
\end{itemize} \end{itemize}
\item \texttt{pop}: \myitem \texttt{dseries} members cannot be modified
\item \texttt{sort}:
\end{itemize} \end{itemize}
\end{frame} \end{frame}
\begin{frame}[fragile,t] \begin{frame}[fragile,t]
\frametitle{Getting info about \texttt{dates}} \frametitle{Creating a new \texttt{dseries} object (1/2)}
Load data directly
\begin{itemize} \begin{itemize}
\item \texttt{double}: returns a floating point representation of the date \myitem Syntax:
\begin{alltt}
ts = dseries(DATA, INITIAL_PERIOD, NAMES, TEX_NAMES)
\end{alltt}
\myitem \textit{e.g.,} 2 variables, `MyVar1' and `MyVar2', with
3 annual observations starting in 1999:
\small{
\begin{alltt}
>> ts = dseries([1 2;3 4;5 6], `1999y', ...
\{`MyVar1', `MyVar2'\}, \{`MyVar\_1', 'MyVar\_2'\});
ts is a dseries object:
| MyVar1 | MyVar2
1999Y | 1 | 2
2000Y | 3 | 4
2001Y | 5 | 6
\end{alltt}}
\end{itemize}
\end{frame}
\begin{frame}[fragile,t]
\frametitle{Creating a new \texttt{dseries} object (2/2)}
Load series from CSV/spreadsheet (\texttt{.csv, .xls}) or MATLAB file (\texttt{.m, .mat})
\begin{itemize} \begin{itemize}
\item \texttt{t.double;} \myitem Syntax:
\begin{alltt}
>> ts = dseries(FILENAME);
\end{alltt}
\myitem File format (\texttt{.csv, .xls}): dates (optional) in first column (using the
standard format: 1990Q1 for quarterly data, 1990Y for annual data, \dots) and variable
names (optional) in the first row
\myitem File format (\texttt{.m, .mat}): variables \texttt{INIT\_\_},
\texttt{NAMES\_\_}, and \texttt{TEX\_\_} are optional. More info in the
manual. Data are vectors.
\begin{alltt}
INIT__ = `1999q1';
NAMES__ = \{`cons'\};
cons = randn(100,1);
\end{alltt}
\end{itemize} \end{itemize}
\item \texttt{freq}: returns the frequency Create an empty time series. Useful for renaming dseries.
\begin{itemize} \begin{itemize}
\item \texttt{t.freq;} \myitem \texttt{tseries = dseries();}
\myitem \texttt{ts = tseries(randn(3,2));}
\end{itemize} \end{itemize}
\end{frame}
\begin{frame}[fragile,t]
\frametitle{Creating subsamples from a \texttt{dseries}}
\begin{itemize}
\myitem Let \texttt{ts} be a \texttt{dseries} with $3$ variables and 5
observations from \texttt{2000Y} to \texttt{2004Y}
\begin{alltt}
ts=dseries(randn(5,3), `2000y')
\end{alltt}
\myitem To obtain a subsample from \texttt{2001Y} to \texttt{2003Y}
\begin{alltt}
ts(2001Y:2003Y)
\end{alltt}
\myitem Can also use integer indices (in a roundabout way)
\begin{alltt}
start = find(ts.dates==2001Y);
ts(ts.dates(start:end));
\end{alltt}
\end{itemize} \end{itemize}
\end{frame} \end{frame}
\begin{frame}[fragile,t] \begin{frame}[fragile,t]
\frametitle{Comparing \texttt{dates}} \frametitle{Extracting variables from a \texttt{dseries}}
\begin{itemize} \begin{itemize}
\item \myitem Let
\begin{alltt}
>> ts = dseries(randn(5,6), `2000q1', ...
\{`GDP_US', `GDP_FR', `GDP_JA', ...
`CPI_US', `CPI_FR', `CPI_JA'\});
\end{alltt}
\myitem We can extract one variable using syntax like
\begin{alltt}
>> ts.GDP_US
\end{alltt}
\myitem To get all the \texttt{GDP} variables
\begin{alltt}
>> ts\{`GDP_US', `GDP_FR', `GDP_JA'\}
\end{alltt}
\myitem A shorter way to do the same thing
\begin{alltt}
>> ts\{`GDP_@US,FR,JA@'\}
\end{alltt}
\myitem To get \texttt{GDP} \& \texttt{CPI} (NB: max 2 implicit loops)
\begin{alltt}
>> ts\{`@GDP,CPI@_@US,FR,JA@'\}
\end{alltt}
\end{itemize} \end{itemize}
\end{frame} \end{frame}
\subsubsection{\texttt{dseries} Syntax}
\begin{frame}[fragile,t]
\frametitle{Applying methods to \texttt{dseries}}
\begin{itemize}
\myitem Suppose \texttt{ts} is as above. Then, to apply a method
(\textit{e.g.,} \texttt{log()}) to \texttt{GDP}:
\begin{alltt}
ts\{`GDP_@US,FR,JA@'\}=ts\{`GDP_@US,FR,JA@'\}.log()
\end{alltt}
\myitem To apply a method to a subsample of all the variables:
\begin{alltt}
ts(2000Q2:2000Q4) = ts(2000Q2:2000Q4).log()
\end{alltt}
\myitem To apply a method to a subsample of some of the variables:
\begin{alltt}
ts(2000Q2:2000Q4)\{`GDP_@US,FR,JA@'\} = ...
ts(2000Q2:2000Q4)\{`GDP_@US,FR,JA@'\}.log()
\end{alltt}
\end{itemize}
\end{frame}
\begin{frame}[fragile,t]
\frametitle{Merging \texttt{dseries}}
\begin{itemize}
\myitem Suppose that \verb+ts+ and \verb+ds+ are two \texttt{dseries} objects
with the same variables observed on different time ranges. These
\texttt{dseries} objects can be merged using the following syntax:
\begin{verbatim}
vs = [ts; ds];
\end{verbatim}
\myitem Suppose that \verb+ts+ and \verb+ds+ are two \texttt{dseries} objects
with different variables observed on the same or different time ranges. These
\texttt{dseries} objects can be merged using the following syntax:
\begin{verbatim}
vs = [ts, ds];
\end{verbatim}
If \verb+ts+ and \verb+ds+ are not defined over the same time range,
the time range of \verb+vs+ will be the union of \verb+ts.dates+ and
\verb+ds.dates+, \verb+NaN+s will be added for the missing observations.
\end{itemize}
\end{frame}
\begin{frame}[fragile,t]
\frametitle{Arithmetic Operations on \texttt{dseries}}
\begin{itemize}
\myitem The binary operators \texttt{+}, \texttt{-}, \texttt{*},
\texttt{/}, and \texttt{\string^} perform element-wise arithmetic operations on
\texttt{dseries}
\myitem They can be used with two \texttt{dseries} or one \texttt{dseries}
and a real number
\myitem Two \texttt{dseries} can have different date ranges. Non overlapping dates will be filled with \texttt{NaNs}
\myitem Take addition for example
\begin{itemize}
\myitem Let
\begin{alltt}
>> ts0 = dseries(ones(2,2)*2, `2000W1', \{`MyVar1', `MyVar2'\});
>> ts1 = dseries(ones(3,2)*3, `2000W2', \{`YrVar1', `YrVar2'\});
>> ds = ts0.MyVar1;
\end{alltt}
\myitem \texttt{ts0+3} will add \texttt{3} to every element in \texttt{ts0}
\myitem \texttt{ts0+[3 4]} will add \texttt{3} to every element in \texttt{ts0.MyVar1} and \texttt{4} to every element in \texttt{ts0.MyVar2}
\myitem \texttt{ts0+ts1} will add \texttt{ts0.MyVar1} to \texttt{ts1.YrVar1} and \texttt{ts0.MyVar2} to \texttt{ts1.YrVar2}. Only \texttt{2000W2} will contain the value \texttt{5} for both variables. All other points will contain \texttt{NaN}
\myitem \texttt{ts0+ds} will add \texttt{ds} to \texttt{ts0.MyVar1} and \texttt{ts0.MyVar2}. All values will contain \texttt{4}
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}[fragile,t]
\frametitle{Leads and Lags with \texttt{dseries} (1/2)}
\begin{itemize}
\myitem Let
\begin{alltt}
>> ts = dseries([1:4]');
\end{alltt}
\myitem Then
\begin{alltt}
>> ts.lead() >> ts.lag()
ans is a dseries object: ans is a dseries object:
| lead(Variable_1,1) | lag(Variable_1,1)
1Y | 2 1Y | NaN
2Y | 3 2Y | 1
3Y | 4 3Y | 2
4Y | NaN 4Y | 3
\end{alltt}
\end{itemize}
\end{frame}
\begin{frame}[fragile,t]
\frametitle{Leads and Lags with \texttt{dseries} (2/2)}
\begin{itemize}
\myitem You can lead/lag a \texttt{dseries} by more than one period
\begin{itemize}
\myitem \texttt{ts.lead(k)} where $k\in\mathbb{Z}$
\myitem \texttt{ts.lag(k)} where $k\in\mathbb{Z}$
\end{itemize}
\myitem A shorthand syntax is available as well
\begin{itemize}
\myitem Lead: \texttt{ts(k)} where $k\in\mathbb{Z}$
\myitem Lag: \texttt{ts(-k)} where $k\in\mathbb{Z}$
\end{itemize}
\end{itemize}
\end{frame}
\subsection{Examples}
% %
...@@ -175,34 +624,76 @@ ...@@ -175,34 +624,76 @@
% %
\section{Reporting} \section{Reporting}
\subsection{Overview} \subsection{Overview}
\begin{frame} \begin{frame}[fragile,t]
\frametitle{Overview} \frametitle{Overview}
\begin{itemize} \begin{itemize}
\item Introduced in Dynare 4.4 \myitem Beta version in Dynare 4.4. Mature version ready in Dynare 4.5
\item Introduce reporting functionality to Dynare \myitem Introduce reporting functionality to Dynare
\begin{itemize}
\myitem Input: \texttt{dseries}
\myitem Output: \LaTeX\ report \& compiled \texttt{.pdf}
\end{itemize}
\myitem Graphs and Tables are modular
\begin{itemize}
\item[$\Rightarrow$] Can easily be included in another document
\end{itemize}
\myitem Graphs are produced in Ti$k$Z/PGFPlots (standard in a \TeX\ distribution)
\begin{itemize} \begin{itemize}
\item Input: \texttt{dseries} \myitem Scales well
\item Output: \LaTeX\ report \& compiled \texttt{.pdf} \myitem Formating follows that of enclosing document
\end{itemize} \end{itemize}
\item Graphs and Tables are modular \myitem Dynare provides a subset of the many Ti$k$Z options
\begin{itemize} \begin{itemize}
\item Can easily be included in another document \myitem You can easily modify the Ti$k$Z graph if the option you want is not in Dynare
\end{itemize} \end{itemize}
\item Graphs are produced in Ti$k$Z \myitem Works with MATLAB \& Octave
\myitem Works much faster than similar softawre
\myitem NB: Must install a \LaTeX\ distribution to compile reports
\begin{itemize} \begin{itemize}
\item Scales well \myitem On Windows use MiKTeX: \url{http://miktex.org}
\item Formating follows that of enclosing document \myitem On Mac OS X use MacTeX: \url{http://tug.org/mactex}
\myitem On Linux use \TeX\ Live: available from your package manager
\end{itemize} \end{itemize}
\item Works with Matlab \& Octave
\item Works approximately 5 times faster than Iris reporting
\end{itemize} \end{itemize}
\end{frame} \end{frame}
\begin{frame}
\begin{frame}[fragile,t]
\frametitle{How Reporting Works}
\begin{itemize}
\myitem Reports are created command by command
\begin{itemize}
\myitem Hence the order of commands matters
\end{itemize}
\myitem All reporting commands act on the previously added object until an object of greater or equal hierarchy is added (see next slide)
\begin{itemize}
\myitem \textit{e.g.,} Once you add a \texttt{Page} to your report with the \texttt{addPage()} command, every \texttt{Section} you add via the \texttt{addSection()} command will be placed on this page. Only when you add another \texttt{Page} will items go on a new page.
\myitem This will become more clear with an example
\end{itemize}
\myitem Options to reporting commands are passed in option name/value pairs
\begin{itemize}
\myitem \textit{e.g.,} \texttt{addPage(`title', \{`Page Title', `Page Subtitle'\})}
\end{itemize}
\end{itemize}
\end{frame}
\tikzstyle{abstract}=[rectangle, draw=black, rounded corners, fill=blue!10, drop shadow,
text centered, anchor=north, text=black, text width=2.6cm]
\tikzstyle{comment}=[rectangle, draw=black, rounded corners, fill=green!10, drop shadow,
text centered, anchor=north, text=black, text width=2.6cm]
\tikzstyle{line}=[-, thick]
\begin{frame}[fragile,t]
\frametitle{Reporting Class Hierarchy} \frametitle{Reporting Class Hierarchy}
\centering { \begin{itemize}
\myitem Class names on the top half of the box, constructor names on the bottom
\myitem Arrows represent what the new object can be added to; objects in green are treated a bit differently (explained below)
\end{itemize}
\begin{center}
\footnotesize{
\begin{tikzpicture}[ \begin{tikzpicture}[
node distance = .45cm, node distance = .25cm,
auto, auto,
line/.style={->, >=stealth'}, line/.style={->, >=stealth'},
] ]
...@@ -221,22 +712,30 @@ ...@@ -221,22 +712,30 @@
\textbf{Section} \textbf{Section}
\nodepart{second}\texttt{addSection(...);} \nodepart{second}\texttt{addSection(...);}
}; };
\node (Vspace) [abstract, rectangle split, rectangle split parts=2, below=of Section] \node (Spacer) [rectangle split, rectangle split parts=2, opacity=0, below=of Section]
{ {
\textbf{Vspace}
\nodepart{second}\texttt{addVspace(...);}
}; };
\node (Graph) [abstract, rectangle split, rectangle split parts=2, left=of Vspace] \node (Graph) [abstract, rectangle split, rectangle split parts=2, left=of Spacer, xshift=.25cm]
{ {
\textbf{Graph} \textbf{Graph}
\nodepart{second}\texttt{addGraph(...);} \nodepart{second}\texttt{addGraph(...);}
}; };
\node (Table) [abstract, rectangle split, rectangle split parts=2, right=of Vspace, text height=] \node (Table) [abstract, rectangle split, rectangle split parts=2, right=of Spacer, xshift=-.25cm, text height=]
{ {
\textbf{Table} \textbf{Table}
\nodepart{second}\texttt{addTable(...);} \nodepart{second}\texttt{addTable(...);}
}; };
\node (Series) [abstract, rectangle split, rectangle split parts=2, below=of Vspace] \node (Vspace) [comment, rectangle split, rectangle split parts=2, left=of Graph]
{
\textbf{Vspace}
\nodepart{second}\texttt{addVspace(...);}
};
\node (Paragraph) [comment, rectangle split, rectangle split parts=2, right=of Table]
{
\textbf{Paragraph}
\nodepart{second}\texttt{addParagraph(...);}
};
\node (Series) [abstract, rectangle split, rectangle split parts=2, below=of Spacer]
{ {
\textbf{Series} \textbf{Series}
\nodepart{second}\texttt{addSeries(...);} \nodepart{second}\texttt{addSeries(...);}
...@@ -245,16 +744,201 @@ ...@@ -245,16 +744,201 @@
\draw [line] (Series) to node { } (Graph); \draw [line] (Series) to node { } (Graph);
\draw [line] (Table) to node { } (Section); \draw [line] (Table) to node { } (Section);
\draw [line] (Graph) to node { } (Section); \draw [line] (Graph) to node { } (Section);
\draw [line] (Vspace) to node { } (Section); \draw [line] (Paragraph.north) to node { } (Section.east);
\draw [line] (Vspace.north) to node { } (Section.west);
\draw [line] (Section) to node { } (Page); \draw [line] (Section) to node { } (Page);
\draw [line] (Page) to node { } (Report); \draw [line] (Page) to node { } (Report);
\end{tikzpicture} \end{tikzpicture}}
} \end{center}
\end{frame} \end{frame}
\subsection{Syntax} \subsection{Syntax}
\begin{frame}[fragile,t]
\frametitle{Reporting Syntax (1/3)}
\begin{itemize}
\myitem \texttt{report(\ldots)}: Create a report
\begin{itemize}
\myitem \textbf{Options}: \texttt{compiler}, \texttt{showDate}, \texttt{fileName}, \texttt{margin}, \texttt{marginUnit}, \ldots
\begin{alltt}
>> rep = report(`title', `Dynare Summer School 2014', ...
`fileName', `myDynareReport.tex');
\end{alltt}
\end{itemize}
\myitem \texttt{addPage(\ldots)}: Add a page to the \texttt{Report}
\begin{itemize}
\myitem \textbf{Options}: \texttt{footnote}, \texttt{orientation}, \texttt{paper}, \texttt{title}, \texttt{titleFormat}
\begin{alltt}
>> rep = rep.addPage(`title', \{`Page Title', `Page Subtitle'\}, ...
`titleFormat', \{`\textbackslash{}large\textbackslash{}bfseries', `\textbackslash{}large'\});
\end{alltt}
\end{itemize}
\myitem \texttt{addSection(\ldots)}: Add a section to the current \texttt{Page}
\begin{itemize}
\myitem You can think of a section as a matrix. As graphs and/or tables are added to a section, it fills up from left to right. Once you have added \texttt{cols} objects, a new row is started.
\myitem \textbf{Options}: \texttt{cols}, \texttt{height}
\begin{alltt}
>> rep = rep.addSection(`cols', 3);
\end{alltt}
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}[fragile,t]
\frametitle{Reporting Syntax (2/3)}
\begin{itemize}
\myitem \texttt{addVspace(\ldots)}: Add a vertical space to the current \texttt{Section}.
\begin{itemize}
\myitem If the row has been completely filled in, this adds space between this row and the next row. If not, this adds space at the end of the \texttt{Section} and closes it; in other words, in this situation if you want to add more graphs, you'd have to create a new \texttt{Section} first.
\myitem \textbf{Options}: \texttt{hline}, \texttt{number}
\begin{alltt}
>> rep = rep.addVspace(`hline', 2, `number', 3);
\end{alltt}
\end{itemize}
\myitem \texttt{addParagraph(\ldots)}: Add text to the current \texttt{Section}
\begin{itemize}
\myitem To add anything other than a paragraph (or multiple paragraphs) to a \texttt{Section}, you must add a new \texttt{Section} to the page
\myitem \textbf{Options}: \texttt{balancedCols}, \texttt{cols}, \texttt{heading}, \texttt{index}, \texttt{text}
\begin{alltt}
>> rep = rep.addParagraph(`text', `Lorem ipsum\textbackslash{}ldots\textbackslash{}newline');
\end{alltt}
\end{itemize}
\end{itemize}
\end{frame}
\subsection{Examples}
\begin{frame}[fragile,t]
\frametitle{Reporting Syntax (3/3)}
\begin{itemize}
\myitem \texttt{addGraph(\ldots)}: Add a graph to the current \texttt{Section}
\begin{itemize}
\myitem \textbf{Options}: \texttt{data}, \texttt{graphDirName}, \texttt{graphName}, \texttt{graphSize}, \texttt{height}, \ldots
\begin{alltt}
>> rep = rep.addGraph(`title', `Headline Inflation (y/y)', ...
`xrange', dates(`2007q1'):dates(`2013q4'), ...
`shade', dates(`2010q1'):dates(`2013q4'), ...
`showZeroline', true);
\end{alltt}
\end{itemize}
\myitem \texttt{addTable(\ldots)}: Add a table to the current \texttt{Section}
\begin{itemize}
\myitem \textbf{Options}: \texttt{data}, \texttt{showHlines}, \texttt{precision}, \texttt{range}, \texttt{seriesToUse}, \ldots
\begin{alltt}
>> rep = rep.addTable(`title', \{`Real GDP Growth',`subtitle 1'\}, ...
`range', dates(`2007y'):dates(`2014y'), ...
`vlineAfter', dates(`2011y'));
\end{alltt}
\end{itemize}
\myitem \texttt{addSeries(\ldots)}: Add a series to the current \texttt{Graph} or \texttt{Table}
\begin{itemize}
\myitem \textbf{Options}: \texttt{data}, \texttt{graphHline}, \texttt{graphLegendName}, \texttt{graphLineColor}, \ldots
\begin{alltt}
>> rep = rep.addSeries(`data', db\_q.LRPOIL\_WORLD, ...
`graphLineColor', `blue', ...
`graphLineWidth', 1.5, ...
`graphMarker', `triangle*');
\end{alltt}
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}[fragile,t]
\frametitle{Output}
To create a report:
\begin{itemize}
\myitem \texttt{write()}: Writes the report to a \LaTeX\ file
\myitem \texttt{compile(\ldots)}: Compiles the report, creating a \texttt{.pdf} file
\begin{itemize}
\myitem \textbf{Options}: \texttt{compiler}
\end{itemize}
\end{itemize}
Report Output
\begin{itemize}
\myitem Unless you pass the \texttt{fileName} option to \texttt{report(\ldots)}, the report will be located in your working directory with the name \texttt{report.tex}. The compiled version will be called \texttt{report.pdf}.
\myitem Unless you pass the \texttt{graphDirName} or \texttt{graphName} options to \texttt{addGraph(\ldots)}, your graphs will be in a subdirectory of your working directory called \texttt{tmpRepDir}. The default name will take the form \texttt{graph\_pg9\_sec1\_row1\_col5.tex}
\myitem The same holds for the tables (substituting `table' for `graph' above).
\myitem Thus you can easily modify these files and include them in another report.
\end{itemize}
\end{frame}
\section{Putting it All Together}
\begin{frame}[fragile=singleslide,t]
\frametitle{Create Report of IRFs from \texttt{example1.mod} (1/3)}
\begin{itemize}
\myitem \texttt{example1.mod} is located in the Dynare \texttt{examples} directory
\myitem The lines below can be added at the end of that file.
\end{itemize}
\begin{block}{Create \texttt{dseries} from IRFs}
\begin{verbatim}
shocke = dseries();
shocku = dseries();
@#define endovars=["y", "c", "k", "a", "h", "b"]
@#for var in endovars
shocke = [shocke dseries(@{var}_e, 2014q3, `@{var}')];
shocku = [shocku dseries(@{var}_u, 2014q3, `@{var}')];
@#endfor
\end{verbatim}
\end{block}
\end{frame}
\begin{frame}[fragile=singleslide,t]
\frametitle{Create Report of IRFs from \texttt{example1.mod} (2/3)}
\begin{block}{Populate Report}
\small{
\begin{verbatim}
r = report();
@#for shock in ["e", "u"]
r = r.addPage(`title',{`Dseries/Report Example',`Shock @{shock}'},...
`titleFormat', {`\Large\bfseries', `\large\bfseries'});
r = r.addSection(`cols', 2);
@# for var in endovars
r = r.addGraph(`data', shock@{shock}.@{var}, `title', `@{var}', ...
`showGrid', false, `yTickLabelPrecision', 2, ...
`yTickLabelZeroFill', false, ...
`showZeroLine', true, `zeroLineColor', 'red');
@# endfor
r = r.addVspace(`number', 2);
r = r.addSection(`cols', 1);
r = r.addTable(`range', 2022q1:2024q1, `precision', 5);
@# for var in endovars
r = r.addSeries(`data', shock@{shock}.@{var});
@# endfor
@#endfor
\end{verbatim}
}
\end{block}
\end{frame}
\begin{frame}[fragile=singleslide,t]
\frametitle{Create Report of IRFs from \texttt{example1.mod} (3/3)}
\begin{block}{Compile Report}
\small{
\begin{verbatim}
r.write();
r.compile();
\end{verbatim}
}
\end{block}
\begin{block}{Output Files}
\small{
\begin{verbatim}
>> ls report.*
report.aux report.log report.pdf report.synctex.gz report.tex
>> ls tmpRepDir/
graph_pg1_sec1_row1_col1.tex graph_pg2_sec1_row1_col1.tex
graph_pg1_sec1_row1_col2.tex graph_pg2_sec1_row1_col2.tex
graph_pg1_sec1_row2_col1.tex graph_pg2_sec1_row2_col1.tex
graph_pg1_sec1_row2_col2.tex graph_pg2_sec1_row2_col2.tex
graph_pg1_sec1_row3_col1.tex graph_pg2_sec1_row3_col1.tex
graph_pg1_sec1_row3_col2.tex graph_pg2_sec1_row3_col2.tex
table_pg1_sec2_row1_col1.tex table_pg2_sec2_row1_col1.tex
\end{verbatim}
}
\end{block}
\end{frame}
\end{document} \end{document}
Source diff could not be displayed: it is too large. Options to address this: view the blob.
if HAVE_PDFLATEX
if HAVE_BIBTEX
pdf-local: gsa.pdf
endif
endif
SRC = gsa.tex marco.bib
EXTRA_DIST = $(SRC)
gsa.pdf: $(SRC)
$(PDFLATEX) gsa
$(BIBTEX) gsa
$(PDFLATEX) gsa
$(PDFLATEX) gsa
clean-local:
rm -f *.pdf *.log *.aux *.toc *.lof *.blg *.bbl *.out *~
...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
\documentclass[12pt,a4paper]{article} \documentclass[12pt,a4paper]{article}
\usepackage{amssymb,amsmath} \usepackage{amssymb,amsmath}
\usepackage[dvips]{graphicx} \usepackage[dvips]{graphicx}
\usepackage{natbib}
\usepackage{psfrag} \usepackage{psfrag}
\usepackage{setspace} \usepackage{setspace}
\usepackage{rotating} \usepackage{rotating}
\usepackage{hyperref} \usepackage{hyperref}
\hypersetup{breaklinks=true,pagecolor=white,colorlinks=true,linkcolor=blue,citecolor=blue,urlcolor=blue} \hypersetup{breaklinks=true,colorlinks=true,linkcolor=blue,citecolor=blue,urlcolor=blue}
%\singlespacing (interlinea singola) %\singlespacing (interlinea singola)
%\onehalfspacing (interlinea 1,5) %\onehalfspacing (interlinea 1,5)
%\doublespacing (interlinea doppia) %\doublespacing (interlinea doppia)
\usepackage{doi,natbib}
%\bibpunct{(}{)}{;}{a}{,}{,} %\bibpunct{(}{)}{;}{a}{,}{,}
...@@ -22,19 +22,19 @@ ...@@ -22,19 +22,19 @@
\begin{document} \begin{document}
% ---------------------------------------------------------------- % ----------------------------------------------------------------
\title{Sensitivity Analysis Toolbox for DYNARE\thanks{Copyright \copyright~2012 Dynare \title{Sensitivity Analysis Toolbox for Dynare\thanks{Copyright \copyright~2012-2024 Dynare
Team. Permission is granted to copy, distribute and/or modify Team. Permission is granted to copy, distribute and/or modify
this document under the terms of the GNU Free Documentation this document under the terms of the GNU Free Documentation
License, Version 1.3 or any later version published by the Free License, Version 1.3 or any later version published by the Free
Software Foundation; with no Invariant Sections, no Front-Cover Software Foundation; with no Invariant Sections, no Front-Cover
Texts, and no Back-Cover Texts. A copy of the license can be found Texts, and no Back-Cover Texts. A copy of the license can be found
at: \url{http://www.gnu.org/licenses/fdl.txt}}} at: \url{https://www.gnu.org/licenses/fdl.txt}}}
\author{Marco Ratto\\ \author{Marco Ratto\\
European Commission, Joint Research Centre \\ European Commission, Joint Research Centre \\
TP361, IPSC, \\21027 Ispra TP581\\21027 Ispra
(VA) Italy\\ (VA) Italy\\
\texttt{marco.ratto@jrc.ec.europa.eu} \texttt{Marco.Ratto@ec.europa.eu}
\thanks{The author gratefully thanks Christophe Planas, Kenneth Judd, Michel Juillard, \thanks{The author gratefully thanks Christophe Planas, Kenneth Judd, Michel Juillard,
Alessandro Rossi, Frank Schorfheide and the participants to the Alessandro Rossi, Frank Schorfheide and the participants to the
Courses on Global Sensitivity Analysis for Macroeconomic Courses on Global Sensitivity Analysis for Macroeconomic
...@@ -52,10 +52,10 @@ helpful suggestions.}} ...@@ -52,10 +52,10 @@ helpful suggestions.}}
%----------------------------------------------------------------------- %-----------------------------------------------------------------------
\begin{abstract} \begin{abstract}
\noindent The Sensitivity Analysis Toolbox for DYNARE is a set of \noindent The Sensitivity Analysis Toolbox for Dynare is a set of
MATLAB routines for the analysis of DSGE models with global MATLAB routines for the analysis of DSGE models with global
sensitivity analysis. The routines are thought to be used within sensitivity analysis. The routines are thought to be used within
the DYNARE v4 environment. the Dynare 6 environment.
\begin{description} \begin{description}
...@@ -66,7 +66,7 @@ the DYNARE v4 environment. ...@@ -66,7 +66,7 @@ the DYNARE v4 environment.
\newpage \newpage
% ---------------------------------------------------------------- % ----------------------------------------------------------------
\section{Introduction} \label{s:intro} \section{Introduction} \label{s:intro}
The Sensitivity Analysis Toolbox for DYNARE is a collection of The Sensitivity Analysis Toolbox for Dynare is a collection of
MATLAB routines implemented to answer the following questions: (i) MATLAB routines implemented to answer the following questions: (i)
Which is the domain of structural coefficients assuring the Which is the domain of structural coefficients assuring the
stability and determinacy of a DSGE model? (ii) Which parameters stability and determinacy of a DSGE model? (ii) Which parameters
...@@ -81,20 +81,18 @@ described in \cite{Ratto_CompEcon_2008}. ...@@ -81,20 +81,18 @@ described in \cite{Ratto_CompEcon_2008}.
\section{Use of the Toolbox} \section{Use of the Toolbox}
The DYNARE parser now recognizes sensitivity analysis commands. The Dynare parser now recognizes sensitivity analysis commands.
The syntax is based on a single command: The syntax is based on a single command:
\vspace{0.5cm} \vspace{0.5cm}
\verb"dynare_sensitivity(option1=<opt1_val>,option2=<opt2_val>,...)" \verb"sensitivity(option1=<opt1_val>,option2=<opt2_val>,...)"
\vspace{0.5cm} \noindent with a list of options described in the \vspace{0.5cm} \noindent with a list of options described in the
next section. next section.
With respect to the previous version of the toolbox, in order to In order to work properly, the sensitivity analysis Toolbox does not need
work properly, the sensitivity analysis Toolbox \emph{no longer} a Dynare estimation environment to be set up. Rather, \verb"sensitivity"
needs that the DYNARE estimation environment is set-up. is the only command to run to
Therefore, \verb"dynare_sensitivity" is the only command to run to
make a sensitivity analysis on a DSGE model\footnote{Of course, make a sensitivity analysis on a DSGE model\footnote{Of course,
when the user needs to perform the mapping of the fit with a when the user needs to perform the mapping of the fit with a
posterior sample, a Bayesian estimation has to be performed posterior sample, a Bayesian estimation has to be performed
...@@ -208,16 +206,17 @@ a multivariate normal MC sample, with covariance matrix based on ...@@ -208,16 +206,17 @@ a multivariate normal MC sample, with covariance matrix based on
the inverse Hessian at the optimum: this analysis is useful when the inverse Hessian at the optimum: this analysis is useful when
ML estimation is done (i.e. no Bayesian estimation); ML estimation is done (i.e. no Bayesian estimation);
\item when \verb"ppost=1" the Toolbox analyses \item when \verb"ppost=1" the Toolbox analyses
the RMSE's for the posterior sample obtained by DYNARE's the RMSE's for the posterior sample obtained by Dynare's
Metropolis procedure. Metropolis procedure.
\end{enumerate} \end{enumerate}
The use of cases 2. and 3. requires an estimation step beforehand! The use of cases 2. and 3. require an estimation step beforehand!
To facilitate the sensitivity analysis after estimation, the To facilitate the sensitivity analysis after estimation, the
\verb"dynare_sensitivity" command also allows to indicate some \verb"sensitivity" command also allows to indicate some
options of \verb"dynare_estimation". These are: options of \verb"estimation". These are:
\begin{itemize} \begin{itemize}
\item \verb"datafile" \item \verb"datafile"
\item \verb"diffuse_filter"
\item \verb"mode_file" \item \verb"mode_file"
\item \verb"first_obs" \item \verb"first_obs"
\item \verb"lik_init" \item \verb"lik_init"
...@@ -278,10 +277,10 @@ identifiable. ...@@ -278,10 +277,10 @@ identifiable.
\end{tabular} \end{tabular}
\vspace{1cm} \vspace{1cm}
\noindent For example, the following commands in the DYNARE model file \noindent For example, the following commands in the Dynare model file
\vspace{1cm} \vspace{1cm}
\noindent\verb"dynare_sensitivity(identification=1, morris=2);" \noindent\verb"sensitivity(identification=1, morris=2);"
\vspace{1cm} \vspace{1cm}
\noindent trigger the identification analysis using \cite{Iskrev2010,Iskrev2011}, jointly with the mapping of the acceptable region. \noindent trigger the identification analysis using \cite{Iskrev2010,Iskrev2011}, jointly with the mapping of the acceptable region.
...@@ -293,75 +292,75 @@ Sensitivity analysis results are saved on the hard-disk of the ...@@ -293,75 +292,75 @@ Sensitivity analysis results are saved on the hard-disk of the
computer. The Toolbox uses a dedicated folder called \verb"GSA", computer. The Toolbox uses a dedicated folder called \verb"GSA",
located in \\ located in \\
\\ \\
\verb"<DYNARE_file>\GSA", \\ \verb"<Dynare_file>\GSA", \\
\\ \\
where \verb"<DYNARE_file>.mod" is the name of the DYNARE model where \verb"<Dynare_file>.mod" is the name of the Dynare model
file. file.
\subsection{Binary data files} \subsection{Binary data files}
A set of binary data files is saved in the \verb"GSA" folder: A set of binary data files is saved in the \verb"GSA" folder:
\begin{description} \begin{description}
\item[]\verb"<DYNARE_file>_prior.mat": this file stores \item[]\verb"<Dynare_file>_prior.mat": this file stores
information about the analyses performed sampling from the prior information about the analyses performed sampling from the prior
ranges, i.e. \verb"pprior=1" and \verb"ppost=0"; ranges, i.e. \verb"pprior=1" and \verb"ppost=0";
\item[]\verb"<DYNARE_file>_mc.mat": this file stores \item[]\verb"<Dynare_file>_mc.mat": this file stores
information about the analyses performed sampling from information about the analyses performed sampling from
multivariate normal, i.e. \verb"pprior=0" and \verb"ppost=0"; multivariate normal, i.e. \verb"pprior=0" and \verb"ppost=0";
\item[]\verb"<DYNARE_file>_post.mat": this file stores information \item[]\verb"<Dynare_file>_post.mat": this file stores information
about analyses performed using the Metropolis posterior sample, about analyses performed using the Metropolis posterior sample,
i.e. \verb"ppost=1". i.e. \verb"ppost=1".
\end{description} \end{description}
\begin{description} \begin{description}
\item[]\verb"<DYNARE_file>_prior_*.mat": these files store \item[]\verb"<Dynare_file>_prior_*.mat": these files store
the filtered and smoothed variables for the prior MC sample, the filtered and smoothed variables for the prior MC sample,
generated when doing RMSE analysis (\verb"pprior=1" and generated when doing RMSE analysis (\verb"pprior=1" and
\verb"ppost=0"); \verb"ppost=0");
\item[]\verb"<DYNARE_file>_mc_*.mat": these files store \item[]\verb"<Dynare_file>_mc_*.mat": these files store
the filtered and smoothed variables for the multivariate normal MC the filtered and smoothed variables for the multivariate normal MC
sample, generated when doing RMSE analysis (\verb"pprior=0" and sample, generated when doing RMSE analysis (\verb"pprior=0" and
\verb"ppost=0"). \verb"ppost=0").
\end{description} \end{description}
\subsection{Stability analysis} \subsection{Stability analysis}
Figure files \verb"<DYNARE_file>_prior_*.fig" store results for Figure files \verb"<Dynare_file>_prior_*.fig" store results for
the stability mapping from prior MC samples: the stability mapping from prior MC samples:
\begin{description} \begin{description}
\item[]\verb"<DYNARE_file>_prior_stab_SA_*.fig": plots of the Smirnov \item[]\verb"<Dynare_file>_prior_stab_SA_*.fig": plots of the Smirnov
test analyses confronting the cdf of the sample fulfilling test analyses confronting the CDF of the sample fulfilling
Blanchard-Kahn conditions with the cdf of the rest of the sample; Blanchard-Kahn conditions with the CDF of the rest of the sample;
\item[]\verb"<DYNARE_file>_prior_stab_indet_SA_*.fig": plots of the Smirnov \item[]\verb"<Dynare_file>_prior_stab_indet_SA_*.fig": plots of the Smirnov
test analyses confronting the cdf of the sample producing test analyses confronting the CDF of the sample producing
indeterminacy with the cdf of the original prior sample; indeterminacy with the CDF of the original prior sample;
\item[]\verb"<DYNARE_file>_prior_stab_unst_SA_*.fig": plots of the Smirnov \item[]\verb"<Dynare_file>_prior_stab_unst_SA_*.fig": plots of the Smirnov
test analyses confronting the cdf of the sample producing unstable test analyses confronting the CDF of the sample producing unstable
(explosive roots) behaviour with the cdf of the original prior (explosive roots) behaviour with the CDF of the original prior
sample; sample;
\item[]\verb"<DYNARE_file>_prior_stable_corr_*.fig": plots of \item[]\verb"<Dynare_file>_prior_stable_corr_*.fig": plots of
bivariate projections of the sample fulfilling Blanchard-Kahn bivariate projections of the sample fulfilling Blanchard-Kahn
conditions; conditions;
\item[]\verb"<DYNARE_file>_prior_indeterm_corr_*.fig": plots of \item[]\verb"<Dynare_file>_prior_indeterm_corr_*.fig": plots of
bivariate projections of the sample producing indeterminacy; bivariate projections of the sample producing indeterminacy;
\item[]\verb"<DYNARE_file>_prior_unstable_corr_*.fig": plots of \item[]\verb"<Dynare_file>_prior_unstable_corr_*.fig": plots of
bivariate projections of the sample producing instability; bivariate projections of the sample producing instability;
\item[]\verb"<DYNARE_file>_prior_unacceptable_corr_*.fig": plots of \item[]\verb"<Dynare_file>_prior_unacceptable_corr_*.fig": plots of
bivariate projections of the sample producing unacceptable bivariate projections of the sample producing unacceptable
solutions, i.e. either instability or indeterminacy or the solutions, i.e. either instability or indeterminacy or the
solution could not be found (e.g. the steady state solution could solution could not be found (e.g. the steady state solution could
not be found by the solver). not be found by the solver).
\end{description} \end{description}
Similar conventions apply for \verb"<DYNARE_file>_mc_*.fig" files, Similar conventions apply for \verb"<Dynare_file>_mc_*.fig" files,
obtained when samples from multivariate normal are used. obtained when samples from multivariate normal are used.
\subsection{RMSE analysis} \subsection{RMSE analysis}
Figure files \verb"<DYNARE_file>_rmse_*.fig" store results for the Figure files \verb"<Dynare_file>_rmse_*.fig" store results for the
RMSE analysis. RMSE analysis.
\begin{description} \begin{description}
\item[]\verb"<DYNARE_file>_rmse_prior*.fig": save results for \item[]\verb"<Dynare_file>_rmse_prior*.fig": save results for
the analysis using prior MC samples; the analysis using prior MC samples;
\item[]\verb"<DYNARE_file>_rmse_mc*.fig": save results for \item[]\verb"<Dynare_file>_rmse_mc*.fig": save results for
the analysis using multivariate normal MC samples; the analysis using multivariate normal MC samples;
\item[]\verb"<DYNARE_file>_rmse_post*.fig": save results for \item[]\verb"<Dynare_file>_rmse_post*.fig": save results for
the analysis using Metropolis posterior samples. the analysis using Metropolis posterior samples.
\end{description} \end{description}
...@@ -369,33 +368,33 @@ The following types of figures are saved (we show prior sample to ...@@ -369,33 +368,33 @@ The following types of figures are saved (we show prior sample to
fix ideas, but the same conventions are used for multivariate fix ideas, but the same conventions are used for multivariate
normal and posterior): normal and posterior):
\begin{description} \begin{description}
\item[]\verb"<DYNARE_file>_rmse_prior_*.fig": for each parameter, plots the cdf's \item[]\verb"<Dynare_file>_rmse_prior_*.fig": for each parameter, plots the CDF's
corresponding to the best 10\% RMES's of each observed series; corresponding to the best 10\% RMES's of each observed series;
\item[]\verb"<DYNARE_file>_rmse_prior_dens_*.fig": for each parameter, plots the pdf's \item[]\verb"<Dynare_file>_rmse_prior_dens_*.fig": for each parameter, plots the pdf's
corresponding to the best 10\% RMES's of each observed series; corresponding to the best 10\% RMES's of each observed series;
\item[]\verb"<DYNARE_file>_rmse_prior_<name of observedseries>_corr_*.fig": for each observed series plots the \item[]\verb"<Dynare_file>_rmse_prior_<name of observedseries>_corr_*.fig": for each observed series plots the
bi-dimensional projections of samples with the best 10\% RMSE's, bi-dimensional projections of samples with the best 10\% RMSE's,
when the correlation is significant; when the correlation is significant;
\item[]\verb"<DYNARE_file>_rmse_prior_lnlik*.fig": for each observed \item[]\verb"<Dynare_file>_rmse_prior_lnlik*.fig": for each observed
series, plots \emph{in red} the cdf of the log-likelihood series, plots \emph{in red} the CDF of the log-likelihood
corresponding to the best 10\% RMSE's, \emph{in green} the cdf of corresponding to the best 10\% RMSE's, \emph{in green} the CDF of
the rest of the sample and \emph{in blue }the cdf of the full the rest of the sample and \emph{in blue }the CDF of the full
sample; this allows to see the presence of some idiosyncratic sample; this allows to see the presence of some idiosyncratic
behaviour; behaviour;
\item[]\verb"<DYNARE_file>_rmse_prior_lnpost*.fig": for each observed \item[]\verb"<Dynare_file>_rmse_prior_lnpost*.fig": for each observed
series, plots \emph{in red} the cdf of the log-posterior series, plots \emph{in red} the CDF of the log-posterior
corresponding to the best 10\% RMSE's, \emph{in green} the cdf of corresponding to the best 10\% RMSE's, \emph{in green} the CDF of
the rest of the sample and \emph{in blue }the cdf of the full the rest of the sample and \emph{in blue }the CDF of the full
sample; this allows to see idiosyncratic behaviour; sample; this allows to see idiosyncratic behaviour;
\item[]\verb"<DYNARE_file>_rmse_prior_lnprior*.fig": for each observed \item[]\verb"<Dynare_file>_rmse_prior_lnprior*.fig": for each observed
series, plots \emph{in red} the cdf of the log-prior corresponding series, plots \emph{in red} the CDF of the log-prior corresponding
to the best 10\% RMSE's, \emph{in green} the cdf of the rest of to the best 10\% RMSE's, \emph{in green} the CDF of the rest of
the sample and \emph{in blue }the cdf of the full sample; this the sample and \emph{in blue }the CDF of the full sample; this
allows to see idiosyncratic behaviour; allows to see idiosyncratic behaviour;
\item[]\verb"<DYNARE_file>_rmse_prior_lik_SA_*.fig": when \item[]\verb"<Dynare_file>_rmse_prior_lik_SA_*.fig": when
\verb"lik_only=1", this shows the Smirnov tests for the filtering \verb"lik_only=1", this shows the Smirnov tests for the filtering
of the best 10\% log-likelihood values; of the best 10\% log-likelihood values;
\item[]\verb"<DYNARE_file>_rmse_prior_post_SA_*.fig": when \item[]\verb"<Dynare_file>_rmse_prior_post_SA_*.fig": when
\verb"lik_only=1", this shows the Smirnov test for the filtering \verb"lik_only=1", this shows the Smirnov test for the filtering
of the best 10\% log-posterior values. of the best 10\% log-posterior values.
\end{description} \end{description}
...@@ -405,19 +404,19 @@ In the case of the mapping of the reduced form solution, synthetic ...@@ -405,19 +404,19 @@ In the case of the mapping of the reduced form solution, synthetic
figures are saved in the \verb"\GSA" folder: figures are saved in the \verb"\GSA" folder:
\begin{description} \begin{description}
\item[]\verb"<DYNARE_file>_redform_<endo name>_vs_lags_*.fig": \item[]\verb"<Dynare_file>_redform_<endo name>_vs_lags_*.fig":
shows bar charts of the sensitivity indices for the \emph{ten most shows bar charts of the sensitivity indices for the \emph{ten most
important} parameters driving the reduced form coefficients of the important} parameters driving the reduced form coefficients of the
selected endogenous variables (\verb"namendo") versus lagged selected endogenous variables (\verb"namendo") versus lagged
endogenous variables (\verb"namlagendo"); suffix \verb"log" endogenous variables (\verb"namlagendo"); suffix \verb"log"
indicates the results for log-transformed entries; indicates the results for log-transformed entries;
\item[]\verb"<DYNARE_file>_redform_<endo name>_vs_shocks_*.fig": \item[]\verb"<Dynare_file>_redform_<endo name>_vs_shocks_*.fig":
shows bar charts of the sensitivity indices for the \emph{ten most shows bar charts of the sensitivity indices for the \emph{ten most
important} parameters driving the reduced form coefficients of the important} parameters driving the reduced form coefficients of the
selected endogenous variables (\verb"namendo") versus exogenous selected endogenous variables (\verb"namendo") versus exogenous
variables (\verb"namexo"); suffix \verb"log" indicates the results variables (\verb"namexo"); suffix \verb"log" indicates the results
for log-transformed entries; for log-transformed entries;
\item[]\verb"<DYNARE_file>_redform_GSA(_log).fig": shows bar chart of \item[]\verb"<Dynare_file>_redform_GSA(_log).fig": shows bar chart of
all sensitivity indices for each parameter: this allows to notice all sensitivity indices for each parameter: this allows to notice
parameters that have a minor effect for \emph{any} of the reduced parameters that have a minor effect for \emph{any} of the reduced
form coefficients, form coefficients,
...@@ -449,24 +448,24 @@ without the need of any user's intervention. ...@@ -449,24 +448,24 @@ without the need of any user's intervention.
\subsection{Screening analysis} \subsection{Screening analysis}
The results of the screening analysis with Morris sampling design The results of the screening analysis with Morris sampling design
are stored in the subfolder \verb"\GSA\SCREEN". The data file are stored in the subfolder \verb"\GSA\SCREEN". The data file
\verb"<DYNARE_file>_prior" stores all the information of the \verb"<Dynare_file>_prior" stores all the information of the
analysis (Morris sample, reduced form coefficients, etc.). analysis (Morris sample, reduced form coefficients, etc.).
Screening analysis merely concerns reduced form coefficients. Screening analysis merely concerns reduced form coefficients.
Similar synthetic bar charts as for the reduced form analysis with Similar synthetic bar charts as for the reduced form analysis with
MC samples are saved: MC samples are saved:
\begin{description} \begin{description}
\item[]\verb"<DYNARE_file>_redform_<endo name>_vs_lags_*.fig": \item[]\verb"<Dynare_file>_redform_<endo name>_vs_lags_*.fig":
shows bar charts of the elementary effect tests for the \emph{ten shows bar charts of the elementary effect tests for the \emph{ten
most important} parameters driving the reduced form coefficients most important} parameters driving the reduced form coefficients
of the selected endogenous variables (\verb"namendo") versus of the selected endogenous variables (\verb"namendo") versus
lagged endogenous variables (\verb"namlagendo"); lagged endogenous variables (\verb"namlagendo");
\item[]\verb"<DYNARE_file>_redform_<endo name>_vs_shocks_*.fig": \item[]\verb"<Dynare_file>_redform_<endo name>_vs_shocks_*.fig":
shows bar charts of the elementary effect tests for the \emph{ten shows bar charts of the elementary effect tests for the \emph{ten
most important} parameters driving the reduced form coefficients most important} parameters driving the reduced form coefficients
of the selected endogenous variables (\verb"namendo") versus of the selected endogenous variables (\verb"namendo") versus
exogenous variables (\verb"namexo"); exogenous variables (\verb"namexo");
\item[]\verb"<DYNARE_file>_redform_screen.fig": shows bar chart of \item[]\verb"<Dynare_file>_redform_screen.fig": shows bar chart of
all elementary effect tests for each parameter: this allows to all elementary effect tests for each parameter: this allows to
identify parameters that have a minor effect for \emph{any} of the identify parameters that have a minor effect for \emph{any} of the
reduced form coefficients. reduced form coefficients.
......
@ARTICLE{Ratto_CompEcon_2008, % Encoding: UTF-8
author = {Ratto, M.},
title = {Analysing DSGE Models with Global Sensitivity Analysis}, @Article{Ratto_CompEcon_2008,
author = {Ratto, Marco},
journal = {Computational Economics}, journal = {Computational Economics},
title = {Analysing {DSGE} models with global sensitivity analysis},
year = {2008}, year = {2008},
volume = {31},
pages = {115--139}, pages = {115--139},
volume = {31},
doi = {10.1007/s10614-007-9110-6},
} }
@ARTICLE{Iskrev2010, @Article{Iskrev2010,
author = {Nikolay Iskrev}, author = {Nikolay Iskrev},
title = {Local Identification in {DSGE} Models},
journal = {Journal of Monetary Economics}, journal = {Journal of Monetary Economics},
title = {Local Identification in {DSGE} Models},
year = {2010}, year = {2010},
number = {2},
pages = {189-202},
volume = {57}, volume = {57},
pages = {189-202} doi = {10.1016/j.jmoneco.2009.12.007},
} }
@UNPUBLISHED{Iskrev2011, @UNPUBLISHED{Iskrev2011,
...@@ -23,3 +28,5 @@ ...@@ -23,3 +28,5 @@
note = {mimeo}, note = {mimeo},
year = {2011} year = {2011}
} }
@Comment{jabref-meta: databaseType:bibtex;}
\ifx\undefined\bysame
\newcommand{\bysame}{\leavevmode\hbox to\leftmargin{\hrulefill\,\,}}
\fi
\begin{thebibliography}{xx}
\harvarditem[Collard and Juillard]{Collard and Juillard}{2001}{COLL/JUIL/01a}
{ Collard, F. and M.~Juillard}, Accuracy of stochastic perturbation methods:
The case of asset pricing models, {\it Journal of Economic Dynamics and
Control}, 2001, {\it 25}, 979--999.
\harvarditem[Schmitt-Grohe and Uribe]{Schmitt-Grohe and Uribe}{2002}{SGU/02}
{ Schmitt-Grohe, S. and M.~Uribe}, {\it Solving Dynamic General Equilibrium
Models Using a Second-Order Approximation to the Policy Function}, technical
working paper, Rutgers Univsersity 2002.
\end{thebibliography}
\documentclass[11pt,a4paper]{article} \documentclass[11pt,a4paper]{article}
\usepackage{bibmad,graphicx,latexsym,amssymb,times} \usepackage{graphicx,latexsym,amssymb,times}
\usepackage[cp850]{inputenc} \usepackage[utf8]{inputenc}
\begin{document} \begin{document}
\title{Stochastic simulations with {\sc Dynare}. \\ A practical guide.} \title{Stochastic simulations with {\sc Dynare}. \\ A practical guide.}
\author{Fabrice Collard (GREMAQ, University of Toulouse)\\Adapted for Dynare 4.1\\ by Michel Juillard and S\'ebastien Villemot (CEPREMAP)} \author{Fabrice Collard (GREMAQ, University of Toulouse)\\Adapted for Dynare 4.x\\ by Michel Juillard and S\'ebastien Villemot (CEPREMAP)}
\date{First draft: February 2001\hspace{10mm}This draft: December 2009.} \date{First draft: February 2001\hspace{10mm}This draft: December 2009.}
\maketitle \maketitle
This document describes a model involving both endogenous and exogenous state variable. We first describe the theoretical model, before showing how the perturbation method is implemented in {\sc Dynare}. This document describes a model involving both endogenous and exogenous state variable. We first describe the theoretical model, before showing how the perturbation method is implemented in {\sc Dynare}.
...@@ -324,8 +324,8 @@ end; ...@@ -324,8 +324,8 @@ end;
stoch_simul(periods=2000, drop=200); stoch_simul(periods=2000, drop=200);
\end{verbatim} \end{verbatim}
\bibliographystyle{Usmad} %\bibliographystyle{Usmad}
\bibliography{/papers/biblio/michel} %\bibliography{/papers/biblio/michel}
\end{document} \end{document}
......
EXTRA_DIST = dynare-internals.org
if ENABLE_ORG_EXPORT
html-local:
emacs --batch --visit=dynare-internals.org --funcall org-export-as-html-batch
endif
clean-local:
rm -rf *.html ltxpng
...@@ -2,7 +2,6 @@ function build_internal_documentation() ...@@ -2,7 +2,6 @@ function build_internal_documentation()
% The name of the function should be explicit... % The name of the function should be explicit...
datafiles = []; datafiles = [];
datafiles = [ datafiles ; {'../../matlab/utilities/dataset'}, {'initialize_dataset'}];
datafiles = [ datafiles ; {'../../matlab/utilities/dataset'}, {'descriptive_statistics'}]; datafiles = [ datafiles ; {'../../matlab/utilities/dataset'}, {'descriptive_statistics'}];
datafiles = [ datafiles ; {'../../matlab/utilities/dataset'}, {'compute_stdv'}]; datafiles = [ datafiles ; {'../../matlab/utilities/dataset'}, {'compute_stdv'}];
datafiles = [ datafiles ; {'../../matlab/utilities/dataset'}, {'compute_cova'}]; datafiles = [ datafiles ; {'../../matlab/utilities/dataset'}, {'compute_cova'}];
......
...@@ -60,7 +60,7 @@ under the terms of the GNU Free Documentation License, Version 1.3 or ...@@ -60,7 +60,7 @@ under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license can be found at @uref{http://www.gnu.org/licenses/fdl.txt}. A copy of the license can be found at @uref{https://www.gnu.org/licenses/fdl.txt}.
@end quotation @end quotation
@end copying @end copying
...@@ -203,18 +203,18 @@ institutions who cannot afford, or do not want to pay for, MATLAB and ...@@ -203,18 +203,18 @@ institutions who cannot afford, or do not want to pay for, MATLAB and
are willing to bear the concomitant performance loss. are willing to bear the concomitant performance loss.
The development of Dynare is mainly done at The development of Dynare is mainly done at
@uref{http://www.cepremap.ens.fr, Cepremap} by a core team of @uref{http://www.cepremap.ens.fr, CEPREMAP} by a core team of
researchers who devote part of their time to software researchers who devote part of their time to software
development. Currently the development team of Dynare is composed of development. Currently the development team of Dynare is composed of
Stéphane Adjemian (Université du Maine, Gains and Cepremap), Houtan Stéphane Adjemian (Université du Maine, Gains and CEPREMAP), Houtan
Bastani (Cepremap), Michel Juillard (Banque de France), Frédéric Bastani (CEPREMAP), Michel Juillard (Banque de France), Frédéric
Karamé (Université d'Évry, Epee and Cepremap), Junior Maih (Norges Karamé (Université d'Évry, Epee and CEPREMAP), Junior Maih (Norges
Bank), Ferhat Mihoubi (Université d'Évry, Epee and Cepremap), George Bank), Ferhat Mihoubi (Université d'Évry, Epee and CEPREMAP), George
Perendia, Marco Ratto (JRC) and Sébastien Villemot (Cepremap and Paris Perendia, Marco Ratto (JRC) and Sébastien Villemot (CEPREMAP and Paris
School of Economics). Financial support is provided by Cepremap, School of Economics). Financial support is provided by CEPREMAP,
Banque de France and DSGE-net (an international research network for Banque de France and DSGE-net (an international research network for
DSGE modeling). Increasingly, the developer base is expanding, as DSGE modeling). Increasingly, the developer base is expanding, as
tools developed by researchers outside of Cepremap are integrated into tools developed by researchers outside of CEPREMAP are integrated into
Dynare. Dynare.
Interaction between developers and users of Dynare is central to the Interaction between developers and users of Dynare is central to the
......
if HAVE_PDFLATEX
if HAVE_BEAMER
pdf-local: macroprocessor.pdf
endif
endif
SRC = macroprocessor.tex new-design.pdf
EXTRA_DIST = $(SRC)
macroprocessor.pdf: $(SRC)
$(PDFLATEX) macroprocessor
$(PDFLATEX) macroprocessor
clean-local:
rm -f macroprocessor.pdf *.toc *.aux *.log *.nav *.snm *.vrb *.out *~