# Learning about Empirical DSGE Analysis

**URL:** <https://forum.dynare.org/t/learning-about-empirical-dsge-analysis/15916>\
**Category:** ML/Bayesian estimation\
**Created:** [26 May 2020 20:56 UTC](https://forum.dynare.org/t/learning-about-empirical-dsge-analysis/15916 "2020-05-26T20:56:43Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Max1](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/e99b99/32.png) [@Max1](https://forum.dynare.org/u/Max1)\
**Post date:** [26 May 2020 20:56 UTC](https://forum.dynare.org/t/learning-about-empirical-dsge-analysis/15916/1 "2020-05-26T20:56:44Z")

</div>

Hey Community,

in the upcoming weeks I would like to invest my time to learn as much as I can about “empirical DSGEs”.

I know that there is already a lot of literature writen about the estimation of DSGE models and related empirical applications, e.g. Smets & Wouters (2003, 2007); An & Schorfheide (2007); the Handbook Chapters in the _Handbook of Macroeconomics_ of Lindé et al. (2016) and Fernández-Villaverde et al. (2016) as well as the Chapter of Del Negro & Schorfheide (2013) in the _Handbook of Economic Forecasting_.

To understand this empirical literature I have to study a lot.  
This brings me to the question of whether there is a path of least resistance?

What would be the necessary study plan to start with before I can replicate the first empirical paper?

I would like to focus on _bayesian estimation of DSGE models_ in the first step.

Fortunately, I have a modest understanding of bayesian statistics as well as DSGE models, but ironically I have no clue when it comes to the combination of both.

It would be nice, if someone could outline a path of least resistance like a series of introductory material which introduces me into this field.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [27 May 2020 14:41 UTC](https://forum.dynare.org/t/learning-about-empirical-dsge-analysis/15916/2 "2020-05-27T14:41:01Z")

</div>

I would start with a textbook like [https://web.sas.upenn.edu/schorf/companion-web-site-bayesian-estimation-of-dsge-models/](https://web.sas.upenn.edu/schorf/companion-web-site-bayesian-estimation-of-dsge-models/)

---

<div class="post-metadata">

**Author:** ![cmarch](https://forum.dynare.org/user_avatar/forum.dynare.org/cmarch/32/7827_2.png) [@cmarch](https://forum.dynare.org/u/cmarch)\
**Post date:** [27 May 2020 16:31 UTC](https://forum.dynare.org/t/learning-about-empirical-dsge-analysis/15916/3 "2020-05-27T16:31:13Z")

</div>

Hi Max1,

I can suggest you read

> **[The econometrics of DSGE models](https://link.springer.com/article/10.1007/s13209-009-0014-7)**
>
> In this paper, I review the literature on the formulation and estimation of dynamic stochastic general equilibrium (DSGE) models with a special emphasis on Bayesian methods. First, I discuss the evolution of DSGE models over the last couple of...

  
before reading Fernández-Villaverde et al. (2016) , which is a bit more technical 🙂

---

<div class="post-metadata">

**Author:** ![Max1](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/e99b99/32.png) [@Max1](https://forum.dynare.org/u/Max1)\
**Post date:** [30 May 2020 09:22 UTC](https://forum.dynare.org/t/learning-about-empirical-dsge-analysis/15916/4 "2020-05-30T09:22:19Z")

</div>

@jpfeifer and @cmarch: Thanks for the recommendations.

I already started reading the textbook of Herbst & Schorfheide.  
Is there any supplementary material in existence to facilitate the derivations of some of the equations in this textbook? I already noticed that there is an additional document with corrections.

For example, I would like to know the exact formulas for the matrices in equation 2.4.

---

<div class="post-metadata">

**Author:** ![Max1](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/e99b99/32.png) [@Max1](https://forum.dynare.org/u/Max1)\
**Post date:** [30 May 2020 11:02 UTC](https://forum.dynare.org/t/learning-about-empirical-dsge-analysis/15916/5 "2020-05-30T11:02:07Z")

</div>

I also have a question whether there is a document with corrections for the Sims (2002) paper?

Since the textbook of Herbst & Schorfheide relies on the Sims (2002) solution method, I tried to cast the model mentioned there into the canonical form \Gamma\_0 y\_t = \Gamma\_1y\_{t-1} + C + \Psi z\_t + \Pi \eta\_t.  
By doing so, I wasted some hours because the solutions for the matrices mentioned by Sims (2002) in equation (4) are wrong and the definition of \eta\_t is missing.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [30 May 2020 12:20 UTC](https://forum.dynare.org/t/learning-about-empirical-dsge-analysis/15916/6 "2020-05-30T12:20:43Z")

</div>

1. I don’t have the book with me. Could you post a photo of the equation.
2. AFAIK, there is no correction available for the Sims-paper.

---

<div class="post-metadata">

**Author:** ![Max1](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/e99b99/32.png) [@Max1](https://forum.dynare.org/u/Max1)\
**Post date:** [30 May 2020 12:48 UTC](https://forum.dynare.org/t/learning-about-empirical-dsge-analysis/15916/7 "2020-05-30T12:48:33Z")

</div>

1. I have attached the required screenshots of Herbst & Schorfheide. ![Pic 1](https://forum.dynare.org/uploads/default/original/2X/d/dbe1e282ccb660174651ced14b8fe92200e5e142.png) ![Pic 2](https://forum.dynare.org/uploads/default/original/2X/d/df25a2499d0dd6a4c929f1245ef843e70258bb7e.png)  
 ![Pic3](https://forum.dynare.org/uploads/default/original/2X/4/422c6d9b5c065fa3d1a30f205c81c6fb5cfc415b.png)
2. I will upload my solution for equation (4) in Sims (2002) by the end of today.  
It would be nice if someone could doublecheck it.

---

<div class="post-metadata">

**Author:** ![Max1](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/e99b99/32.png) [@Max1](https://forum.dynare.org/u/Max1)\
**Post date:** [30 May 2020 18:43 UTC](https://forum.dynare.org/t/learning-about-empirical-dsge-analysis/15916/8 "2020-05-30T18:43:46Z")

</div>

Here is my solution for the canonical form of the example model used by Sims (2002).  
[document.pdf](https://forum.dynare.org/uploads/short-url/e9jLZ8cPzvkBlv8YKzg4DVJm54l.pdf) (72.9 KB)

Here is a screenshot of the solution from Sims (2002) where I highlight the discrepancies between the solutions.

 ![Sims 2002 - Kopie](https://forum.dynare.org/uploads/default/original/2X/c/ccb50bfa2d896f63dea9612d013b91b72942885e.jpeg)  
Pleas let me know, if you agree or disagree with my solution.  
For me the definition of \eta\_2(t) = E\_t W(t+1) - E\_{t-1}W(t+1) looks strange.

---

<div class="post-metadata">

**Author:** ![Max1](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/e99b99/32.png) [@Max1](https://forum.dynare.org/u/Max1)\
**Post date:** [31 May 2020 10:36 UTC](https://forum.dynare.org/t/learning-about-empirical-dsge-analysis/15916/9 "2020-05-31T10:36:43Z")

</div>

Here is my solution for the canonical form of the small-scale DSGE in Herbst&Schorfheide (2015) [equation (2.4)]  
[Herbst&Schorfheide eq. 2.4.pdf](https://forum.dynare.org/uploads/short-url/8ETt5PiaNxPRRBGtwymwQaXCJfj.pdf) (81.3 KB)

---

<div class="post-metadata">

**Author:** ![Max1](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/e99b99/32.png) [@Max1](https://forum.dynare.org/u/Max1)\
**Post date:** [1 June 2020 13:23 UTC](https://forum.dynare.org/t/learning-about-empirical-dsge-analysis/15916/10 "2020-06-01T13:23:10Z")

</div>

Can somebody help me out with the derivation of equation (2.10) in Herbst & Schorfheide (2015)?

The question is:  
How to cast the canonical form

\begin{align}\Gamma\_0 s\_t = \Gamma\_1 s\_{t-1}+\Psi \epsilon\_t+\Pi\eta\_t\end{align}

into the VAR(1) representation of the DSGE?

\begin{align}s\_t = \Phi\_1(\theta) s\_{t-1}+\Phi\_\epsilon(\theta) \epsilon\_t\end{align}

I can follow the argumentation until we arrive at the point:  
\begin{align}\begin{pmatrix}\Lambda\_{11}&\Lambda\_{12}\\0&\Lambda\_{22}\end{pmatrix}\begin{pmatrix}w\_{1,t}\\w\_{2,t}\end{pmatrix} = \begin{pmatrix}\Omega\_{11}&\Omega\_{12}\\0&\Omega\_{22}\end{pmatrix}\begin{pmatrix}w\_{1,t-1}\\w\_{2,t-1}\end{pmatrix}+\begin{pmatrix}Q\_1\\Q\_2\end{pmatrix}\left(\Psi \epsilon\_t+\Pi\eta\_t\right)\end{align}  
where we apply generalized Schur.

Now, we should reorder the eigenvalues such that the lower subsystem depends on the instable eigenvalues. Overall stability requires that w\_{2,t}=0 \forall t.  
As far as I understand having a unique stabel solution is equivalent to w\_{2,0}=0 and \eta\_t = -{(Q\_2\Pi)}^{-1}Q\_2\Psi\epsilon\_t.

Now we reach the point, where I got lost. I already looked up Lubik & Schorfheide (2003) and Sims (2002) to see it they can help me out, but his attempt was not successful.

I am confused by the following sentence in Herbst&Schorfheide (2015, p.19):

> The overall set of nonexplosive solutions (if it is nonempty) to the linear rational expectations system (2.4) can be obtained from s\_t = Z w\_t, (2.7), and (2.9). If the system has  
> a unique stable solution, then it can be written as a VAR in s\_t:

If I think about this sentence, then I would expect that the sunspot shock \zeta\_t shows up in the solution. But this is not the case in eq. (2.10).

Can I ignore this sentence and derive the VAR(1) representation by plugging  
w\_{2,t}=0 and \eta\_t = -{(Q\_2\Pi)}^{-1}Q\_2\Psi\epsilon\_t into the upper subsystem?

I attach two screenshots such that you know what I am talking about.

 ![18 - Kopie](https://forum.dynare.org/uploads/default/original/2X/8/80ff672e2b79178c28878359a65f718edcbffec9.png) ![19 - Kopie](https://forum.dynare.org/uploads/default/original/2X/d/d30fb570817d3860abc5f12c4f27f78b65d86c3e.png)

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [2 June 2020 11:51 UTC](https://forum.dynare.org/t/learning-about-empirical-dsge-analysis/15916/11 "2020-06-02T11:51:39Z")

</div>

> [@Max1](#):
>
> If the system has  
> a unique stable solution

That implies the absence of sunspot shocks, because then the solution would not be unique anymore. A sunspot shock is not uniquely pinned down by the model.

---

<div class="post-metadata">

**Author:** ![Max1](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/e99b99/32.png) [@Max1](https://forum.dynare.org/u/Max1)\
**Post date:** [2 June 2020 12:41 UTC](https://forum.dynare.org/t/learning-about-empirical-dsge-analysis/15916/12 "2020-06-02T12:41:27Z")

</div>

Then my suspicion is true that the previous sentence has nothing to do with equation 2.10.

Unfortunately, the textbook is silent and gives no further hints w.r.t. eq. 2.10.

If I use the stability condition w\_{2,t}=0\forall t and \eta\_t=-{(Q\_2\Pi)}^{-1}Q\_2\Psi\epsilon\_t and solve for the stable upper subsystem I end up with  
\begin{align}w\_{1,t}= \Lambda\_{11}^{-1}\Omega\_{11}w\_{1,t-1}+\Lambda\_{11}^{-1}Q\_1(I\_n-\Pi{(Q\_2\Pi)}^{-1}Q\_2)\Psi\epsilon\_t\end{align}.

What remains to be done until we arrive at  
\begin{align}s\_t=\Phi\_1(\theta)s\_{t-1}+\Phi\_\epsilon(\theta)\epsilon\_t\end{align}?

Using Z\_1s\_t=w\_{1,t} might be an option, but unfortunately Z\_1 is not invertible.

---

<div class="post-metadata">

**Author:** ![Max1](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/e99b99/32.png) [@Max1](https://forum.dynare.org/u/Max1)\
**Post date:** [3 June 2020 16:38 UTC](https://forum.dynare.org/t/learning-about-empirical-dsge-analysis/15916/13 "2020-06-03T16:38:42Z")

</div>

I finally managed to derive the VAR(1) representation of the canonical form.  
The solution approach is based on Sims (2002).  
[Herbst&Schorfheide eq. 2.10.pdf](https://forum.dynare.org/uploads/short-url/cXXa4wJS0PBPnwdxyE9FCpTYvci.pdf) (99.0 KB)  
Please let me know if I made a mistake.

What is missing is the exact formula for \Phi which satisfies the equality of  
Q\_{1\cdot}\Pi = \Phi Q\_{2\cdot}\Pi.  
I don’t think that Q\_{2\cdot}\Pi will be invertible in general even if we have a unique stabel solution.  
Or am I wrong?

In equation (49) the Sims (2002) paper suggests a solution.  
Unfortunately, I am unfamiliar with the singular value decomposition.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [5 June 2020 12:08 UTC](https://forum.dynare.org/t/learning-about-empirical-dsge-analysis/15916/14 "2020-06-05T12:08:34Z")

</div>

The SVD should help you deal with cases where the matrix to be inverted is singular. Did you have a look at other textbooks like Dejong/Dave?

---

<div class="post-metadata">

**Author:** ![Max1](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/e99b99/32.png) [@Max1](https://forum.dynare.org/u/Max1)\
**Post date:** [5 June 2020 18:01 UTC](https://forum.dynare.org/t/learning-about-empirical-dsge-analysis/15916/15 "2020-06-05T18:01:29Z")

</div>

Do you mean this one? [https://press.princeton.edu/books/hardcover/9780691152875/structural-macroeconometrics](https://press.princeton.edu/books/hardcover/9780691152875/structural-macroeconometrics)

Sims (2002, p.11) mentions a condition for the row space of Q\_{1\cdot}\Pi and Q\_{2\cdot}\Pi which must be satisfied, but in his paper he applies the SVD to the column space (see eq. 49 on page 13).

So he leaves it to the reader to make the necessary adjustments.  
My guess is to simply transpose Q\_{1\cdot}\Pi and Q\_{2\cdot}\Pi and then apply the SVD.  
But Herbst&Schorfheide don’t adjust the SVD this way as you can see above eq. 2.9.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [7 June 2020 16:26 UTC](https://forum.dynare.org/t/learning-about-empirical-dsge-analysis/15916/16 "2020-06-07T16:26:02Z")

</div>

Yes, that is the correct reference. Note the Errata at [https://sites.google.com/site/pfeiferecon/teaching](https://sites.google.com/site/pfeiferecon/teaching)
