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
Loading items

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
Loading items
Show changes
Showing
with 2329 additions and 8057 deletions
......@@ -30,7 +30,7 @@
\subsection*{AIM Solver Subsystem}
\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}
\begin{par}
It cosists of:
......@@ -41,7 +41,7 @@ It cosists of:
\end{itemize}
\begin{itemize}
\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}
\begin{itemize}
\setlength{\itemsep}{-1ex}
......@@ -235,7 +235,7 @@ Dynare use:
GP July 2008
\end{par} \vspace{1em}
\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}
......
SUBDIRS = preprocessor macroprocessor userguide parallel internals gsa
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
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 @@
\begin{document}
\title{BVAR models ``\`a la Sims'' in Dynare\thanks{Copyright \copyright~2007--2011 S\'ebastien
Villemot. Permission is granted to copy, distribute and/or modify
\title{BVAR models ``\`a la Sims'' in Dynare\thanks{Copyright \copyright~2007--2015 S\'ebastien
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
License, Version 1.3 or any later version published by the Free
Software Foundation; with no Invariant Sections, no Front-Cover
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
\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.
}}
\author{S\'ebastien Villemot\thanks{Paris School of Economics and
CEPREMAP. E-mail:
\href{mailto:sebastien.villemot@ens.fr}{\texttt{sebastien.villemot@ens.fr}}.}}
\date{First version: September 2007 \hspace{1cm} This version: August 2012}
CEPREMAP.} \and Johannes Pfeifer\thanks{University of the Bundeswehr Munich. E-mail: \href{mailto:johannes.pfeifer@unibw.de}{\texttt{johannes.pfeifer@unibw.de}}.}}
\date{First version: September 2007 \hspace{1cm} This version: May 2017}
\maketitle
\begin{abstract}
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
implementation and usage.
\end{abstract}
......@@ -435,10 +435,11 @@ p(Y^+ | X^+) & = & \frac{\int (2\pi)^{-\frac{T^+\cdot ny}{2}} f(\Phi,\Sigma | \d
\section{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}
\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}
\subsection{Common options}
......@@ -499,16 +500,18 @@ The syntax for computing the marginal density is:
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}
The syntax for computing (out-of-sample) forecasts is:
\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
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:
\begin{itemize}
\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:
\item if RMSE has been computed, results are in \texttt{oo\_.bvar.forecast.rmse}.
\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}
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,
bvar_prior_train = 10) 8;
bvar_forecast(forecast = 10, bvar_replic = 10000, nobs = 200) 8;
bvar_irf(8,'Cholesky');
\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.
......
% Encoding: UTF-8
@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},
title = {Dynare: Reference Manual, Version 4},
@TechReport{adjemian/al:2011,
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},
institution = {CEPREMAP},
title = {Dynare: Reference Manual Version 4},
year = {2011},
number = {1},
type = {Dynare Working Papers},
number = {1}
}
@article{blanchard/kahn:1980,
@Article{blanchard/kahn:1980,
author = {Blanchard, Olivier Jean and Kahn, Charles M.},
title = {The Solution of Linear Difference Models under Rational Expectations},
journal = {Econometrica},
year = 1980,
volume = {48},
title = {The Solution of Linear Difference Models under Rational Expectations},
year = {1980},
month = {7},
number = {5},
pages = {1305-11},
month = {July},
keywords = { Macromodels Yield curve Persistence},
volume = {48},
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},
title = {Using the generalized Schur form to solve a multivariate linear rational expectations model},
journal = {Journal of Economic Dynamics and Control},
year = 2000,
volume = {24},
title = {Using the generalized {Schur} form to solve a multivariate linear rational expectations model},
year = {2000},
month = {September},
number = {10},
pages = {1405-1423},
month = {September},
keywords = {},
abstract = {},
url = {http://ideas.repec.org/a/eee/dyncon/v24y2000i10p1405-1423.html}
volume = {24},
doi = {10.1016/s0165-1889(99)00045-7},
}
@article{schmitt-grohe/uribe:2004,
@Article{schmitt-grohe/uribe:2004,
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},
year = 2004,
volume = {28},
title = {Solving dynamic general equilibrium models using a second-order approximation to the policy function},
year = {2004},
month = {January},
number = {4},
pages = {755-775},
month = {January},
keywords = {},
url = {http://ideas.repec.org/a/eee/dyncon/v28y2004i4p755-775.html}
volume = {28},
doi = {10.1016/s0165-1889(03)00043-5},
}
@article{sims:2001,
@Article{sims:2001,
author = {Sims, Christopher A},
title = {Solving Linear Rational Expectations Models},
journal = {Computational Economics},
year = 2002,
volume = {20},
title = {Solving Linear Rational Expectations Models},
year = {2002},
month = {October},
number = {1-2},
pages = {1-20},
month = {October},
keywords = {},
abstract = {},
url = {http://ideas.repec.org/a/kap/compec/v20y2002i1-2p1-20.html}
volume = {20},
doi = {10.1023/A:1020517101123},
}
@incollection{uhlig:1999,
@InCollection{uhlig:1999,
author = {Uhlig, Harald},
title = {A toolkit for analysing nonlinear dynamic stochastic models easily},
booktitle = {Computational Methods for the Study of Dynamic Economics},
booktitle = {Computational Methods for the Study of Dynamic Economies},
publisher = {Oxford University Press},
address = {Oxford},
title = {A toolkit for analysing nonlinear dynamic stochastic models easily},
year = {1999},
editor = {Marimon, Ramon and Scott, Androw},
pages = {30-61}
editor = {Marimon, Ramon and Scott, Andrew},
pages = {30-61},
}
@techreport{kamenik:2003,
@techreport{kamenik:2004,
author = {Kamenik, Ondra},
title = {Solution of Specialized Sylvester Equation},
institution = {Manuscript},
year = {2003}
year = {2004}
}
@article{collard/juillard:2001:compecon,
@Article{collard/juillard:2001:compecon,
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},
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},
volume = {17},
month = {6},
number = {2-3},
pages = {125-39},
month = {June},
keywords = {},
url = {http://ideas.repec.org/a/kap/compec/v17y2001i2-3p125-39.html}
pages = {125-139},
volume = {17},
doi = {10.1023/A:1011624124377},
}
@book{golub/van-loan:1996,
@Book{golub/van-loan:1996,
author = {Golub, Gene H. and Van Loan, Charles F.},
title = {Matrix Computations},
publisher = {The John Hopkins University Press},
year = {1996},
edition = {third}
title = {Matrix Computations},
year = {2013},
address = {Baltimore},
edition = {4},
}
@Comment{jabref-meta: databaseType:bibtex;}
......@@ -3,7 +3,7 @@
\usepackage{amssymb}
\usepackage{amsmath}
\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{fullpage}
......@@ -12,7 +12,7 @@
\author{S\'ebastien Villemot\thanks{Paris School of Economics and
CEPREMAP. E-mail:
\href{mailto:sebastien.villemot@ens.fr}{\texttt{sebastien.villemot@ens.fr}}.}}
\href{mailto:sebastien@dynare.org}{\texttt{sebastien@dynare.org}}.}}
\title{Solving rational expectations models at first order: \\
what Dynare does\thanks{Copyright \copyright~2009,~2011 S\'ebastien
......@@ -21,7 +21,7 @@
License, Version 1.3 or any later version published by the Free
Software Foundation; with no Invariant Sections, no Front-Cover
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
The author acknowledges funding through the Seventh Framework Programme
for Research (FP7) of the European Commission's Socio-economic Sciences and
......@@ -36,7 +36,7 @@
computing the first order approximated solution of a nonlinear rational
expectations model. The core of the algorithm is a generalized Schur
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
efficient, especially for large models.
......@@ -62,12 +62,8 @@ detail the algorithm implemented in Dynare for computing the first order
approximated solution of nonlinear rational expectations models.\footnote{This
algorithm is available using the \texttt{stoch\_simul} command of Dynare. The
original implementation of this algorithm was done by Michel Juillard, using
MATLAB, and is available in the \texttt{matlab/dr1.m} file which is
distributed with Dynare. Another implementation was done by the author, in
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.}
MATLAB, and is available in the \texttt{matlab/dyn\_first\_order\_solver.m} file which is
distributed with Dynare.}
This algorithm is based on a generalized Schur decomposition---also known as
the QZ decomposition---and is therefore essentially a variation on the
......@@ -653,10 +649,10 @@ equation is:
\end{equation*}
In the general case, this equation is a specialized Sylvester equation, which
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.}.
\bibliographystyle{ecta}
\bibliographystyle{elsarticle-harv}
\bibliography{dr}
\end{document}
\documentclass[10pt]{beamer}
\usepackage{tikz, hyperref, alltt}
\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}
\hypersetup{colorlinks,linkcolor=,urlcolor=links}
\mode<handout>
{
\usepackage{pgfpages}
\pgfpagesuselayout{4 on 1}[a4paper,border shrink=3mm,landscape]
\usetheme{CambridgeUS}
\usecolortheme{lily}
}
\mode<beamer>
{
\usetheme{CambridgeUS}
}
\AtBeginSection[]
{
\begin{frame}
\frametitle{Outline}
\tableofcontents[currentsection, hideothersubsections]
\end{frame}
}
\setbeamerfont{frametitle}{family=\rmfamily,series=\bfseries,size={\fontsize{10}{10}}}
\setbeamertemplate{frametitle continuation}[from second]
\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{frame}
\titlepage
\end{frame}
\begin{frame}[t]
\frametitle{Outline}
\tableofcontents
\end{frame}
%
% DATES
%
\section{Time Series}
\subsection{Overview}
\begin{frame}[fragile,t]
\frametitle{Overview}
\begin{itemize}
\myitem Provide support for time series (\texttt{dseries})
\begin{itemize}
\myitem Based on an implementation for handling dates (\texttt{dates})
\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{frame}
\subsection{Syntax}
\begin{frame}[fragile,t]
\frametitle{Syntax}
\begin{itemize}
\myitem Two components of a time series:
\begin{itemize}
\myitem A time component. In Dynare: \texttt{dates}
\myitem A data component mapped to time. In Dynare: \texttt{dseries}
\end{itemize}
\end{itemize}
\end{frame}
\subsubsection{\texttt{dates} Syntax}
\begin{frame}[fragile,t]
\frametitle{\texttt{dates} Syntax}
\begin{itemize}
\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}
\myitem{A single date}
\begin{alltt}
>> t = dates(`1999y');
\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{frame}
\begin{frame}[fragile,t]
\frametitle{Creating a new \texttt{dates} object in a \texttt{.mod} file}
\begin{itemize}
\myitem The preprocessor allows for syntax simplification when
\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{frame}
\begin{frame}[fragile,t]
\frametitle{Collections and Ranges of \texttt{dates} in a \texttt{.mod} file}
\begin{itemize}
\myitem A collection of \texttt{dates}
\begin{alltt}
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{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{frame}
\begin{frame}[fragile,t]
\frametitle{Arithmetic Operations on \texttt{dates}}
\begin{itemize}
\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}
\myitem Objects must have the same frequency
\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}
\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}
\myitem Let \texttt{a = [1990Q1:1991Q1 1990Q1]; b = [1990Q3:1991Q3];}
\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{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{frame}
%
% DSERIES
%
\subsubsection{\texttt{dseries} Syntax}
\begin{frame}[fragile,t]
\frametitle{\texttt{dseries} Syntax}
\begin{itemize}
\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}
\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}
\myitem \texttt{dseries} members cannot be modified
\end{itemize}
\end{frame}
\begin{frame}[fragile,t]
\frametitle{Creating a new \texttt{dseries} object (1/2)}
Load data directly
\begin{itemize}
\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}
\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}
Create an empty time series. Useful for renaming dseries.
\begin{itemize}
\myitem \texttt{tseries = dseries();}
\myitem \texttt{ts = tseries(randn(3,2));}
\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{frame}
\begin{frame}[fragile,t]
\frametitle{Extracting variables from a \texttt{dseries}}
\begin{itemize}
\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{frame}
\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}
%
% REPORTING
%
\section{Reporting}
\subsection{Overview}
\begin{frame}[fragile,t]
\frametitle{Overview}
\begin{itemize}
\myitem Beta version in Dynare 4.4. Mature version ready in Dynare 4.5
\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}
\myitem Scales well
\myitem Formating follows that of enclosing document
\end{itemize}
\myitem Dynare provides a subset of the many Ti$k$Z options
\begin{itemize}
\myitem You can easily modify the Ti$k$Z graph if the option you want is not in Dynare
\end{itemize}
\myitem Works with MATLAB \& Octave
\myitem Works much faster than similar softawre
\myitem NB: Must install a \LaTeX\ distribution to compile reports
\begin{itemize}
\myitem On Windows use MiKTeX: \url{http://miktex.org}
\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}
\end{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}
\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}[
node distance = .25cm,
auto,
line/.style={->, >=stealth'},
]
\node (Report) [abstract, rectangle split, rectangle split parts=2]
{
\textbf{Report}
\nodepart{second}\texttt{report(...);}
};
\node (Page) [abstract, rectangle split, rectangle split parts=2, below=of Report]
{
\textbf{Page}
\nodepart{second}\texttt{addPage(...);}
};
\node (Section) [abstract, rectangle split, rectangle split parts=2, below=of Page]
{
\textbf{Section}
\nodepart{second}\texttt{addSection(...);}
};
\node (Spacer) [rectangle split, rectangle split parts=2, opacity=0, below=of Section]
{
};
\node (Graph) [abstract, rectangle split, rectangle split parts=2, left=of Spacer, xshift=.25cm]
{
\textbf{Graph}
\nodepart{second}\texttt{addGraph(...);}
};
\node (Table) [abstract, rectangle split, rectangle split parts=2, right=of Spacer, xshift=-.25cm, text height=]
{
\textbf{Table}
\nodepart{second}\texttt{addTable(...);}
};
\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}
\nodepart{second}\texttt{addSeries(...);}
};
\draw [line] (Series) to node { } (Table);
\draw [line] (Series) to node { } (Graph);
\draw [line] (Table) to node { } (Section);
\draw [line] (Graph) 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] (Page) to node { } (Report);
\end{tikzpicture}}
\end{center}
\end{frame}
\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}
\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}
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: MATLAB, The MathWorks, Inc. Version 8.1.0.604 (R2013a). Operating System: Linux 3.10-3-amd64 #1 SMP Debian 3.10.11-1 (2013-09-10) x86_64.
%%Title: ../doc/dynare.plots/BaxterKingFilter.eps
%%CreationDate: 11/12/2013 18:18:18
%%DocumentNeededFonts: Helvetica
%%DocumentProcessColors: Cyan Magenta Yellow Black
%%LanguageLevel: 2
%%Pages: 1
%%BoundingBox: 70 213 546 591
%%EndComments
%%BeginProlog
% MathWorks dictionary
/MathWorks 160 dict begin
% definition operators
/bdef {bind def} bind def
/ldef {load def} bind def
/xdef {exch def} bdef
/xstore {exch store} bdef
% operator abbreviations
/c /clip ldef
/cc /concat ldef
/cp /closepath ldef
/gr /grestore ldef
/gs /gsave ldef
/mt /moveto ldef
/np /newpath ldef
/cm /currentmatrix ldef
/sm /setmatrix ldef
/rm /rmoveto ldef
/rl /rlineto ldef
/s {show newpath} bdef
/sc {setcmykcolor} bdef
/sr /setrgbcolor ldef
/sg /setgray ldef
/w /setlinewidth ldef
/j /setlinejoin ldef
/cap /setlinecap ldef
/rc {rectclip} bdef
/rf {rectfill} bdef
% page state control
/pgsv () def
/bpage {/pgsv save def} bdef
/epage {pgsv restore} bdef
/bplot /gsave ldef
/eplot {stroke grestore} bdef
% orientation switch
/portraitMode 0 def /landscapeMode 1 def /rotateMode 2 def
% coordinate system mappings
/dpi2point 0 def
% font control
/FontSize 0 def
/FMS {/FontSize xstore findfont [FontSize 0 0 FontSize neg 0 0]
makefont setfont} bdef
/reencode {exch dup where {pop load} {pop StandardEncoding} ifelse
exch dup 3 1 roll findfont dup length dict begin
{ 1 index /FID ne {def}{pop pop} ifelse } forall
/Encoding exch def currentdict end definefont pop} bdef
/isroman {findfont /CharStrings get /Agrave known} bdef
/FMSR {3 1 roll 1 index dup isroman {reencode} {pop pop} ifelse
exch FMS} bdef
/csm {1 dpi2point div -1 dpi2point div scale neg translate
dup landscapeMode eq {pop -90 rotate}
{rotateMode eq {90 rotate} if} ifelse} bdef
% line types: solid, dotted, dashed, dotdash
/SO { [] 0 setdash } bdef
/DO { [.5 dpi2point mul 4 dpi2point mul] 0 setdash } bdef
/DA { [6 dpi2point mul] 0 setdash } bdef
/DD { [.5 dpi2point mul 4 dpi2point mul 6 dpi2point mul 4
dpi2point mul] 0 setdash } bdef
% macros for lines and objects
/L {lineto stroke} bdef
/MP {3 1 roll moveto 1 sub {rlineto} repeat} bdef
/AP {{rlineto} repeat} bdef
/PDlw -1 def
/W {/PDlw currentlinewidth def setlinewidth} def
/PP {closepath eofill} bdef
/DP {closepath stroke} bdef
/MR {4 -2 roll moveto dup 0 exch rlineto exch 0 rlineto
neg 0 exch rlineto closepath} bdef
/FR {MR stroke} bdef
/PR {MR fill} bdef
/L1i {{currentfile picstr readhexstring pop} image} bdef
/tMatrix matrix def
/MakeOval {newpath tMatrix currentmatrix pop translate scale
0 0 1 0 360 arc tMatrix setmatrix} bdef
/FO {MakeOval stroke} bdef
/PO {MakeOval fill} bdef
/PD {currentlinewidth 2 div 0 360 arc fill
PDlw -1 eq not {PDlw w /PDlw -1 def} if} def
/FA {newpath tMatrix currentmatrix pop translate scale
0 0 1 5 -2 roll arc tMatrix setmatrix stroke} bdef
/PA {newpath tMatrix currentmatrix pop translate 0 0 moveto scale
0 0 1 5 -2 roll arc closepath tMatrix setmatrix fill} bdef
/FAn {newpath tMatrix currentmatrix pop translate scale
0 0 1 5 -2 roll arcn tMatrix setmatrix stroke} bdef
/PAn {newpath tMatrix currentmatrix pop translate 0 0 moveto scale
0 0 1 5 -2 roll arcn closepath tMatrix setmatrix fill} bdef
/vradius 0 def /hradius 0 def /lry 0 def
/lrx 0 def /uly 0 def /ulx 0 def /rad 0 def
/MRR {/vradius xdef /hradius xdef /lry xdef /lrx xdef /uly xdef
/ulx xdef newpath tMatrix currentmatrix pop ulx hradius add uly
vradius add translate hradius vradius scale 0 0 1 180 270 arc
tMatrix setmatrix lrx hradius sub uly vradius add translate
hradius vradius scale 0 0 1 270 360 arc tMatrix setmatrix
lrx hradius sub lry vradius sub translate hradius vradius scale
0 0 1 0 90 arc tMatrix setmatrix ulx hradius add lry vradius sub
translate hradius vradius scale 0 0 1 90 180 arc tMatrix setmatrix
closepath} bdef
/FRR {MRR stroke } bdef
/PRR {MRR fill } bdef
/MlrRR {/lry xdef /lrx xdef /uly xdef /ulx xdef /rad lry uly sub 2 div def
newpath tMatrix currentmatrix pop ulx rad add uly rad add translate
rad rad scale 0 0 1 90 270 arc tMatrix setmatrix lrx rad sub lry rad
sub translate rad rad scale 0 0 1 270 90 arc tMatrix setmatrix
closepath} bdef
/FlrRR {MlrRR stroke } bdef
/PlrRR {MlrRR fill } bdef
/MtbRR {/lry xdef /lrx xdef /uly xdef /ulx xdef /rad lrx ulx sub 2 div def
newpath tMatrix currentmatrix pop ulx rad add uly rad add translate
rad rad scale 0 0 1 180 360 arc tMatrix setmatrix lrx rad sub lry rad
sub translate rad rad scale 0 0 1 0 180 arc tMatrix setmatrix
closepath} bdef
/FtbRR {MtbRR stroke } bdef
/PtbRR {MtbRR fill } bdef
/stri 6 array def /dtri 6 array def
/smat 6 array def /dmat 6 array def
/tmat1 6 array def /tmat2 6 array def /dif 3 array def
/asub {/ind2 exch def /ind1 exch def dup dup
ind1 get exch ind2 get sub exch } bdef
/tri_to_matrix {
2 0 asub 3 1 asub 4 0 asub 5 1 asub
dup 0 get exch 1 get 7 -1 roll astore } bdef
/compute_transform {
dmat dtri tri_to_matrix tmat1 invertmatrix
smat stri tri_to_matrix tmat2 concatmatrix } bdef
/ds {stri astore pop} bdef
/dt {dtri astore pop} bdef
/db {2 copy /cols xdef /rows xdef mul dup 3 mul string
currentfile
3 index 0 eq {/ASCIIHexDecode filter}
{/ASCII85Decode filter 3 index 2 eq {/RunLengthDecode filter} if }
ifelse exch readstring pop
dup 0 3 index getinterval /rbmap xdef
dup 2 index dup getinterval /gbmap xdef
1 index dup 2 mul exch getinterval /bbmap xdef pop pop}bdef
/it {gs np dtri aload pop moveto lineto lineto cp c
cols rows 8 compute_transform
rbmap gbmap bbmap true 3 colorimage gr}bdef
/il {newpath moveto lineto stroke}bdef
currentdict end def
%%EndProlog
%%BeginSetup
MathWorks begin
0 cap
end
%%EndSetup
%%Page: 1 1
%%BeginPageSetup
%%PageBoundingBox: 70 213 546 591
MathWorks begin
bpage
%%EndPageSetup
%%BeginObject: obj1
bplot
/dpi2point 12 def
portraitMode 0216 7344 csm
628 247 5717 4541 rc
85 dict begin %Colortable dictionary
/c0 { 0.000000 0.000000 0.000000 sr} bdef
/c1 { 1.000000 1.000000 1.000000 sr} bdef
/c2 { 0.900000 0.000000 0.000000 sr} bdef
/c3 { 0.000000 0.820000 0.000000 sr} bdef
/c4 { 0.000000 0.000000 0.800000 sr} bdef
/c5 { 0.910000 0.820000 0.320000 sr} bdef
/c6 { 1.000000 0.260000 0.820000 sr} bdef
/c7 { 0.000000 0.820000 0.820000 sr} bdef
c0
1 j
1 sg
0 0 6913 5186 rf
6 w
0 4226 5356 0 0 -4226 899 4615 4 MP
PP
-5356 0 0 4226 5356 0 0 -4226 899 4615 5 MP stroke
4 w
DO
SO
6 w
0 sg
899 4615 mt 6255 4615 L
899 389 mt 6255 389 L
899 4615 mt 899 389 L
6255 4615 mt 6255 389 L
899 4615 mt 6255 4615 L
899 4615 mt 899 389 L
1480 4615 mt 1480 4561 L
1480 389 mt 1480 442 L
%%IncludeResource: font Helvetica
/Helvetica /ISOLatin1Encoding 120 FMSR
1267 4760 mt
(1957Q4) s
2092 4615 mt 2092 4561 L
2092 389 mt 2092 442 L
1879 4760 mt
(1962Q4) s
2704 4615 mt 2704 4561 L
2704 389 mt 2704 442 L
2491 4760 mt
(1967Q4) s
3316 4615 mt 3316 4561 L
3316 389 mt 3316 442 L
3103 4760 mt
(1972Q4) s
3928 4615 mt 3928 4561 L
3928 389 mt 3928 442 L
3715 4760 mt
(1977Q4) s
4541 4615 mt 4541 4561 L
4541 389 mt 4541 442 L
4328 4760 mt
(1982Q4) s
5153 4615 mt 5153 4561 L
5153 389 mt 5153 442 L
4940 4760 mt
(1987Q4) s
5765 4615 mt 5765 4561 L
5765 389 mt 5765 442 L
5552 4760 mt
(1992Q4) s
899 4514 mt 952 4514 L
6255 4514 mt 6201 4514 L
728 4558 mt
(-1) s
899 4050 mt 952 4050 L
6255 4050 mt 6201 4050 L
628 4094 mt
(-0.8) s
899 3585 mt 952 3585 L
6255 3585 mt 6201 3585 L
628 3629 mt
(-0.6) s
899 3121 mt 952 3121 L
6255 3121 mt 6201 3121 L
628 3165 mt
(-0.4) s
899 2657 mt 952 2657 L
6255 2657 mt 6201 2657 L
628 2701 mt
(-0.2) s
899 2193 mt 952 2193 L
6255 2193 mt 6201 2193 L
798 2237 mt
(0) s
899 1729 mt 952 1729 L
6255 1729 mt 6201 1729 L
698 1773 mt
(0.2) s
899 1264 mt 952 1264 L
6255 1264 mt 6201 1264 L
698 1308 mt
(0.4) s
899 800 mt 952 800 L
6255 800 mt 6201 800 L
698 844 mt
(0.6) s
899 4615 mt 6255 4615 L
899 389 mt 6255 389 L
899 4615 mt 899 389 L
6255 4615 mt 6255 389 L
gs 899 389 5357 4227 rc
31 12 31 676 30 -486 31 425 31 -1153 30 -555 31 -24 30 460
31 -265 31 -694 30 753 31 -407 30 230 31 -138 31 659 30 472
31 -400 30 -229 31 -107 31 -5 30 -479 31 615 30 -148 31 597
31 -50 30 -1070 31 679 30 77 31 493 31 524 30 -41 31 -1027
30 -141 31 214 31 3 30 -157 31 198 31 202 30 -681 31 411
30 -34 31 -120 31 4 30 -526 31 -11 30 275 31 1054 31 176
30 -1612 31 249 30 1174 31 -48 31 -535 30 609 31 364 30 -70
31 -1162 31 454 30 579 31 -638 30 210 31 -685 31 1139 30 -375
31 405 30 1063 31 -819 31 -1243 30 -191 31 54 31 182 30 -625
31 742 30 307 31 -138 31 18 30 -392 31 1208 30 -331 31 -617
31 -397 30 500 31 -129 30 650 31 -643 31 -39 30 -633 31 262
30 238 31 -119 31 581 30 -78 31 418 30 277 31 -272 31 -539
30 619 31 418 30 -911 31 -454 31 -270 30 -569 31 1089 30 -246
31 210 31 532 30 303 31 -230 31 -1012 30 156 31 -977 30 -216
31 452 31 -425 30 1663 31 -578 30 1117 31 122 31 -122 30 -108
31 399 30 22 31 -661 31 60 30 125 31 1128 30 -715 31 -50
31 -594 30 -469 31 153 30 287 31 -45 31 462 30 273 31 -89
30 -321 31 -421 31 -124 30 297 31 -159 31 -443 30 286 31 -229
30 -7 31 213 31 97 30 598 31 -556 30 -367 31 -95 31 391
30 -463 31 268 30 1060 31 -948 31 419 30 -89 31 566 30 -43
31 -678 31 -47 30 573 31 -23 30 604 31 -26 31 -643 30 409
31 293 30 -83 31 -665 31 510 30 -870 31 78 30 589 899 1359 176 MP stroke
DA
/c8 { 1.000000 0.000000 0.000000 sr} bdef
c8
31 299 31 88 30 -301 31 -716 31 -901 30 -729 31 -326 30 58
31 216 31 118 30 -42 31 10 30 279 31 615 31 724 30 429
31 -134 30 -602 31 -680 31 -328 30 199 31 505 30 392 31 -47
31 -388 30 -329 31 128 30 619 31 705 31 319 30 -296 31 -731
30 -703 31 -295 31 110 30 239 31 148 31 58 30 9 31 -102
30 -214 31 -260 31 -210 30 -6 31 321 30 534 31 380 31 -5
30 -274 31 -224 30 104 31 428 31 485 30 180 31 -257 30 -450
31 -305 31 -81 30 -35 31 -167 30 -196 31 70 31 490 30 719
31 565 30 27 31 -720 31 -1174 30 -1007 31 -337 31 317 30 581
31 483 30 286 31 215 31 247 30 237 31 72 30 -222 31 -387
31 -252 30 10 31 165 30 102 31 -128 31 -430 30 -519 31 -200
30 336 31 751 31 738 30 361 31 5 30 -129 31 -78 31 21
30 -17 31 -229 30 -555 31 -725 31 -612 30 -187 31 402 30 816
31 912 31 573 30 -19 31 -590 31 -942 30 -1036 31 -803 30 -229
31 441 31 900 30 1018 31 860 30 591 31 341 31 75 30 -227
31 -457 30 -466 31 -276 31 47 30 293 31 237 30 -104 31 -601
31 -861 30 -663 31 -72 30 568 31 886 31 685 30 148 31 -345
30 -547 31 -399 31 -134 30 44 31 18 31 -103 30 -176 31 -84
30 202 31 451 31 429 30 93 31 -293 30 -440 31 -292 31 4
30 245 31 322 30 302 31 230 31 111 30 -34 31 -158 30 -209
31 -178 31 15 30 223 31 310 30 298 31 226 31 58 30 -143
31 -200 30 -175 31 -115 31 -137 30 -250 31 -397 30 -514 899 2994 176 MP stroke
gr
c8
DA
0 sg
882 4658 mt
( ) s
6239 431 mt
( ) s
SO
1 sg
0 334 1903 0 0 -334 4293 783 4 MP
PP
-1903 0 0 334 1903 0 0 -334 4293 783 5 MP stroke
4 w
DO
SO
6 w
0 sg
4293 783 mt 6196 783 L
4293 449 mt 6196 449 L
4293 783 mt 4293 449 L
6196 783 mt 6196 449 L
4293 783 mt 6196 783 L
4293 783 mt 4293 449 L
4293 783 mt 6196 783 L
4293 449 mt 6196 449 L
4293 783 mt 4293 449 L
6196 783 mt 6196 449 L
4756 583 mt
(Stationary component of y) s
gs 4293 449 1904 335 rc
356 0 4364 540 2 MP stroke
gr
4756 734 mt
(Filtered y) s
gs 4293 449 1904 335 rc
DA
c8
356 0 4364 691 2 MP stroke
SO
gr
c8
end %%Color Dict
eplot
%%EndObject
epage
end
showpage
%%Trailer
%%EOF
doc/dynare.plots/BaxterKingFilter.jpg

434 KiB

doc/dynare.plots/BaxterKingFilter.png

252 KiB

%!PS-Adobe-3.0 EPSF-3.0
%%Creator: MATLAB, The MathWorks, Inc. Version 8.1.0.604 (R2013a). Operating System: Linux 3.10-3-amd64 #1 SMP Debian 3.10.11-1 (2013-09-10) x86_64.
%%Title: ../doc/dynare.plots/HPCycle.eps
%%CreationDate: 11/12/2013 18:12:56
%%DocumentNeededFonts: Helvetica
%%DocumentProcessColors: Cyan Magenta Yellow Black
%%LanguageLevel: 2
%%Pages: 1
%%BoundingBox: 70 213 561 591
%%EndComments
%%BeginProlog
% MathWorks dictionary
/MathWorks 160 dict begin
% definition operators
/bdef {bind def} bind def
/ldef {load def} bind def
/xdef {exch def} bdef
/xstore {exch store} bdef
% operator abbreviations
/c /clip ldef
/cc /concat ldef
/cp /closepath ldef
/gr /grestore ldef
/gs /gsave ldef
/mt /moveto ldef
/np /newpath ldef
/cm /currentmatrix ldef
/sm /setmatrix ldef
/rm /rmoveto ldef
/rl /rlineto ldef
/s {show newpath} bdef
/sc {setcmykcolor} bdef
/sr /setrgbcolor ldef
/sg /setgray ldef
/w /setlinewidth ldef
/j /setlinejoin ldef
/cap /setlinecap ldef
/rc {rectclip} bdef
/rf {rectfill} bdef
% page state control
/pgsv () def
/bpage {/pgsv save def} bdef
/epage {pgsv restore} bdef
/bplot /gsave ldef
/eplot {stroke grestore} bdef
% orientation switch
/portraitMode 0 def /landscapeMode 1 def /rotateMode 2 def
% coordinate system mappings
/dpi2point 0 def
% font control
/FontSize 0 def
/FMS {/FontSize xstore findfont [FontSize 0 0 FontSize neg 0 0]
makefont setfont} bdef
/reencode {exch dup where {pop load} {pop StandardEncoding} ifelse
exch dup 3 1 roll findfont dup length dict begin
{ 1 index /FID ne {def}{pop pop} ifelse } forall
/Encoding exch def currentdict end definefont pop} bdef
/isroman {findfont /CharStrings get /Agrave known} bdef
/FMSR {3 1 roll 1 index dup isroman {reencode} {pop pop} ifelse
exch FMS} bdef
/csm {1 dpi2point div -1 dpi2point div scale neg translate
dup landscapeMode eq {pop -90 rotate}
{rotateMode eq {90 rotate} if} ifelse} bdef
% line types: solid, dotted, dashed, dotdash
/SO { [] 0 setdash } bdef
/DO { [.5 dpi2point mul 4 dpi2point mul] 0 setdash } bdef
/DA { [6 dpi2point mul] 0 setdash } bdef
/DD { [.5 dpi2point mul 4 dpi2point mul 6 dpi2point mul 4
dpi2point mul] 0 setdash } bdef
% macros for lines and objects
/L {lineto stroke} bdef
/MP {3 1 roll moveto 1 sub {rlineto} repeat} bdef
/AP {{rlineto} repeat} bdef
/PDlw -1 def
/W {/PDlw currentlinewidth def setlinewidth} def
/PP {closepath eofill} bdef
/DP {closepath stroke} bdef
/MR {4 -2 roll moveto dup 0 exch rlineto exch 0 rlineto
neg 0 exch rlineto closepath} bdef
/FR {MR stroke} bdef
/PR {MR fill} bdef
/L1i {{currentfile picstr readhexstring pop} image} bdef
/tMatrix matrix def
/MakeOval {newpath tMatrix currentmatrix pop translate scale
0 0 1 0 360 arc tMatrix setmatrix} bdef
/FO {MakeOval stroke} bdef
/PO {MakeOval fill} bdef
/PD {currentlinewidth 2 div 0 360 arc fill
PDlw -1 eq not {PDlw w /PDlw -1 def} if} def
/FA {newpath tMatrix currentmatrix pop translate scale
0 0 1 5 -2 roll arc tMatrix setmatrix stroke} bdef
/PA {newpath tMatrix currentmatrix pop translate 0 0 moveto scale
0 0 1 5 -2 roll arc closepath tMatrix setmatrix fill} bdef
/FAn {newpath tMatrix currentmatrix pop translate scale
0 0 1 5 -2 roll arcn tMatrix setmatrix stroke} bdef
/PAn {newpath tMatrix currentmatrix pop translate 0 0 moveto scale
0 0 1 5 -2 roll arcn closepath tMatrix setmatrix fill} bdef
/vradius 0 def /hradius 0 def /lry 0 def
/lrx 0 def /uly 0 def /ulx 0 def /rad 0 def
/MRR {/vradius xdef /hradius xdef /lry xdef /lrx xdef /uly xdef
/ulx xdef newpath tMatrix currentmatrix pop ulx hradius add uly
vradius add translate hradius vradius scale 0 0 1 180 270 arc
tMatrix setmatrix lrx hradius sub uly vradius add translate
hradius vradius scale 0 0 1 270 360 arc tMatrix setmatrix
lrx hradius sub lry vradius sub translate hradius vradius scale
0 0 1 0 90 arc tMatrix setmatrix ulx hradius add lry vradius sub
translate hradius vradius scale 0 0 1 90 180 arc tMatrix setmatrix
closepath} bdef
/FRR {MRR stroke } bdef
/PRR {MRR fill } bdef
/MlrRR {/lry xdef /lrx xdef /uly xdef /ulx xdef /rad lry uly sub 2 div def
newpath tMatrix currentmatrix pop ulx rad add uly rad add translate
rad rad scale 0 0 1 90 270 arc tMatrix setmatrix lrx rad sub lry rad
sub translate rad rad scale 0 0 1 270 90 arc tMatrix setmatrix
closepath} bdef
/FlrRR {MlrRR stroke } bdef
/PlrRR {MlrRR fill } bdef
/MtbRR {/lry xdef /lrx xdef /uly xdef /ulx xdef /rad lrx ulx sub 2 div def
newpath tMatrix currentmatrix pop ulx rad add uly rad add translate
rad rad scale 0 0 1 180 360 arc tMatrix setmatrix lrx rad sub lry rad
sub translate rad rad scale 0 0 1 0 180 arc tMatrix setmatrix
closepath} bdef
/FtbRR {MtbRR stroke } bdef
/PtbRR {MtbRR fill } bdef
/stri 6 array def /dtri 6 array def
/smat 6 array def /dmat 6 array def
/tmat1 6 array def /tmat2 6 array def /dif 3 array def
/asub {/ind2 exch def /ind1 exch def dup dup
ind1 get exch ind2 get sub exch } bdef
/tri_to_matrix {
2 0 asub 3 1 asub 4 0 asub 5 1 asub
dup 0 get exch 1 get 7 -1 roll astore } bdef
/compute_transform {
dmat dtri tri_to_matrix tmat1 invertmatrix
smat stri tri_to_matrix tmat2 concatmatrix } bdef
/ds {stri astore pop} bdef
/dt {dtri astore pop} bdef
/db {2 copy /cols xdef /rows xdef mul dup 3 mul string
currentfile
3 index 0 eq {/ASCIIHexDecode filter}
{/ASCII85Decode filter 3 index 2 eq {/RunLengthDecode filter} if }
ifelse exch readstring pop
dup 0 3 index getinterval /rbmap xdef
dup 2 index dup getinterval /gbmap xdef
1 index dup 2 mul exch getinterval /bbmap xdef pop pop}bdef
/it {gs np dtri aload pop moveto lineto lineto cp c
cols rows 8 compute_transform
rbmap gbmap bbmap true 3 colorimage gr}bdef
/il {newpath moveto lineto stroke}bdef
currentdict end def
%%EndProlog
%%BeginSetup
MathWorks begin
0 cap
end
%%EndSetup
%%Page: 1 1
%%BeginPageSetup
%%PageBoundingBox: 70 213 561 591
MathWorks begin
bpage
%%EndPageSetup
%%BeginObject: obj1
bplot
/dpi2point 12 def
portraitMode 0216 7344 csm
628 247 5889 4541 rc
85 dict begin %Colortable dictionary
/c0 { 0.000000 0.000000 0.000000 sr} bdef
/c1 { 1.000000 1.000000 1.000000 sr} bdef
/c2 { 0.900000 0.000000 0.000000 sr} bdef
/c3 { 0.000000 0.820000 0.000000 sr} bdef
/c4 { 0.000000 0.000000 0.800000 sr} bdef
/c5 { 0.910000 0.820000 0.320000 sr} bdef
/c6 { 1.000000 0.260000 0.820000 sr} bdef
/c7 { 0.000000 0.820000 0.820000 sr} bdef
c0
1 j
1 sg
0 0 6913 5186 rf
6 w
0 4226 5356 0 0 -4226 899 4615 4 MP
PP
-5356 0 0 4226 5356 0 0 -4226 899 4615 5 MP stroke
4 w
DO
SO
6 w
0 sg
899 4615 mt 6255 4615 L
899 389 mt 6255 389 L
899 4615 mt 899 389 L
6255 4615 mt 6255 389 L
899 4615 mt 6255 4615 L
899 4615 mt 899 389 L
1410 4615 mt 1410 4561 L
1410 389 mt 1410 442 L
%%IncludeResource: font Helvetica
/Helvetica /ISOLatin1Encoding 120 FMSR
1197 4760 mt
(1954Q4) s
1948 4615 mt 1948 4561 L
1948 389 mt 1948 442 L
1735 4760 mt
(1959Q4) s
2486 4615 mt 2486 4561 L
2486 389 mt 2486 442 L
2273 4760 mt
(1964Q4) s
3025 4615 mt 3025 4561 L
3025 389 mt 3025 442 L
2812 4760 mt
(1969Q4) s
3563 4615 mt 3563 4561 L
3563 389 mt 3563 442 L
3350 4760 mt
(1974Q4) s
4101 4615 mt 4101 4561 L
4101 389 mt 4101 442 L
3888 4760 mt
(1979Q4) s
4640 4615 mt 4640 4561 L
4640 389 mt 4640 442 L
4427 4760 mt
(1984Q4) s
5178 4615 mt 5178 4561 L
5178 389 mt 5178 442 L
4965 4760 mt
(1989Q4) s
5716 4615 mt 5716 4561 L
5716 389 mt 5716 442 L
5503 4760 mt
(1994Q4) s
6255 4615 mt 6255 4561 L
6255 389 mt 6255 442 L
6042 4760 mt
(1999Q4) s
899 4405 mt 952 4405 L
6255 4405 mt 6201 4405 L
728 4449 mt
(-1) s
899 3725 mt 952 3725 L
6255 3725 mt 6201 3725 L
628 3769 mt
(-0.5) s
899 3045 mt 952 3045 L
6255 3045 mt 6201 3045 L
798 3089 mt
(0) s
899 2365 mt 952 2365 L
6255 2365 mt 6201 2365 L
698 2409 mt
(0.5) s
899 1686 mt 952 1686 L
6255 1686 mt 6201 1686 L
798 1730 mt
(1) s
899 1006 mt 952 1006 L
6255 1006 mt 6201 1006 L
698 1050 mt
(1.5) s
899 4615 mt 6255 4615 L
899 389 mt 6255 389 L
899 4615 mt 899 389 L
6255 4615 mt 6255 389 L
gs 899 389 5357 4227 rc
27 -628 27 -299 27 -259 27 -645 27 -168 27 101 27 -250 27 77
27 286 27 -83 27 -41 26 -264 27 164 27 -187 27 -2 27 389
27 139 27 73 27 47 27 -74 27 775 27 432 27 107 26 16
27 206 27 -135 27 -384 27 536 27 275 27 -35 27 253 27 -705
27 -338 27 327 27 -313 26 -59 27 130 27 376 27 33 27 -185
27 -424 27 551 27 -207 27 292 27 -122 27 119 26 -167 27 450
27 357 27 12 27 13 27 -619 27 96 27 -15 27 220 27 397
27 -173 27 -247 26 9 27 -37 27 171 27 -922 27 -31 27 462
27 -398 27 -372 27 176 27 -541 27 624 27 -315 26 -148 27 78
27 -174 27 127 27 35 27 -89 27 -182 27 -226 27 -159 27 82
27 296 26 -437 27 88 27 -339 27 370 27 358 27 -244 27 375
27 350 27 -303 27 -156 27 791 27 65 26 84 27 110 27 -28
27 -35 27 -270 27 10 27 302 27 -75 27 521 27 123 27 -561
27 -26 26 -212 27 133 27 420 27 -184 27 -487 27 -84 27 -272
27 42 27 -553 27 215 27 229 27 252 26 30 27 7 27 34
27 -234 27 18 27 -194 27 102 27 -15 27 -179 27 -85 27 -8
26 262 27 107 27 -154 27 -19 27 30 27 -99 27 -242 27 55
27 -125 27 -79 27 328 27 67 26 -281 27 173 27 153 27 -123
27 -125 27 37 27 48 27 549 27 285 27 575 27 676 27 -383
26 -282 27 -74 27 -184 27 -161 27 -16 27 202 27 -74 27 242
27 71 27 -164 27 -508 26 -168 27 82 27 18 27 -229 27 -205
27 -122 27 231 27 255 27 -365 27 -170 27 -298 27 221 26 -100
27 -268 27 113 27 -209 27 75 27 6 27 -259 27 739 27 222
27 -85 27 -120 27 136 26 -346 27 409 27 -167 27 -437 27 353
27 -144 27 33 27 -106 27 376 27 193 27 101 26 -27 899 3045 200 MP stroke
DA
/c8 { 1.000000 0.000000 0.000000 sr} bdef
c8
27 -1255 27 -568 27 -466 27 -1181 27 -220 27 293 27 -399 27 230
27 602 27 -147 27 -77 26 -514 27 305 27 -395 27 -39 27 691
27 166 27 20 27 -41 27 -274 27 1349 27 628 27 -19 26 -188
27 188 27 -462 27 -904 27 903 27 373 27 -225 27 342 27 -1487
27 -708 27 601 27 -642 26 -124 27 247 27 702 27 18 27 -401
27 -832 27 1062 27 -431 27 541 27 -273 27 204 26 -346 27 850
27 639 27 -42 27 -29 27 -1218 27 213 27 6 27 464 27 793
27 -320 27 -430 26 89 27 10 27 413 27 -1677 27 110 27 1048
27 -638 27 -554 27 515 27 -875 27 1380 27 -479 26 -146 27 287
27 -218 27 355 27 151 27 -103 27 -290 27 -375 27 -242 27 212
27 592 26 -849 27 174 27 -659 27 704 27 636 27 -555 27 641
27 552 27 -722 27 -410 27 1412 27 -39 26 5 27 57 27 -200
27 -192 27 -620 27 -44 27 526 27 -201 27 953 27 165 27 -1133
27 -47 26 -383 27 303 27 844 27 -340 27 -890 27 -77 27 -425
27 195 27 -945 27 564 27 562 27 576 26 123 27 70 27 114
27 -403 27 94 27 -318 27 258 27 18 27 -300 27 -110 27 37
26 545 27 214 27 -298 27 -35 27 52 27 -205 27 -476 27 103
27 -253 27 -167 27 608 27 68 26 -608 27 276 27 217 27 -328
27 -323 27 1 27 20 27 974 27 429 27 966 27 1117 27 -938
26 -688 27 -244 27 -424 27 -340 27 -30 27 401 27 -125 27 498
27 160 27 -280 27 -911 26 -208 27 286 27 156 27 -316 27 -254
27 -80 27 592 27 607 27 -607 27 -212 27 -453 27 548 26 -97
27 -422 27 312 27 -326 27 219 27 67 27 -449 27 1461 27 396
27 -217 27 -278 27 215 26 -718 27 746 27 -391 27 -892 27 652
27 -332 27 14 27 -255 27 668 27 283 27 88 26 -167 899 2718 200 MP stroke
gr
c8
DA
0 sg
882 4658 mt
( ) s
6239 431 mt
( ) s
SO
1 sg
0 334 1903 0 0 -334 4293 783 4 MP
PP
-1903 0 0 334 1903 0 0 -334 4293 783 5 MP stroke
4 w
DO
SO
6 w
0 sg
4293 783 mt 6196 783 L
4293 449 mt 6196 449 L
4293 783 mt 4293 449 L
6196 783 mt 6196 449 L
4293 783 mt 6196 783 L
4293 783 mt 4293 449 L
4293 783 mt 6196 783 L
4293 449 mt 6196 449 L
4293 783 mt 4293 449 L
6196 783 mt 6196 449 L
4756 583 mt
(Stationary component of y) s
gs 4293 449 1904 335 rc
356 0 4364 540 2 MP stroke
gr
4756 734 mt
(Filtered y) s
gs 4293 449 1904 335 rc
DA
c8
356 0 4364 691 2 MP stroke
SO
gr
c8
end %%Color Dict
eplot
%%EndObject
epage
end
showpage
%%Trailer
%%EOF
doc/dynare.plots/HPCycle.jpg

441 KiB

doc/dynare.plots/HPCycle.png

246 KiB

%!PS-Adobe-3.0 EPSF-3.0
%%Creator: MATLAB, The MathWorks, Inc. Version 8.1.0.604 (R2013a). Operating System: Linux 3.10-3-amd64 #1 SMP Debian 3.10.11-1 (2013-09-10) x86_64.
%%Title: ../doc/dynare.plots/HPTrend.eps
%%CreationDate: 11/12/2013 18:39:48
%%DocumentNeededFonts: Helvetica
%%DocumentProcessColors: Cyan Magenta Yellow Black
%%LanguageLevel: 2
%%Pages: 1
%%BoundingBox: 78 213 561 591
%%EndComments
%%BeginProlog
% MathWorks dictionary
/MathWorks 160 dict begin
% definition operators
/bdef {bind def} bind def
/ldef {load def} bind def
/xdef {exch def} bdef
/xstore {exch store} bdef
% operator abbreviations
/c /clip ldef
/cc /concat ldef
/cp /closepath ldef
/gr /grestore ldef
/gs /gsave ldef
/mt /moveto ldef
/np /newpath ldef
/cm /currentmatrix ldef
/sm /setmatrix ldef
/rm /rmoveto ldef
/rl /rlineto ldef
/s {show newpath} bdef
/sc {setcmykcolor} bdef
/sr /setrgbcolor ldef
/sg /setgray ldef
/w /setlinewidth ldef
/j /setlinejoin ldef
/cap /setlinecap ldef
/rc {rectclip} bdef
/rf {rectfill} bdef
% page state control
/pgsv () def
/bpage {/pgsv save def} bdef
/epage {pgsv restore} bdef
/bplot /gsave ldef
/eplot {stroke grestore} bdef
% orientation switch
/portraitMode 0 def /landscapeMode 1 def /rotateMode 2 def
% coordinate system mappings
/dpi2point 0 def
% font control
/FontSize 0 def
/FMS {/FontSize xstore findfont [FontSize 0 0 FontSize neg 0 0]
makefont setfont} bdef
/reencode {exch dup where {pop load} {pop StandardEncoding} ifelse
exch dup 3 1 roll findfont dup length dict begin
{ 1 index /FID ne {def}{pop pop} ifelse } forall
/Encoding exch def currentdict end definefont pop} bdef
/isroman {findfont /CharStrings get /Agrave known} bdef
/FMSR {3 1 roll 1 index dup isroman {reencode} {pop pop} ifelse
exch FMS} bdef
/csm {1 dpi2point div -1 dpi2point div scale neg translate
dup landscapeMode eq {pop -90 rotate}
{rotateMode eq {90 rotate} if} ifelse} bdef
% line types: solid, dotted, dashed, dotdash
/SO { [] 0 setdash } bdef
/DO { [.5 dpi2point mul 4 dpi2point mul] 0 setdash } bdef
/DA { [6 dpi2point mul] 0 setdash } bdef
/DD { [.5 dpi2point mul 4 dpi2point mul 6 dpi2point mul 4
dpi2point mul] 0 setdash } bdef
% macros for lines and objects
/L {lineto stroke} bdef
/MP {3 1 roll moveto 1 sub {rlineto} repeat} bdef
/AP {{rlineto} repeat} bdef
/PDlw -1 def
/W {/PDlw currentlinewidth def setlinewidth} def
/PP {closepath eofill} bdef
/DP {closepath stroke} bdef
/MR {4 -2 roll moveto dup 0 exch rlineto exch 0 rlineto
neg 0 exch rlineto closepath} bdef
/FR {MR stroke} bdef
/PR {MR fill} bdef
/L1i {{currentfile picstr readhexstring pop} image} bdef
/tMatrix matrix def
/MakeOval {newpath tMatrix currentmatrix pop translate scale
0 0 1 0 360 arc tMatrix setmatrix} bdef
/FO {MakeOval stroke} bdef
/PO {MakeOval fill} bdef
/PD {currentlinewidth 2 div 0 360 arc fill
PDlw -1 eq not {PDlw w /PDlw -1 def} if} def
/FA {newpath tMatrix currentmatrix pop translate scale
0 0 1 5 -2 roll arc tMatrix setmatrix stroke} bdef
/PA {newpath tMatrix currentmatrix pop translate 0 0 moveto scale
0 0 1 5 -2 roll arc closepath tMatrix setmatrix fill} bdef
/FAn {newpath tMatrix currentmatrix pop translate scale
0 0 1 5 -2 roll arcn tMatrix setmatrix stroke} bdef
/PAn {newpath tMatrix currentmatrix pop translate 0 0 moveto scale
0 0 1 5 -2 roll arcn closepath tMatrix setmatrix fill} bdef
/vradius 0 def /hradius 0 def /lry 0 def
/lrx 0 def /uly 0 def /ulx 0 def /rad 0 def
/MRR {/vradius xdef /hradius xdef /lry xdef /lrx xdef /uly xdef
/ulx xdef newpath tMatrix currentmatrix pop ulx hradius add uly
vradius add translate hradius vradius scale 0 0 1 180 270 arc
tMatrix setmatrix lrx hradius sub uly vradius add translate
hradius vradius scale 0 0 1 270 360 arc tMatrix setmatrix
lrx hradius sub lry vradius sub translate hradius vradius scale
0 0 1 0 90 arc tMatrix setmatrix ulx hradius add lry vradius sub
translate hradius vradius scale 0 0 1 90 180 arc tMatrix setmatrix
closepath} bdef
/FRR {MRR stroke } bdef
/PRR {MRR fill } bdef
/MlrRR {/lry xdef /lrx xdef /uly xdef /ulx xdef /rad lry uly sub 2 div def
newpath tMatrix currentmatrix pop ulx rad add uly rad add translate
rad rad scale 0 0 1 90 270 arc tMatrix setmatrix lrx rad sub lry rad
sub translate rad rad scale 0 0 1 270 90 arc tMatrix setmatrix
closepath} bdef
/FlrRR {MlrRR stroke } bdef
/PlrRR {MlrRR fill } bdef
/MtbRR {/lry xdef /lrx xdef /uly xdef /ulx xdef /rad lrx ulx sub 2 div def
newpath tMatrix currentmatrix pop ulx rad add uly rad add translate
rad rad scale 0 0 1 180 360 arc tMatrix setmatrix lrx rad sub lry rad
sub translate rad rad scale 0 0 1 0 180 arc tMatrix setmatrix
closepath} bdef
/FtbRR {MtbRR stroke } bdef
/PtbRR {MtbRR fill } bdef
/stri 6 array def /dtri 6 array def
/smat 6 array def /dmat 6 array def
/tmat1 6 array def /tmat2 6 array def /dif 3 array def
/asub {/ind2 exch def /ind1 exch def dup dup
ind1 get exch ind2 get sub exch } bdef
/tri_to_matrix {
2 0 asub 3 1 asub 4 0 asub 5 1 asub
dup 0 get exch 1 get 7 -1 roll astore } bdef
/compute_transform {
dmat dtri tri_to_matrix tmat1 invertmatrix
smat stri tri_to_matrix tmat2 concatmatrix } bdef
/ds {stri astore pop} bdef
/dt {dtri astore pop} bdef
/db {2 copy /cols xdef /rows xdef mul dup 3 mul string
currentfile
3 index 0 eq {/ASCIIHexDecode filter}
{/ASCII85Decode filter 3 index 2 eq {/RunLengthDecode filter} if }
ifelse exch readstring pop
dup 0 3 index getinterval /rbmap xdef
dup 2 index dup getinterval /gbmap xdef
1 index dup 2 mul exch getinterval /bbmap xdef pop pop}bdef
/it {gs np dtri aload pop moveto lineto lineto cp c
cols rows 8 compute_transform
rbmap gbmap bbmap true 3 colorimage gr}bdef
/il {newpath moveto lineto stroke}bdef
currentdict end def
%%EndProlog
%%BeginSetup
MathWorks begin
0 cap
end
%%EndSetup
%%Page: 1 1
%%BeginPageSetup
%%PageBoundingBox: 78 213 561 591
MathWorks begin
bpage
%%EndPageSetup
%%BeginObject: obj1
bplot
/dpi2point 12 def
portraitMode 0216 7344 csm
731 247 5786 4541 rc
85 dict begin %Colortable dictionary
/c0 { 0.000000 0.000000 0.000000 sr} bdef
/c1 { 1.000000 1.000000 1.000000 sr} bdef
/c2 { 0.900000 0.000000 0.000000 sr} bdef
/c3 { 0.000000 0.820000 0.000000 sr} bdef
/c4 { 0.000000 0.000000 0.800000 sr} bdef
/c5 { 0.910000 0.820000 0.320000 sr} bdef
/c6 { 1.000000 0.260000 0.820000 sr} bdef
/c7 { 0.000000 0.820000 0.820000 sr} bdef
c0
1 j
1 sg
0 0 6913 5186 rf
6 w
0 4226 5356 0 0 -4226 899 4615 4 MP
PP
-5356 0 0 4226 5356 0 0 -4226 899 4615 5 MP stroke
4 w
DO
SO
6 w
0 sg
899 4615 mt 6255 4615 L
899 389 mt 6255 389 L
899 4615 mt 899 389 L
6255 4615 mt 6255 389 L
899 4615 mt 6255 4615 L
899 4615 mt 899 389 L
1410 4615 mt 1410 4561 L
1410 389 mt 1410 442 L
%%IncludeResource: font Helvetica
/Helvetica /ISOLatin1Encoding 120 FMSR
1197 4760 mt
(1954Q4) s
1948 4615 mt 1948 4561 L
1948 389 mt 1948 442 L
1735 4760 mt
(1959Q4) s
2486 4615 mt 2486 4561 L
2486 389 mt 2486 442 L
2273 4760 mt
(1964Q4) s
3025 4615 mt 3025 4561 L
3025 389 mt 3025 442 L
2812 4760 mt
(1969Q4) s
3563 4615 mt 3563 4561 L
3563 389 mt 3563 442 L
3350 4760 mt
(1974Q4) s
4101 4615 mt 4101 4561 L
4101 389 mt 4101 442 L
3888 4760 mt
(1979Q4) s
4640 4615 mt 4640 4561 L
4640 389 mt 4640 442 L
4427 4760 mt
(1984Q4) s
5178 4615 mt 5178 4561 L
5178 389 mt 5178 442 L
4965 4760 mt
(1989Q4) s
5716 4615 mt 5716 4561 L
5716 389 mt 5716 442 L
5503 4760 mt
(1994Q4) s
6255 4615 mt 6255 4561 L
6255 389 mt 6255 442 L
6042 4760 mt
(1999Q4) s
899 3776 mt 952 3776 L
6255 3776 mt 6201 3776 L
798 3820 mt
(5) s
899 2921 mt 952 2921 L
6255 2921 mt 6201 2921 L
731 2965 mt
(10) s
899 2067 mt 952 2067 L
6255 2067 mt 6201 2067 L
731 2111 mt
(15) s
899 1212 mt 952 1212 L
6255 1212 mt 6201 1212 L
731 1256 mt
(20) s
899 4615 mt 6255 4615 L
899 389 mt 6255 389 L
899 4615 mt 899 389 L
6255 4615 mt 6255 389 L
gs 899 389 5357 4227 rc
27 -29 27 -16 27 -32 27 -21 27 59 27 -35 27 18 27 -24
27 -16 27 -14 27 67 26 -83 27 -31 27 -48 27 -116 27 11
27 -38 27 -42 27 30 27 8 27 19 27 -25 27 -16 26 -75
27 -2 27 -16 27 8 27 -41 27 -29 27 50 27 -10 27 -38
27 -39 27 -13 27 -49 26 6 27 3 27 21 27 -22 27 -25
27 -14 27 34 27 0 27 -53 27 -9 27 -18 26 -87 27 -53
27 -15 27 -28 27 -54 27 -28 27 -28 27 -14 27 41 27 50
27 -12 27 -73 26 50 27 50 27 -44 27 8 27 -24 27 25
27 -42 27 -15 27 3 27 -21 27 -6 27 -74 26 -23 27 -39
27 -42 27 -47 27 -20 27 -18 27 -10 27 31 27 -54 27 -38
27 -44 26 29 27 -49 27 10 27 -38 27 -51 27 -30 27 -57
27 -7 27 2 27 -11 27 20 27 -44 26 -88 27 -39 27 -5
27 10 27 12 27 -26 27 3 27 -78 27 -23 27 -39 27 -57
27 -10 26 38 27 0 27 -66 27 1 27 -9 27 1 27 -27
27 -65 27 -12 27 -27 27 20 27 -41 26 -22 27 -20 27 27
27 -4 27 23 27 -43 27 -28 27 8 27 -16 27 -25 27 19
26 25 27 -104 27 -17 27 -14 27 -8 27 -4 27 -6 27 -35
27 -11 27 -25 27 -41 27 -32 26 -42 27 -36 27 -59 27 -73
27 5 27 -7 27 12 27 -29 27 59 27 -66 27 -75 27 -15
26 -23 27 -52 27 5 27 -54 27 -39 27 -47 27 9 27 13
27 -46 27 -9 27 -78 26 -21 27 -18 27 -55 27 -68 27 -25
27 -37 27 -22 27 -65 27 -29 27 -28 27 22 27 -5 26 -24
27 44 27 -70 27 31 27 -44 27 -17 27 -58 27 -28 27 -68
27 -50 27 -46 27 -56 26 -36 27 3 27 -13 27 -61 27 -50
27 -43 27 -56 27 14 27 -19 27 3 27 -5 26 -50 899 4592 200 MP stroke
DA
/c8 { 1.000000 0.000000 0.000000 sr} bdef
c8
27 -13 27 -13 27 -12 27 -13 27 -13 27 -13 27 -14 27 -15
27 -15 27 -16 27 -17 26 -18 27 -19 27 -20 27 -20 27 -21
27 -21 27 -20 27 -20 27 -20 27 -19 27 -19 27 -19 26 -18
27 -18 27 -17 27 -17 27 -17 27 -16 27 -16 27 -15 27 -15
27 -15 27 -15 27 -15 26 -14 27 -15 27 -15 27 -15 27 -15
27 -16 27 -17 27 -17 27 -18 27 -19 27 -19 26 -20 27 -20
27 -20 27 -20 27 -18 27 -18 27 -16 27 -15 27 -13 27 -12
27 -10 27 -10 26 -9 27 -8 27 -8 27 -8 27 -9 27 -10
27 -10 27 -12 27 -13 27 -14 27 -16 27 -17 26 -18 27 -20
27 -20 27 -22 27 -22 27 -22 27 -23 27 -24 27 -23 27 -25
27 -24 26 -24 27 -25 27 -25 27 -25 27 -25 27 -25 27 -25
27 -25 27 -25 27 -25 27 -24 27 -25 26 -24 27 -24 27 -24
27 -24 27 -23 27 -24 27 -23 27 -23 27 -23 27 -22 27 -23
27 -21 26 -21 27 -21 27 -20 27 -20 27 -19 27 -18 27 -18
27 -18 27 -17 27 -16 27 -15 27 -15 26 -14 27 -13 27 -12
27 -12 27 -12 27 -11 27 -12 27 -11 27 -12 27 -12 27 -12
26 -13 27 -14 27 -15 27 -16 27 -16 27 -17 27 -19 27 -19
27 -21 27 -21 27 -23 27 -24 26 -24 27 -25 27 -25 27 -26
27 -25 27 -26 27 -25 27 -26 27 -26 27 -26 27 -26 27 -27
26 -27 27 -28 27 -28 27 -28 27 -28 27 -29 27 -28 27 -29
27 -30 27 -30 27 -30 26 -30 27 -31 27 -31 27 -30 27 -30
27 -30 27 -29 27 -29 27 -28 27 -26 27 -27 27 -25 26 -26
27 -25 27 -26 27 -26 27 -27 27 -28 27 -29 27 -31 27 -31
27 -33 27 -33 27 -34 26 -35 27 -35 27 -35 27 -36 27 -36
27 -36 27 -35 27 -36 27 -35 27 -35 27 -35 26 -36 899 4615 200 MP stroke
gr
c8
DA
0 sg
882 4658 mt
( ) s
6239 431 mt
( ) s
SO
1 sg
0 334 2103 0 0 -334 4092 783 4 MP
PP
-2103 0 0 334 2103 0 0 -334 4092 783 5 MP stroke
4 w
DO
SO
6 w
0 sg
4092 783 mt 6195 783 L
4092 449 mt 6195 449 L
4092 783 mt 4092 449 L
6195 783 mt 6195 449 L
4092 783 mt 6195 783 L
4092 783 mt 4092 449 L
4092 783 mt 6195 783 L
4092 449 mt 6195 449 L
4092 783 mt 4092 449 L
6195 783 mt 6195 449 L
4555 583 mt
(Nonstationary component of y) s
gs 4092 449 2104 335 rc
356 0 4163 540 2 MP stroke
gr
4555 734 mt
(Estimated trend of y) s
gs 4092 449 2104 335 rc
DA
c8
356 0 4163 691 2 MP stroke
SO
gr
c8
end %%Color Dict
eplot
%%EndObject
epage
end
showpage
%%Trailer
%%EOF
doc/dynare.plots/HPTrend.jpg

175 KiB

doc/dynare.plots/HPTrend.png

126 KiB

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 @@
\documentclass[12pt,a4paper]{article}
\usepackage{amssymb,amsmath}
\usepackage[dvips]{graphicx}
\usepackage{natbib}
\usepackage{psfrag}
\usepackage{setspace}
\usepackage{rotating}
\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)
%\onehalfspacing (interlinea 1,5)
%\doublespacing (interlinea doppia)
\usepackage{doi,natbib}
%\bibpunct{(}{)}{;}{a}{,}{,}
......@@ -22,19 +22,19 @@
\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
this document under the terms of the GNU Free Documentation
License, Version 1.3 or any later version published by the Free
Software Foundation; with no Invariant Sections, no Front-Cover
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\\
European Commission, Joint Research Centre \\
TP361, IPSC, \\21027 Ispra
TP581\\21027 Ispra
(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,
Alessandro Rossi, Frank Schorfheide and the participants to the
Courses on Global Sensitivity Analysis for Macroeconomic
......@@ -52,10 +52,10 @@ helpful suggestions.}}
%-----------------------------------------------------------------------
\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
sensitivity analysis. The routines are thought to be used within
the DYNARE v4 environment.
the Dynare 6 environment.
\begin{description}
......@@ -66,7 +66,7 @@ the DYNARE v4 environment.
\newpage
% ----------------------------------------------------------------
\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)
Which is the domain of structural coefficients assuring the
stability and determinacy of a DSGE model? (ii) Which parameters
......@@ -81,20 +81,18 @@ described in \cite{Ratto_CompEcon_2008}.
\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:
\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
next section.
With respect to the previous version of the toolbox, in order to
work properly, the sensitivity analysis Toolbox \emph{no longer}
needs that the DYNARE estimation environment is set-up.
Therefore, \verb"dynare_sensitivity" is the only command to run to
In order to work properly, the sensitivity analysis Toolbox does not need
a Dynare estimation environment to be set up. Rather, \verb"sensitivity"
is the only command to run to
make a sensitivity analysis on a DSGE model\footnote{Of course,
when the user needs to perform the mapping of the fit with a
posterior sample, a Bayesian estimation has to be performed
......@@ -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
ML estimation is done (i.e. no Bayesian estimation);
\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.
\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
\verb"dynare_sensitivity" command also allows to indicate some
options of \verb"dynare_estimation". These are:
\verb"sensitivity" command also allows to indicate some
options of \verb"estimation". These are:
\begin{itemize}
\item \verb"datafile"
\item \verb"diffuse_filter"
\item \verb"mode_file"
\item \verb"first_obs"
\item \verb"lik_init"
......@@ -278,10 +277,10 @@ identifiable.
\end{tabular}
\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}
\noindent\verb"dynare_sensitivity(identification=1, morris=2);"
\noindent\verb"sensitivity(identification=1, morris=2);"
\vspace{1cm}
\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
computer. The Toolbox uses a dedicated folder called \verb"GSA",
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.
\subsection{Binary data files}
A set of binary data files is saved in the \verb"GSA" folder:
\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
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
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,
i.e. \verb"ppost=1".
\end{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,
generated when doing RMSE analysis (\verb"pprior=1" and
\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
sample, generated when doing RMSE analysis (\verb"pprior=0" and
\verb"ppost=0").
\end{description}
\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:
\begin{description}
\item[]\verb"<DYNARE_file>_prior_stab_SA_*.fig": plots of the Smirnov
test analyses confronting the cdf of the sample fulfilling
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
test analyses confronting the cdf of the sample producing
indeterminacy with the cdf of the original prior sample;
\item[]\verb"<DYNARE_file>_prior_stab_unst_SA_*.fig": plots of the Smirnov
test analyses confronting the cdf of the sample producing unstable
(explosive roots) behaviour with the cdf of the original prior
\item[]\verb"<Dynare_file>_prior_stab_SA_*.fig": plots of the Smirnov
test analyses confronting the CDF of the sample fulfilling
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
test analyses confronting the CDF of the sample producing
indeterminacy with the CDF of the original prior sample;
\item[]\verb"<Dynare_file>_prior_stab_unst_SA_*.fig": plots of the Smirnov
test analyses confronting the CDF of the sample producing unstable
(explosive roots) behaviour with the CDF of the original prior
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
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;
\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;
\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
solutions, i.e. either instability or indeterminacy or the
solution could not be found (e.g. the steady state solution could
not be found by the solver).
\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.
\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.
\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;
\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;
\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.
\end{description}
......@@ -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
normal and posterior):
\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;
\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;
\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,
when the correlation is significant;
\item[]\verb"<DYNARE_file>_rmse_prior_lnlik*.fig": for each observed
series, plots \emph{in red} the cdf of the log-likelihood
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
\item[]\verb"<Dynare_file>_rmse_prior_lnlik*.fig": for each observed
series, plots \emph{in red} the CDF of the log-likelihood
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
sample; this allows to see the presence of some idiosyncratic
behaviour;
\item[]\verb"<DYNARE_file>_rmse_prior_lnpost*.fig": for each observed
series, plots \emph{in red} the cdf of the log-posterior
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
\item[]\verb"<Dynare_file>_rmse_prior_lnpost*.fig": for each observed
series, plots \emph{in red} the CDF of the log-posterior
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
sample; this allows to see idiosyncratic behaviour;
\item[]\verb"<DYNARE_file>_rmse_prior_lnprior*.fig": for each observed
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
the sample and \emph{in blue }the cdf of the full sample; this
\item[]\verb"<Dynare_file>_rmse_prior_lnprior*.fig": for each observed
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
the sample and \emph{in blue }the CDF of the full sample; this
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
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
of the best 10\% log-posterior values.
\end{description}
......@@ -405,19 +404,19 @@ In the case of the mapping of the reduced form solution, synthetic
figures are saved in the \verb"\GSA" folder:
\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
important} parameters driving the reduced form coefficients of the
selected endogenous variables (\verb"namendo") versus lagged
endogenous variables (\verb"namlagendo"); suffix \verb"log"
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
important} parameters driving the reduced form coefficients of the
selected endogenous variables (\verb"namendo") versus exogenous
variables (\verb"namexo"); suffix \verb"log" indicates the results
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
parameters that have a minor effect for \emph{any} of the reduced
form coefficients,
......@@ -449,24 +448,24 @@ without the need of any user's intervention.
\subsection{Screening analysis}
The results of the screening analysis with Morris sampling design
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.).
Screening analysis merely concerns reduced form coefficients.
Similar synthetic bar charts as for the reduced form analysis with
MC samples are saved:
\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
most important} parameters driving the reduced form coefficients
of the selected endogenous variables (\verb"namendo") versus
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
most important} parameters driving the reduced form coefficients
of the selected endogenous variables (\verb"namendo") versus
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
identify parameters that have a minor effect for \emph{any} of the
reduced form coefficients.
......
@ARTICLE{Ratto_CompEcon_2008,
author = {Ratto, M.},
title = {Analysing DSGE Models with Global Sensitivity Analysis},
% Encoding: UTF-8
@Article{Ratto_CompEcon_2008,
author = {Ratto, Marco},
journal = {Computational Economics},
title = {Analysing {DSGE} models with global sensitivity analysis},
year = {2008},
volume = {31},
pages = {115--139},
volume = {31},
doi = {10.1007/s10614-007-9110-6},
}
@ARTICLE{Iskrev2010,
@Article{Iskrev2010,
author = {Nikolay Iskrev},
title = {Local Identification in {DSGE} Models},
journal = {Journal of Monetary Economics},
title = {Local Identification in {DSGE} Models},
year = {2010},
number = {2},
pages = {189-202},
volume = {57},
pages = {189-202}
doi = {10.1016/j.jmoneco.2009.12.007},
}
@UNPUBLISHED{Iskrev2011,
......@@ -23,3 +28,5 @@
note = {mimeo},
year = {2011}
}
@Comment{jabref-meta: databaseType:bibtex;}